Hi list,

ok, this has been long awaited I guess: graceful restarting of Kannel bearerbox.

At the moment we can shutdown a specific SMSC and restart it again. But we can't effectively move SMSC config parts in and out while keeping the bearerbox running for those SMSC connections that should be unchanged and supposed to keep running.

This patchset allows this, by making use of a "checksum" for each 'group = smsc' context. So we can "detect" if there are groups that haven't changed, and hence will be kept running. Other groups are counter-compared based on their 'smsc-id' value.

I.e. if the "newly" read-in config has a smsc-id = A and this smsc-id = A also exists in the "running" config, AND they do not match, hence the checksum doesn't match, then we assume there is a "change" for smsc-id = A. This results in the running smsc group to be shutdown and destroyed and the new smsc group to be started.

Similar if there is a smsc-id = B in the running configuration, but is not present anymore in the new one, then we shutdown and destroy it. For the opposite side, smsc-id = C is in the new config, but not in the running config, we add it to the running config.

I have tested this fairly, and it works pretty nice. BTW, it fixes even a couple of memory leaks that we haven't "detected" yet, due that we are not re-init'ing the corresponding data structure. There is STILL a memory leak in the cfg_read() when a config is broken and tried to be gracefully restarted. I need to work on this.

Please test, I would love to see this going into SVN trunk ASAP. You can find the patchset at URL:

http://www.kannel.org/~tolj/patchsets/graceful/gateway-graceful-restart.diff

After finalizing the current open patches, I would like to endorse Kannel 1.5.1 devel, giving it a 2-3 month time to settle for bug fixes and then push the release button for Kannel 1.6.0 stable.

Comments always welcome.
Stipe

--
-------------------------------------------------------------------
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture      Kannel Software Foundation (KSF)
http://www.tolj.org/              http://www.kannel.org/

mailto:st_{at}_tolj.org           mailto:stolj_{at}_kannel.org
-------------------------------------------------------------------

Reply via email to