juju-deployer model teardown skips machine 0

Bug #1713949 reported by James Page
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Charm Test Infra
Fix Released
Medium
James Page
juju-deployer
Fix Released
Undecided
Unassigned

Bug Description

UOSCI makes use of bundletester, which uses juju-deployer to tear down services and units on a model; as part of this process it force terminates all machines *apart* from machine 0, which in a juju 2.0 model is no longer the controller.

This results in odd model recycle behaviour - if the application on machine 0 has a hook error as the rest of the model tears down, it will block the test execution.

Related branches

James Page (james-page)
Changed in charm-test-infra:
assignee: nobody → James Page (james-page)
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
James Page (james-page) wrote :

Example of this:

  https://review.openstack.org/#/c/497660

the hook is probably erroring due to the force termination of the other machines in the model; I'm not sure we need to fix anything in the charm per-say, but we do need to fixup juju-deploy to be more intelligent when tearing down models.

Revision history for this message
James Page (james-page) wrote :

Fairly easy to reproduce; using a fresh model deploy the attached bundle (based on the hacluster amulet tests).

Use the following code to reset the environment:

from deployer.env.go import GoEnvironment
environment = GoEnvironment('serverstack-serverstack:admin/keystone-teardown')
environment.reset(terminate_machines=True, terminate_delay=60, force_terminate=True)

environment will have all machines apart from machine 0 force terminated; machine 0 takes a while to clear down as the subordinate charm stops, and then the leader-settings-changed hook fails due to the forced teardown of machines.

I think the right fix is to have the deployer code also force terminate machine 0 for juju versions >= 2.0

Ryan Beisner (1chb1n)
Changed in juju-deployer:
status: New → In Progress
Ryan Beisner (1chb1n)
Changed in charm-test-infra:
status: In Progress → Fix Released
Changed in juju-deployer:
status: In Progress → 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.