Hide Forgot
The %pretrans statement in the openstack-neutron package generates a shell script called UPGRADE_FROM_QUANTUM that incorrectly parses the output of chkconfig to generate a list of services to enable. This does not correctly take into account services that are turned off for all runlevels and generates a script that incorrectly calls the services themselves - some of which do not background and do not terminate. cat /var/lib/rpm-state/UPGRADE_FROM_QUANTUM chkconfig --levels 2345 neutron-openvswitch-agent on neutron-server In this case, neutron-server was set to off on all three run levels however the script itself calls neutron-server which does not background nor terminate and thus the rpm package installation does not return control to the console. The culprit code is: %pretrans if rpm --quiet -q openstack-quantum; then mkdir -p %{_localstatedir}/lib/rpm-state/ # Create a script for restoring init script enabling that we can also # use as a flag to detect quantum -> grizzly upgrades in %posttrans chkconfig --type sysv --list|grep ^quantum| \ sed -re 's/[0-6]:off//g s/([0-6]):on\s*/\1/g s/quantum/neutron/g s/^([a-z0-9-]+)\s+([0-6]+)/chkconfig --levels \2 \1 on/' > %{_localstatedir}/lib/rpm-state/UPGRADE_FROM_QUANTUM fi This should actually read: %pretrans if rpm --quiet -q openstack-quantum; then mkdir -p %{_localstatedir}/lib/rpm-state/ # Create a script for restoring init script enabling that we can also # use as a flag to detect quantum -> grizzly upgrades in %posttrans chkconfig --type sysv --list|grep ^quantum| \ sed -re 's/[0-6]:off//g s/([0-6]):on\s*/\1/g s/quantum/neutron/g s/^([a-z0-9-]+)\s+$/chkconfig \1 off/ s/^([a-z0-9-]+)\s+([0-6]+)/chkconfig --levels \2 \1 on/' > %{_localstatedir}/lib/rpm-state/UPGRADE_FROM_QUANTUM fi This will generate a script for the upgrade that reads: chkconfig --levels 2345 neutron-openvswitch-agent on chkconfig neutron-server off
If this isn't the correct place to report this bug let me know.
Is there an ETA on the fix for this? This is a blocker for us as we can't upgrade quantum to neutron without the rpm transaction blowing up
Moving to Fedora EPEL per my email with Perry
That sed expression needs to add a '_' to avoid breaking with service names that contain an underscore. So: sed -re 's/[0-6]:off//g s/([0-6]):on\s*/\1/g s/quantum/neutron/g s/^([a-z0-9_-]+)\s+$/chkconfig \1 off/ s/^([a-z0-9_-]+)\s+([0-6]+)/chkconfig --levels \2 \1 on/'
Created attachment 838428 [details] Fixes %pretrans scriptlet in openstack-neutron.spec The attached patch (against branch rhos-4.0-rhel-6) corrects the %pretrans scriptlet.
Confiramation: With services configured like this: # chkconfig --list | grep quantum quantum-dhcp-agent 0:off 1:off 2:on 3:on 4:on 5:on 6:off quantum-l3-agent 0:off 1:off 2:on 3:on 4:on 5:on 6:off quantum-metadata-agent 0:off 1:off 2:on 3:on 4:on 5:on 6:off quantum-openvswitch-agent 0:off 1:off 2:off 3:off 4:off 5:off 6:off quantum-server 0:off 1:off 2:on 3:on 4:on 5:on 6:off The existing scriptlet results in this output in UPGRADE_FROM_QUANTUM: chkconfig --levels 2345 neutron-dhcp-agent on chkconfig --levels 2345 neutron-l3-agent on chkconfig --levels 2345 neutron-metadata-agent on neutron-openvswitch-agent chkconfig --levels 2345 neutron-server on Whereas the patched scriptlet results in: chkconfig --levels 2345 neutron-dhcp-agent on chkconfig --levels 2345 neutron-l3-agent on chkconfig --levels 2345 neutron-metadata-agent on chkconfig neutron-openvswitch-agent off chkconfig --levels 2345 neutron-server on
Hah, didn't see that it had been fixed. Never mind...