DIsabling nova on undercloud does not stop nova_compute container

Bug #1893335 reported by Rabi Mishra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
In Progress
High
Rabi Mishra

Bug Description

When testing nova less deploy (i.e disabling nova on the undercloud by setting enable_nova=false in undercloud.conf after the first deploy with nova), nova-compute container is left behind running after undercloud install.

3cc1b8b39db0 undercloud.ctlplane.mydomain.tld:8787/tripleomaster/centos-binary-nova-compute-ironic:current-tripleo kolla_start 52 minutes ago Up 52 minutes ago nova_compute

and the wrapper systemd service (tripleo_nova_compute) is still running.

There is only one startup config left
[CentOS-8.2 - root@undercloud ~]# ls /var/lib/tripleo-config/container-startup-config/step_5/
mistral_db_populate.json

And it seems we've some logic in needs_delete filter not to clean orphaned containers when there is only one config or no config.

https://github.com/openstack/tripleo-ansible/blob/master/tripleo_ansible/ansible_plugins/filter/helpers.py#L119-L126

So, there seems to be 2 issues:

1. When there is 1 config for a step, orphaned containers are not cleaned.
2. When there is no config for a step (ex. when both nova and mistral are disabled and there is no startup config for step5), it seems contents of
/var/lib/tripleo-config/container-startup-config/step_5/ are not cleaned. Hence none of the containers are stopped.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (master)

Fix proposed to branch: master
Review: https://review.opendev.org/748598

Changed in tripleo:
status: Triaged → In Progress
Changed in tripleo:
milestone: none → victoria-3
Revision history for this message
Alex Schultz (alex-schultz) wrote :

Historically if you needed to cleanup a service after disabling it, you would need to provide a disabled service definition that did the cleanup explicitly. I don't think we should automagically clean things up if not provided as some folks do this intentionally (for whatever reason)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (master)

Reviewed: https://review.opendev.org/748598
Committed: https://git.openstack.org/cgit/openstack/tripleo-ansible/commit/?id=1b93165288341659c956cdf71fa1903d62d61d7e
Submitter: Zuul
Branch: master

commit 1b93165288341659c956cdf71fa1903d62d61d7e
Author: Rabi Mishra <email address hidden>
Date: Fri Aug 28 14:15:06 2020 +0530

    Expose tripleo_container_manage_clean_orphans var

    This exposes new var for tripleo_container_manage. Also,
    removes the check to force set clean_orphans=True in
    needs_delete filter, when there is one or no item in
    the startup config.

    There is a possibility when disabling services, there would
    be one or zero container_startup_configs for a step.

    Partial-Bug: #1893335
    Change-Id: I9d08168015487c48d8b380a9575ba236b7fb7d0d

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/749176

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/749179

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (stable/train)

Reviewed: https://review.opendev.org/749179
Committed: https://git.openstack.org/cgit/openstack/tripleo-ansible/commit/?id=a1f78497daad5c5bf22a5828118da724a3f1af66
Submitter: Zuul
Branch: stable/train

commit a1f78497daad5c5bf22a5828118da724a3f1af66
Author: Rabi Mishra <email address hidden>
Date: Fri Aug 28 14:15:06 2020 +0530

    Expose tripleo_container_manage_clean_orphans var

    This exposes new var for tripleo_container_manage. Also,
    removes the check to force set clean_orphans=True in
    needs_delete filter, when there is one or no item in
    the startup config.

    There is a possibility when disabling services, there would
    be one or zero container_startup_configs for a step.

    Partial-Bug: #1893335
    Change-Id: I9d08168015487c48d8b380a9575ba236b7fb7d0d
    (cherry picked from commit 1b93165288341659c956cdf71fa1903d62d61d7e)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (stable/ussuri)

Reviewed: https://review.opendev.org/749176
Committed: https://git.openstack.org/cgit/openstack/tripleo-ansible/commit/?id=17e6d8c82be168bf6b059ee32e37387659e31f8c
Submitter: Zuul
Branch: stable/ussuri

commit 17e6d8c82be168bf6b059ee32e37387659e31f8c
Author: Rabi Mishra <email address hidden>
Date: Fri Aug 28 14:15:06 2020 +0530

    Expose tripleo_container_manage_clean_orphans var

    This exposes new var for tripleo_container_manage. Also,
    removes the check to force set clean_orphans=True in
    needs_delete filter, when there is one or no item in
    the startup config.

    There is a possibility when disabling services, there would
    be one or zero container_startup_configs for a step.

    Partial-Bug: #1893335
    Change-Id: I9d08168015487c48d8b380a9575ba236b7fb7d0d
    (cherry picked from commit 1b93165288341659c956cdf71fa1903d62d61d7e)

tags: added: in-stable-ussuri
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.