On 09/24/2014 10:06 AM, David Carson wrote:
> By the way, I can do the 'rb-site upgrade --all-sites' as a stand-alone
> command, whether or not the hook is in place.  So, the problem has
> something to do with the rb-site being called by the httpd restart (or
> start).
> On Wednesday, September 24, 2014 9:59:59 AM UTC-4, David Carson wrote:
>     Paul,
>     This is not the issue for me.  I am demonstrating below that (a) the
>     'restart httpd' succeeds when the hook is *not* in place, and (b)
>     that even if mariadb is running, the 'restart httpd' hangs when the
>     hook is in place.  The "(0)" at the beginning of my prompt is the
>     return code ($?).
>         (0)[root@pinehurst httpd.service.d] pwd
>         /usr/lib/systemd/system/httpd.service.d
>         (0)[root@pinehurst httpd.service.d] ls
>         reviewboard-sites.conf.*no.go*
>         (0)[root@pinehurst httpd.service.d]
>         (0)[root@pinehurst httpd.service.d] systemctl restart
>         httpd.service  *<<-- OK, no hang*
>         (0)[root@pinehurst httpd.service.d]
>         (0)[root@pinehurst httpd.service.d]
>         (0)[root@pinehurst httpd.service.d] *mv*
>         reviewboard-sites.conf.*no.go* reviewboard-sites.conf
>         (0)[root@pinehurst httpd.service.d] systemctl daemon-reload
>         (0)[root@pinehurst httpd.service.d]
>         (0)[root@pinehurst httpd.service.d] systemctl restart
>         mariadb.service  *<<-- make sure mariadb is running*
>         (0)[root@pinehurst httpd.service.d]
>         (0)[root@pinehurst httpd.service.d] systemctl restart
>         httpd.service *<<-- this one hangs (status 'activating')*

Yeah, I've been looking at it today and discovered that I was doing
something wrong.

tl;dr version: Delete the 'type=oneshot' line.

There were a couple of bugs here. The core problem is that I
misunderstood what the unit files in the drop directories did. I was
actually replacing the Type of httpd.service, not setting one just for
the add-on unit. The effect was that httpd.service was behaving as a
oneshot type and was not returning control until it exited. Oops.

However, because I typoed "Type", systemd was just logging an error and
ignoring it. I hadn't noticed the logged error, but since things were
working (including upgrades) I never had cause to look in the log.

So I need to actually just remove that line entirely and the logged
error will go away and the upgrade script will run as expected.

I'm putting out updated packages for 2.0.8 in a few minutes which will
have the corrected unit file.

Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
Happy user? Let us know at http://www.reviewboard.org/users/
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to