destroy_libvirt_network causes hook error in nova-lxd use cases

Bug #1603566 reported by Ryan Beisner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nova-compute (Juju Charms Collection)
Fix Released
Critical
David Ames

Bug Description

The recent addition of destroy_libvirt_network to the nova-compute charm @ master caused nova-lxd test cases to start failing, as virsh isn't present.

2016-07-15 00:57:22 INFO config-changed Traceback (most recent call last):
2016-07-15 00:57:22 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 500, in <module>
2016-07-15 00:57:22 INFO config-changed main()
2016-07-15 00:57:22 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 493, in main
2016-07-15 00:57:22 INFO config-changed hooks.execute(sys.argv)
2016-07-15 00:57:22 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/core/hookenv.py", line 715, in execute
2016-07-15 00:57:22 INFO config-changed self._hooks[hook_name]()
2016-07-15 00:57:22 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 1802, in wrapped_f
2016-07-15 00:57:22 INFO config-changed restart_functions)
2016-07-15 00:57:22 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/core/host.py", line 526, in restart_on_change_helper
2016-07-15 00:57:22 INFO config-changed r = lambda_f()
2016-07-15 00:57:22 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 1801, in <lambda>
2016-07-15 00:57:22 INFO config-changed (lambda: f(*args, **kwargs)), restart_map, stopstart,
2016-07-15 00:57:22 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/hardening/harden.py", line 79, in _harden_inner2
2016-07-15 00:57:22 INFO config-changed return f(*args, **kwargs)
2016-07-15 00:57:22 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 155, in config_changed
2016-07-15 00:57:22 INFO config-changed destroy_libvirt_network('default')
2016-07-15 00:57:22 INFO config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/nova_compute_utils.py", line 608, in destroy_libvirt_network
2016-07-15 00:57:22 INFO config-changed out = check_output(['virsh', 'net-list']).split('\n')
2016-07-15 00:57:22 INFO config-changed File "/usr/lib/python2.7/subprocess.py", line 567, in check_output
2016-07-15 00:57:22 INFO config-changed process = Popen(stdout=PIPE, *popenargs, **kwargs)
2016-07-15 00:57:22 INFO config-changed File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
2016-07-15 00:57:22 INFO config-changed errread, errwrite)
2016-07-15 00:57:22 INFO config-changed File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
2016-07-15 00:57:22 INFO config-changed raise child_exception
2016-07-15 00:57:22 INFO config-changed OSError: [Errno 2] No such file or directory
2016-07-15 00:57:22 INFO juju.worker.uniter.context context.go:579 handling reboot
2016-07-15 00:57:22 ERROR juju.worker.uniter.operation runhook.go:107 hook "config-changed" failed: exit status 1
2016-07-15 00:57:22 DEBUG juju.worker.uniter modes.go:31 [AGENT-STATUS] failed: run config-changed hook

Tags: uosci
Ryan Beisner (1chb1n)
Changed in nova-compute (Juju Charms Collection):
milestone: none → 16.07
importance: Undecided → Critical
status: New → In Progress
assignee: nobody → David Ames (thedac)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-compute (master)

Reviewed: https://review.openstack.org/342963
Committed: https://git.openstack.org/cgit/openstack/charm-nova-compute/commit/?id=39d0628dfb49d7b7b008c90bb07c9ef5b390767d
Submitter: Jenkins
Branch: master

commit 39d0628dfb49d7b7b008c90bb07c9ef5b390767d
Author: David Ames <email address hidden>
Date: Fri Jul 15 10:01:48 2016 -0700

    Add exception handling for unavailable virsh

    When virt-type is lxd libvirt-bin is not installed. The call to
    destroy_libvirt_network fails because virsh is not available.

    Add exception handling to destroy_libvirt_network when virt-type is lxd and
    virsh is unavailable.

    Closes-Bug: 1603566
    Change-Id: I448598d5160c183de46938999db1c9d5232b80b2

Changed in nova-compute (Juju Charms Collection):
status: In Progress → Fix Committed
Liam Young (gnuoy)
Changed in nova-compute (Juju Charms Collection):
status: Fix Committed → Fix Released
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.