Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 919497

Summary: Glance services are not restarted after yum update
Product: Red Hat OpenStack Reporter: Alan Pevec <apevec>
Component: openstack-glanceAssignee: John Bresnahan <jbresnah>
Status: CLOSED ERRATA QA Contact: Attila Fazekas <afazekas>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 2.0 (Folsom)CC: abaron, breeler, eglynn, ndipanov, sgordon
Target Milestone: rc   
Target Release: 2.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
Glance does not fully support a graceful restart yet. Hence, image transfers that are still in progress will be lost when Glance services are restarted. This will occur when updating the openstack-glance package. The workaround to avoid losing images is to wait for image transfers that are in progress to complete, before updating the openstack-glance package or restarting Glance services. If there are no image transfers in progress during installation of a new version of the openstack-glance package or during a restart of the Glance services, then this problem will not occur.
Story Points: ---
Clone Of:
: 1102481 (view as bug list) Environment:
Last Closed: 2013-04-08 23:42:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 927381, 1102481    
Attachments:
Description Flags
A patch for this issue
apevec: review+
adding scrubber to the services patch lhh: review+

Description Alan Pevec 2013-03-08 16:28:18 UTC
Description of problem:
%postun is missing in openstack-glance.spec
so services are not restarted  when package is upgraded.

Version-Release number of selected component (if applicable):

Steps to Reproduce:
ps -ef|grep glance
yum update
ps -ef|grep glance

Note Glance PIDs have not changed!

Comment 1 Alan Pevec 2013-03-08 16:33:21 UTC
> Version-Release number of selected component (if applicable):
openstack-glance-2012.2.3-3.el6ost

Looks like this was lost in a bad merge f18->el6 long ago.

Missing section is something like this:

%postun
if [ $1 -ge 1 ] ; then
    # Package upgrade, not uninstall
    for svc in api registry ; do
        /sbin/service openstack-glance-${svc} condrestart > /dev/null 2>&1 || :
    done
fi

Comment 2 John Bresnahan 2013-03-08 19:40:03 UTC
Created attachment 707189 [details]
A patch for this issue

Comment 5 Attila Fazekas 2013-03-19 23:52:06 UTC
I was able to trigger the restart by downgrading, I would need a newer version for triggering the restart on an update.

Excluding the scrubber all service restarted.

Comment 6 Attila Fazekas 2013-03-20 16:35:22 UTC
scrubber did not restarted. (-1)

Note: 
I also have some concerns about restarting the services on every openstack-glance or python-glance install, because it interrupts the service(image transfer) even if the package just changing the manual page.

The service has external library dependencies so probably the admins wants to restart the service in other cases or do not want to restart it at all.

Comment 7 John Bresnahan 2013-03-20 19:20:53 UTC
@apevec do you have any thoughts on whether or not the services should be restarted or not (as referenced in comment 6)?

Comment 9 John Bresnahan 2013-03-22 21:54:39 UTC
Created attachment 714809 [details]
adding scrubber to the services patch

Comment 19 Lon Hohberger 2013-03-26 16:45:47 UTC
Reviewed second patch - based on Alan's review, the only change was addition of the scrubber service, so the patch looks good to go.

Comment 21 Attila Fazekas 2013-03-28 13:11:50 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=927381 will address my concerns.

Comment 23 errata-xmlrpc 2013-04-08 23:42:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0716.html