[bionic] n-c-c charm tries to write an init disable file when the /etc/init dir does not exist

Bug #1765215 reported by Ryan Beisner
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Nova Cloud Controller Charm
Fix Released
High
Frode Nordahl

Bug Description

[bionic] n-c-c charm tries to write an init disable file when the /etc/init dir does not exist

This is an arm64 deployment.

2018-04-18 15:30:19 INFO juju-log Disabling services into db relation joined
2018-04-18 15:30:19 DEBUG worker.uniter.jujuc server.go:178 running hook tool "status-set"
2018-04-18 15:30:20 DEBUG worker.uniter.jujuc server.go:178 running hook tool "juju-log"
2018-04-18 15:30:20 DEBUG juju-log 0 section(s) found
2018-04-18 15:30:20 DEBUG install Traceback (most recent call last):
2018-04-18 15:30:20 DEBUG install File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/install.real", line 1150, in <module>
2018-04-18 15:30:20 DEBUG install main()
2018-04-18 15:30:20 DEBUG install File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/install.real", line 1144, in main
2018-04-18 15:30:20 DEBUG install hooks.execute(sys.argv)
2018-04-18 15:30:20 DEBUG install File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/charmhelpers/core/hookenv.py", line 801, in execute
2018-04-18 15:30:20 DEBUG install self._hooks[hook_name]()
2018-04-18 15:30:20 DEBUG install File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/charmhelpers/contrib/hardening/harden.py", line 79, in _harden_inner2
2018-04-18 15:30:20 DEBUG install return f(*args, **kwargs)
2018-04-18 15:30:20 DEBUG install File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/install.real", line 276, in install
2018-04-18 15:30:20 DEBUG install disable_services()
2018-04-18 15:30:20 DEBUG install File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/nova_cc_utils.py", line 1189, in disable_services
2018-04-18 15:30:20 DEBUG install with open('/etc/init/{}.override'.format(svc), 'wb') as out:
2018-04-18 15:30:20 DEBUG install IOError: [Errno 2] No such file or directory: '/etc/init/haproxy.override'
2018-04-18 15:30:20 ERROR juju.worker.uniter.operation runhook.go:113 hook "install" failed: exit status 1

...

130 jenkins@mosci-arm64-jslave-persist-89:~/full_pipeline-303@2⟫ juju status nova-cloud-controller
Model Controller Cloud/Region Version SLA
arm64-mosci-ruxton-maas arm64-mosci-ruxton-maas ruxton-maas 2.3.2 unsupported

App Version Status Scale Charm Store Rev OS Notes
nova-cloud-controller error 1 nova-cloud-controller jujucharms 347 ubuntu

Unit Workload Agent Machine Public address Ports Message
nova-cloud-controller/0* error idle 2/lxd/3 10.245.168.46 hook failed: "install"

Machine State DNS Inst id Series AZ Message
2 started 10.245.168.25 qmwcqs bionic default Deployed
2/lxd/3 started 10.245.168.46 juju-9c4e2c-2-lxd-3 bionic default Container started

Relation provider Requirer Interface Type Message
cinder:cinder-volume-service nova-cloud-controller:cinder-volume-service cinder regular
glance:image-service nova-cloud-controller:image-service glance regular
keystone:identity-service nova-cloud-controller:identity-service keystone regular
mysql:shared-db nova-cloud-controller:shared-db mysql-shared regular
neutron-api:neutron-api nova-cloud-controller:neutron-api neutron-api regular
neutron-gateway:quantum-network-service nova-cloud-controller:quantum-network-service quantum regular
nova-cloud-controller:cluster nova-cloud-controller:cluster nova-ha peer joining
nova-compute:cloud-compute nova-cloud-controller:cloud-compute nova-compute regular
rabbitmq-server:amqp nova-cloud-controller:amqp rabbitmq regular

Tags: uosci
Frode Nordahl (fnordahl)
Changed in charm-nova-cloud-controller:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Frode Nordahl (fnordahl)
Revision history for this message
Frode Nordahl (fnordahl) wrote :

The problematic bits are in hooks/nova_cc_utils.py enable_services() and disable_services() functions. These can and should probably be replaced by respective helpers from charm-helpers.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-cloud-controller (master)

Fix proposed to branch: master
Review: https://review.openstack.org/562741

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cloud-controller (master)

Reviewed: https://review.openstack.org/562741
Committed: https://git.openstack.org/cgit/openstack/charm-nova-cloud-controller/commit/?id=edc18d4937807dbe2934580449182d65cd642f53
Submitter: Zuul
Branch: master

commit edc18d4937807dbe2934580449182d65cd642f53
Author: Frode Nordahl <email address hidden>
Date: Thu Apr 19 18:38:48 2018 +0200

    Make charm agnostic of underlying init system

    Replace charm custom init control functions with `service_pause`
    and `service_resume` functions from charm-helpers.

    Change-Id: I235af30a19294316f65fba0e13fe10ae50164a42
    Closes-Bug: #1765215

Changed in charm-nova-cloud-controller:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-cloud-controller (stable/18.02)

Fix proposed to branch: stable/18.02
Review: https://review.openstack.org/563854

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cloud-controller (stable/18.02)

Reviewed: https://review.openstack.org/563854
Committed: https://git.openstack.org/cgit/openstack/charm-nova-cloud-controller/commit/?id=d6168d7f2fef7f41e98b9d4e45ae08858453fa78
Submitter: Zuul
Branch: stable/18.02

commit d6168d7f2fef7f41e98b9d4e45ae08858453fa78
Author: Frode Nordahl <email address hidden>
Date: Thu Apr 19 18:38:48 2018 +0200

    Make charm agnostic of underlying init system

    Replace charm custom init control functions with `service_pause`
    and `service_resume` functions from charm-helpers.

    Change-Id: I235af30a19294316f65fba0e13fe10ae50164a42
    Closes-Bug: #1765215
    (cherry picked from commit edc18d4937807dbe2934580449182d65cd642f53)

James Page (james-page)
Changed in charm-nova-cloud-controller:
milestone: none → 18.05
David Ames (thedac)
Changed in charm-nova-cloud-controller:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charm-nova-cloud-controller (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/579038

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to charm-nova-cloud-controller (master)

Reviewed: https://review.openstack.org/579038
Committed: https://git.openstack.org/cgit/openstack/charm-nova-cloud-controller/commit/?id=dc56287105dfc80900fdfed2cdc867c4063592ee
Submitter: Zuul
Branch: master

commit dc56287105dfc80900fdfed2cdc867c4063592ee
Author: Billy Olsen <email address hidden>
Date: Thu Jun 28 18:34:02 2018 -0700

    Don't resume service if unit is paused

    Disabling the single-nova-consoleauth while the unit is paused
    will restart the nova-consoleauth service on the local unit.
    This patch only resumes the service locally if the local unit
    is not currently paused.

    Change-Id: Id66375ab758e1b33b96a819d2ce788a4434b1686
    Related-Bug: #1765215
    Related-Bug: #1705514

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.