Skip to content

Commit

Permalink
During upgrade the postinst of contrail-openstack back's up the
Browse files Browse the repository at this point in the history
/etc/init.d/<openstack service> assuming that the conf file is from the
native package. Fix is to backup only if the native package upstart
file exists(meaning fresh install). If the native package upstart dosent exists
it is upgrade case.

Change-Id: I27546002e0a411285bc98ac029d8fc26d1b8b38e
Closes-Bug: 1549619
  • Loading branch information
cijohnson committed Feb 25, 2016
1 parent da0c9f3 commit 2e6cb74
Showing 1 changed file with 8 additions and 3 deletions.
Expand Up @@ -3,11 +3,16 @@ for svc in keystone nova-api nova-scheduler nova-conductor nova-console\
nova-consoleauth nova-objectstore nova-novncproxy glance-api\
glance-registry cinder-api cinder-scheduler heat-engine heat-api heat-api-cfn ; do
if [ -f /etc/init/$svc.conf ]; then
# Service stop is required for SM provisioing; because SM does
# installation of contrail-openstack after provisioning
# with native openstack packages
service $svc stop || true
mv /etc/init/$svc.conf /etc/init/$svc.conf.backup
fi
if [ -f /etc/init.d/$svc ]; then
mv /etc/init.d/$svc /etc/init.d/$svc.backup
# Move only in case of fresh install, if /etc/init/$svc.conf exists
# it is a fresh install case
if [ -f /etc/init.d/$svc ]; then
mv /etc/init.d/$svc /etc/init.d/$svc.backup
fi
fi
if [ -f /etc/init.d/$svc.initd.supervisord ]; then
mv /etc/init.d/$svc.initd.supervisord /etc/init.d/$svc
Expand Down

0 comments on commit 2e6cb74

Please sign in to comment.