[Freeswitch-users] How to update a live system with very little downtime (How does 'make current' work?)

John freeswitch at earthspike.net
Tue Apr 17 00:23:09 MSD 2012


Jason,

This may not be the best way but is the way I do it on my Ubuntu
10.04-based system.  I found that make current does the build and
install without pausing.  On my li'l Atom-based system, the build can
take a while, meaning that the install could be at an
unpredictable/inconvenient time.  Also, I have a Sangoma ISDN card, so
the wanpipe kernel drivers need rebuilding on every kernel update; I
take this opportunity to do everything else, like this:

0. Backup all your config files, recordings, logs, etc.

1. Download any updated Sangoma drivers (libsngisdn and wanpipe). 
Install the libsngisdn drivers. On my system, they also need to be
copied from /lib64 to /usr/lib64 and the various symlinks remade before
rerunning ldconfig. None of this affects the running system as the
libsngisdn library version is hard coded into the executables at FreeTDM
build time.  Decompress the wanpipe drivers but don't build them (this
should be done after the kernel upgrade).

2. In /usr/local/src/freeswitch (YMMV) do a git pull.  I keep an eye on
the mailing list so know whether I need to do a ./bootstrap.sh or not. 
If in doubt, do.  Then `./configure` and `make` as normal.  (Don't do
`make install` yet.)

You then have 2 options: either do the kernel upgrade and rebuild the
wanpipe drivers with the current FreeSWITCH, then upgrade FreeSWITCH, or
do FreeSWITCH first then the kernel upgrade.  Doing both at once is mad
as if something goes wrong you then have a problem identifying what
caused it.  Assuming the first approach (my preferred as it is easier
(for me) to roll the kernel back).

3. Do the kernel upgrade (in my case, `apt-get dist-upgrade`,
`reboot`).  mod-freetdm will fail to load as wanpipe will be to the
wrong kernel version; this is expected. This will cause the first outage.

4. Upgrade the wanpipe drivers. If the wanpipe drivers have been
upgraded themselves, then you need to `./Setup install` otherwise just
`./Setup drivers`.  Use the same options as when first building them.
`wanrouter start` to get the wanpipe devices live again.

5. At the fs_cli prompt, `load mod_freetdm` should now succeed.  You may
wish to reboot the system again to check that all comes up from a cold
start as it should do. Here ends the first outage (usually about 10
minutes), but you could run it straight into the second if you wish, or
pause here if you need to.

6. Now comes the time to upgrade FreeSWITCH. This will cause an outage.
Stop FreeSWITCH then `make install`.  Start FreeSWITCH; all should be
well.  This normally only takes about 5-10mins on my system.

This doesn't answer your Y question but might answer your X question.
[http://www.perlmonks.org/?node_id=542341]

John


On 16/04/12 20:01, Jason Moran wrote:
>
> Sorry for such a basic question:
>
> 1.       If I do a 'make current' while a system is running it will
> not have any effect until I restart FS, correct?
>
> 2.       What if 'make current' fails? What if it fails and the server
> gets restarted, will FS work?
>
> 3.       Is it more advisable to stop FS, do the 'make current', then
> start FS even though it will have a longer down time?
>
>  
>
> I know it's best to keep FS up-to-date -- but it is difficult when you
> only have 1 system available and it is expected to have 100% uptime..
>
> Thanks,
> Jason
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120416/c05b6cf4/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list