Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Allow binary upgrades in Solaris zones

Maxim Dounin
January 06, 2011 10:00PM
Hello!

On Thu, Jan 06, 2011 at 04:45:55PM +0000, doug@hcsw.org wrote:

> Hi Maxim,
>
> On Thu, Jan 06, 2011 at 02:53:36AM +0300 or thereabouts, Maxim Dounin wrote:
> > Yes, nginx checks if previous upgrade was finished by checking
> > parent pid to be 1.
>
> Thank you for your explanation about this.
>
> Does it also have something to do with preventing an upgrade when running
> nginx under daemontools?
>
> "If you never did online upgrade before, this may mean that you run nginx
> under daemontools/etc. Thus online upgrade is not available in this case."
>
> http://nginx.org/pipermail/nginx/2008-June/005678.html

With daemontools nginx binary upgrade will leave daemontools
thinking nginx was terminated (and actually it was - but started
another one before this), so it won't work anyway.

Running daemonized nginx though fghack[1] may help (usual
restrictions apply, i.e. daemontools won't be able to send
signals).

[1] http://cr.yp.to/daemontools/faq/create.html#fghack

> > I don't really like this aproach, it looks fragile and actually
> > adds another non-portable hack instead of fixing original
> > non-portability.
>
> I agree it is a hack that relies on non-standard behaviour but I disagree
> that it is fragile. My logic behind the patch was that it should:
>
> 1) Use only standard unix syscalls so as to not break compilation on any
> platforms.
>
> 2) Revert to the current behaviour and refuse upgrade if init process not
> being visible inside zones does not apply.

Your patch relies on the following assumptions:

1. Process with pid 1 is visible if it's used as "default parent".

2. Process with pid 1 isn't visible if it's not used as "default
parent".

Both may easily become false.

> > Probably passing real parent pid from old binary and checking if
> > getppid() [doesn't] match whould be better aproach (at least, it
> > should be portable).
>
> Now that I understand the purpose behind this test better I agree this
> would be a better solution. I will look into creating a patch that
> implements this approach and post my results here.

That would be great, thanks.

Maxim Dounin

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Allow binary upgrades in Solaris zones

Anonymous User 2496 January 05, 2011 02:24PM

Re: [PATCH] Allow binary upgrades in Solaris zones Attachments

Piotr Sikora 994 January 05, 2011 03:16PM

Re: [PATCH] Allow binary upgrades in Solaris zones Attachments

Piotr Sikora 1073 January 05, 2011 03:28PM

Re: [PATCH] Allow binary upgrades in Solaris zones

Anonymous User 880 January 06, 2011 11:24AM

Re: [PATCH] Allow binary upgrades in Solaris zones

Piotr Sikora 841 January 06, 2011 07:40PM

Re: [PATCH] Allow binary upgrades in Solaris zones

Maxim Dounin 909 January 05, 2011 06:54PM

Re: [PATCH] Allow binary upgrades in Solaris zones

Anonymous User 905 January 06, 2011 11:46AM

Re: [PATCH] Allow binary upgrades in Solaris zones

Maxim Dounin 1034 January 06, 2011 10:00PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 210
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready