Check for name uniqueness when a new process is added to ProcessManager.
This check is against both current running processes (namemap) and the
registered processes (services) to ensure that the name is unique and so
process gets overriden.
Improve detection of bad arguments errors in dispatcher handlers.
The previos scheme was based on parsing TypeError messages, so it was very
poor because spourious errors could have been raised (is a subcall inside
a handler made a wrong function call). The new scheme involves a wrapper
with a dummy function with the same signature as the original handler.
The wrapper then call the dummy function to check the arguments and catches
any TypeError in that NOP call. If an error is catched, it's translated to
a WrongArgumentError, if not, the real hanlder is called with that (now
knonw to be right) arguments.
Improve detection of bad arguments errors in dispatcher handlers.
The previos scheme was based on parsing TypeError messages, so it was very
poor because spourious errors could have been raised (is a subcall inside
a handler made a wrong function call). The new scheme involves a wrapper
with a dummy function with the same signature as the original handler.
The wrapper then call the dummy function to check the arguments and catches
any TypeError in that NOP call. If an error is catched, it's translated to
a WrongArgumentError, if not, the real hanlder is called with that (now
knonw to be right) arguments.
* procman:
Bugfix: set the catched signal to None *after* calling the signal handler.
Improve vrrp restorable defaults readability.
Use procman.restart() to restart vrrp service.
Add ProcessManager.restart() method to block until the restart is done.
Use procman to manage vrrp service.
Bugfix: raise a KeyError, don't return it.
Bugfix: call ProcessInfo.stop() in the right way (without parameters).
Bugfix: use self instead of an unbinded pi object when killing a process.
Remove unused ProcessInfo.last_return attribute.
Bugfix: use correct module for simbol ECHILD.
Handle SIGCHLD in PyminDaemon.
Add a global ProcessManager instance and functions to procman module.
Implement timer in PyminDaemon using EventLoop signal handling.
Support general signals handling in EventLoop.
Replace time.sleep() for signal.pause() in the ProcessManager test.
Improve ProcessManager to manage registerable named services.
Add a ProcessManager class to manage processes.
Improve ProcessManager to manage registerable named services.
Add a ProcessManager class to manage processes.
Merge branch 'master' of git.llucax.com.ar:/var/lib/git/software/pymin into logging
* 'master' of git.llucax.com.ar:/var/lib/git/software/pymin:
Add protocol specification of firewall and nat commands.
Added the protocol specification.
Root class inyects ip forwrading in constructor.
Added route handling capabilities and service restarting
Fix so that when a device is brought back up, the routes
Added support to hook services to IPHandler.
Support for inactive devices added in IPHandler.
Merge branch 'master' of git.llucax.com.ar:/var/lib/git/software/pymin into procman
* 'master' of git.llucax.com.ar:/var/lib/git/software/pymin:
Add protocol specification of firewall and nat commands.
Added the protocol specification.
Root class inyects ip forwrading in constructor.
Added route handling capabilities and service restarting
Fix so that when a device is brought back up, the routes
Added support to hook services to IPHandler.
Support for inactive devices added in IPHandler.
Remove ReturnNot0Error, use subprocess.check_call instead.
qos implementation (working)
qos template fixes
Nicolas Emiliani [Mon, 26 Nov 2007 12:52:34 +0000 (09:52 -0300)]
Added support to hook services to IPHandler.
A service that has to be restarted after detection
of a device bring up, can be hooked to do so by calling
the method device_up_hook. The service while be added to
the hook list only in case it has the attributes start
and stop.
Now the EventLoop has no support for timers but have general signals
handling support. Signals to be handled can be specified in the constructor
or by calling set_signal() method. Stop handling a particular type of
signals is supported too by calling to the unset_signal() method.
A callback can be specified for each type of signal, or all signal handling
can be done in the handle_signal() method, if overriden by EventLoop
subclasses.
Improve ProcessManager to manage registerable named services.
Besides call, now ProcessManager can register (and unregister) named
services. Once registered, they can be started and stopped (or killed if
multiple stop are issued before the process actually dies) at will, just
like regular processes. Processes can be signaled too.