From 7f8b5c4d210913125e58fc2608b3c9e7d48f2f28 Mon Sep 17 00:00:00 2001 From: David Vallee Delisle Date: Mon, 11 Jan 2021 18:02:26 -0500 Subject: [PATCH] Deleting nova-consoleauth services in post-upgrade nova-consoleauth was removed in Stein. We need to delete the compute services during major upgrades. Related: https://bugzilla.redhat.com/1825849 Change-Id: I74465f5ae77a0666540d3465e2ad29b03f9bd3c3 (cherry picked from commit 04405abdd463163d5586e0b5c9bdff42ae436003) --- .../nova/nova-vnc-proxy-container-puppet.yaml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/deployment/nova/nova-vnc-proxy-container-puppet.yaml b/deployment/nova/nova-vnc-proxy-container-puppet.yaml index 5de1df073c..a2dce62930 100644 --- a/deployment/nova/nova-vnc-proxy-container-puppet.yaml +++ b/deployment/nova/nova-vnc-proxy-container-puppet.yaml @@ -20,6 +20,10 @@ parameters: description: Mapping of service endpoint -> protocol. Typically set via parameter_defaults in the resource registry. type: json + AdminPassword: + description: The password for the keystone admin account, used for monitoring, querying neutron etc. + type: string + hidden: true ServiceData: default: {} description: Dictionary packing service data @@ -369,6 +373,35 @@ outputs: state: present shell: /sbin/nologin comment: qemu user + post_upgrade_tasks: + - when: + - step|int == 5 + tags: + - never + - system_upgrade_stop_services + environment: + OS_USERNAME: admin + OS_USER_DOMAIN_NAME: "Default" + OS_PROJECT_DOMAIN_NAME: "Default" + OS_PROJECT_NAME: admin + OS_PASSWORD: { get_param: AdminPassword } + OS_AUTH_URL: { get_param: [EndpointMap, KeystoneV3Public, uri] } + OS_IDENTITY_API_VERSION: 3 + OS_AUTH_TYPE: password + block: + - name: Get nova-consoleauth service ID + command: openstack compute service list --service nova-consoleauth --column ID --column Host --format yaml + register: nova_compute_service_result + delegate_to: localhost + check_mode: no + run_once: yes + changed_when: false + - name: Deleting nova-consoleauth + command: "openstack compute service delete {{ item.ID }}" + loop: "{{ nova_compute_service_result.stdout | from_yaml }}" + run_once: yes + delegate_to: localhost + ignore_errors: yes external_upgrade_tasks: - when: - step|int == 1 @@ -384,3 +417,4 @@ outputs: tripleo_containers_to_stop: - nova_vnc_proxy tripleo_delegate_to: "{{ groups['nova_vnc_proxy'] | default([]) }}" +