*** bigbrother has quit IRC *** curt has quit IRC *** curt has joined #gnuenterprise *** bigbrother has joined #gnuenterprise *** bigbrother has quit IRC *** curt has quit IRC *** curt has joined #gnuenterprise *** bigbrother has joined #gnuenterprise *** SachaZzz has quit IRC *** lupo__ has quit IRC *** psu has joined #gnuenterprise for the logs (which, for once, means "reinhard, read this", not "psu, read this") ;-) yes, my bad re the creating objects at run time I guess I just saw the word 'object' and assumied you meant AppServer object not an object on a Form. * psu blames the computer industry for lack of imagination the word 'object' must have more contexts than just about any other or alternatively * psu blames the English languge yeah, that'll do... Anyway, will correct next time. Thanks. *** psu has left #gnuenterprise *** SachaS has joined #gnuenterprise *** johannesV has joined #gnuenterprise good morning morning *** sjc has joined #gnuenterprise *** reinhard has joined #gnuenterprise good morning everybody good morning hallo reinhard reinhard: was there a lug the other day? reinhard: I just saw you leaving but then I could not find any information on the lug vorarberg page about any meeting. *** btami has joined #gnuenterprise was an internal meeting regarding LinuxDay organisation but I already proposed we should make these meetings public next time ok. thanks. *** btami has quit IRC *** dimas has quit IRC *** ajmitch has quit IRC *** btami has joined #gnuenterprise *** dimas has joined #gnuenterprise *** ajmitch has joined #gnuenterprise btw wednesday a member of the Liechtenstein Landtag (a Landtagsabgerordneter) placed a small question (kleine Anfrage) for the Liechtenstein government (Regierung) about "Open Standards as well as Free and Open Source Software for the Liechtenstein Governement" this Friday (later today) the government will have to answer the few questions asked interesting October 3rd a swiss study will be released about Free Software in Swiss Governement infos: http://www.swissict.ch/oss.html results of the Swiss Open Source Study *** sjc has quit IRC *** dimas has quit IRC *** kilo has joined #gnuenterprise bha, pyqt sucks *** btami has quit IRC *** kilo has quit IRC *** lekma has joined #gnuenterprise hi guys *** jamest has joined #gnuenterprise hi lekma hi reinhard how are you? *** johannesV_ has joined #gnuenterprise fine, thanks I just committed one of your patches yesterday and wrote some comment about the other one in the tracker (maybe you want to have a look at that) *** johannesV has quit IRC i did see it hmmm why does it always have to be come friday 15:00 until I can start with the work I resolved to do this week... s/be come/become/ *** johannesV_ has quit IRC why does it always have tobe come end of september until I can start with the work I resolved to do in april... :) :) why do i have to work in the first place? why cant i just have fun? why dont i have a ferrari in my garage? why dont i own a villa in Mallorca? why are there no gnuenterprise modules yet? ;) reinhard: replied to your mail thanks reinhard: do you have a little time to discuss? sure while updating the ebuilds for gentoo i've been experimenting with appserver there is smthing wrong in the way it starts when you want it to daemonize btw: that's why the patch on the GDebug thing i use debug option for logfiles yes, that makes a lot of sense actually I'd even say ajmitch: debian packages should also do something like start gnue-appserver with --debug-file=/var/log/... option and maybe have some way to set debug levels in some config file ajmitch: i have an init.d file and a default one that could be adapted to debian, if you like reinhard: that's what i'm doing for gentoo anyway, while playing i stumbled upon a puzzling pb if you start appserver in daemon mode while giving it a debug-file option there a file descriptor open that wont be closed thus blocking the graceful closing of a session ie: ssh to your server start appserver with smthing like /usr/bin/python /usr/bin/gnue-appserver --silent --debug-level 0-2 --debug-file /var/log/gnue/appserver.log --pidfile /var/run/gnue/appserver.pid and try to exit your ssh session it hangs the only way to exit gracefully your ssh session is to stop appserver (kill -15 pid) sthe pb is that the GDebug happens before daemonizing (and daemonizing don't do the right thing, another pb (more a matter of taste in fact)) I'm trying to reproduce the "can't exit gracefully" thing now what do you mean with "daemonizing don't do the right thing"? well, that's more a matter of taste, but according to http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16 you should close all open file descriptors and then reopen the to whatever you want smthing like: try: MAXFD = os.sysconf("SC_OPEN_MAX") except (AttributeError, ValueError): MAXFD = 1024 for fd in reversed(range(MAXFD)): try: os.close(fd) except OSError: pass # probably not open os.open("/dev/null", os.O_RDONLY) # standard input (0) os.open("/dev/null", os.O_RDWR) # standard output (1) os.open("/dev/null", os.O_RDWR) # standard error (2) see, also: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731 Title: Creating a daemon the Python way; Submitter: Chad J. Schroeder; Updated: 2005/10/03; Version: 1.5; Category: Threads; Description: The Python way to detach a process from the controlling terminal and run it in the background as a daemon. '\x02Title\x02: Creating a daemon the Python way; \x02Submitter\x02: Chad J. Schroeder; \x02Updated\x02: 2005/10/03; \x02Version\x02: 1.5; \x02Category\x02: Threads; \x02Description\x02: The Python way to detach a process from the controlling terminal and run it in the
\nbackground as a daemon.' :)\ okay so this would also solve the problem with exiting ssh, right? yes, but it will create pbs with GDebug it's abit complicated the way GDebug works (if i understand correctly) is capture stderr and stdout and this is done before becoming a daemon so if you close all fds you lose GDebug (i tested it) ok the only solution i see is forking in the background before anything that opens a file occurs do you think it is possible with the actual code? another question: is there someone working on a psycopg2 driver? if no, i'd like to give it a try lekma: I think the daemonizing could be done at an earlier stage, before setDebug FWIW, I can reproduce the problem lekma: do you think you can dig into this? this, being? i.e. doing the close/open stuff in daemonize, and moving the daemonize before the setDebug? unfortunately i tried already in any case I suggest we create an issue in the tracker with some snippet of this log so the problem is documented ok, I'll try but I'm not sure when I will be able to do it I'd like to have it in roundup *** dimas__ has joined #gnuenterprise the pb is setDebug occurs in GBaseApp in __init__ if you move daemonize before it you lose the distingo between a GBaseApp and a GServerApp daemonizing being being the main difference and if you move setDebug, you either have to do it in GBaseApp and GServerApp or ... you lose one of them * lekma doesn't think he's perfectly clear I know what you mean I think the change would involve some restructuring of function calls that's why i couldn't provide a fix, it involves DECISIONS :) lekma: I'm perfectly happy if you can open an issue in roundup with priority "bug" ok and assign it to moe err me I must run to the garden to pick some rasperries because sabine needs them urgently, bbl moe on russian means - mine *** dimas__ is now known as dimas *** SachaS has quit IRC back lekma: thanks for putting the issue in roundup the issue with GDebug lead me to another question: shouldn't we use the logging module for logging purposes? you mean syslog? nope, std logging python module huh? let me look i see 2/3 area where maybe using python standard module would simplify things ah logging module new in python 2.3 probably nobody ever looked into it optparse for command line args ConfigParser for config file parsing sorry this one is already used and logging for... logging it was not included in python dist before 2.3, but it existed *** SachaS has joined #gnuenterprise *** derek has joined #gnuenterprise logging module certainly looks like something we should switch to I'm all for using built-in python stuff instead of homegrown extra stuff I created an issue in roundup for this one lekma: thank you for all your excellent proposals! you're welcome *** jcater has joined #gnuenterprise is there any test suite i should run, if i want to test a new db driver? *** psu has joined #gnuenterprise i created a roundup issue for a psycopg2 driver, with a patch (i can't believe that's the only work needed to add a db driver, kuddos to you guys!!) gnue-common/test/drivers contains something you might also want to add some info for technote 00016 in common (I think the test given above gives you that info) well, the test fails for psycopg and psycopg2 DB000: Traceback (most recent call last): DB000: File "checkem.py", line 101, in ? DB000: BackendCheck ().run () DB000: File "checkem.py", line 37, in __init__ DB000: GClientApp.__init__ (self, connections, 'common', {}) DB000: File "/usr/lib/gnue/common/apps/GBaseApp.py", line 345, in __init__ DB000: self.configDefaults, configFilename = self.CONFIGFILE) DB000: File "/usr/lib/gnue/common/apps/GConfig.py", line 55, in __init__ DB000: self.loadApplicationConfig(configFilename,homeConfigDir,section, defaults) DB000: File "/usr/lib/gnue/common/apps/GConfig.py", line 85, in loadApplicationConfig DB000: parser = GConfigParser(defaults + GCConfig.ConfigOptions) DB000: TypeError: unsupported operand type(s) for +: 'dict' and 'tuple' same error oh should be fixed now *** psu has quit IRC yep, works python checkem.py > psycopg.txt python checkem.py > psycopg2.txt diff -urN psycopg.txt psycopg2.txt oh, nice (of course i changed psycopg to psycopg2 between run) I just noticed that psycopg module is hosed in dapper we need to document bugs in dependencies that hit us in our tracker and document which versions of the dependencies they apply to bah no single postgres driver in dapper works :( psycopg, pygresql and pypgsql all broken import psycopg2.psycopg1 as psycopg :) http://initd.org/tracker/psycopg/wiki/Migration lekma: we wouldn't need that, AFAICT we don't need any of those features that changed between 1 and 2 off for today cu all *** reinhard has quit IRC bye all *** lekma has quit IRC *** dimas has quit IRC *** psu has joined #gnuenterprise *** psu has left #gnuenterprise *** derek has quit IRC *** derek has joined #gnuenterprise *** dimas has joined #gnuenterprise *** psu has joined #gnuenterprise *** psu has joined #gnuenterprise *** psu has left #gnuenterprise *** jamest has left #gnuenterprise *** jcater has quit IRC *** derek has quit IRC *** gambolputty has joined #gnuenterprise is there an IRC channel for Bayonne? *** gambolputty has left #gnuenterprise *** dimas has quit IRC *** derek has joined #gnuenterprise