From d591e29deb817dfe7c321e88735c35acff626772 Mon Sep 17 00:00:00 2001 From: Bohdan Dobrelia Date: Mon, 6 Nov 2023 16:14:44 +0100 Subject: [PATCH] Nova services FFU during adoption (no extra cell) Update EDPM adoption docs and tests to execute Nova compute post-FFU. Verify no dataplane disruptions during the FFU/adoption process. Verify Nova services still control pre-created VM workload after FFU/adotpion is done. Signed-off-by: Bohdan Dobrelia --- docs/openstack/edpm_adoption.md | 203 ++++++++++++++++- docs/openstack/nova_adoption.md | 2 +- .../roles/dataplane_adoption/tasks/main.yaml | 4 + .../dataplane_adoption/tasks/nova_ffu.yaml | 208 ++++++++++++++++++ 4 files changed, 415 insertions(+), 2 deletions(-) create mode 100644 tests/roles/dataplane_adoption/tasks/nova_ffu.yaml diff --git a/docs/openstack/edpm_adoption.md b/docs/openstack/edpm_adoption.md index e020852d0..1ae507efb 100644 --- a/docs/openstack/edpm_adoption.md +++ b/docs/openstack/edpm_adoption.md @@ -6,7 +6,15 @@ ## Variables -(There are no shell variables necessary currently.) +Define the shell variables used in the Fast-forward upgrade steps below. +The values are just illustrative, use values that are correct for your environment: + +```bash +PODIFIED_DB_ROOT_PASSWORD=$(oc get -o json secret/osp-secret | jq -r .data.DbRootPassword | base64 -d) +CONTROLLER_SSH="ssh -i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa root@192.168.122.100" + +alias openstack="oc exec -t openstackclient -- openstack" +``` ## Pre-checks @@ -263,3 +271,196 @@ EOF ``` oc wait --for condition=Ready osdpns/openstack --timeout=30m ``` + +## Nova compute services fast-forward upgrade from Wallaby to Antelope + +Nova services rolling upgrade cannot be done during adoption, +there is in a lock-step with Nova control plane services, because those +are managed independently by EDPM ansible, and Kubernetes operators. +Nova service operator and OpenStack Dataplane operator ensure upgrading +is done independently of each other, by configuring +`[upgrade_levels]compute=auto` for Nova services. Nova control plane +services apply the change right after CR is patched. Nova compute EDPM +services will catch up the same config change with ansible deployment +later on. + +> **NOTE**: Additional orchestration happening around the FFU workarounds +> configuration for Nova compute EDPM service is a subject of future changes. + +* Configure pre-FFU workarounds for Nova compute EDPM services to update its version records: + + ```yaml + oc apply -f - <Antelope FFU + ansible.builtin.include_tasks: + file: nova_ffu.yaml diff --git a/tests/roles/dataplane_adoption/tasks/nova_ffu.yaml b/tests/roles/dataplane_adoption/tasks/nova_ffu.yaml new file mode 100644 index 000000000..6083c4b76 --- /dev/null +++ b/tests/roles/dataplane_adoption/tasks/nova_ffu.yaml @@ -0,0 +1,208 @@ +- name: get podified MariaDB service cluster IP + ansible.builtin.shell: | + {{ shell_header }} + {{ oc_header oc get svc --selector "cr=mariadb-openstack" -ojsonpath='{.items[0].spec.clusterIP}' + register: podified_mariadb_ip_result + +- name: get podified cell1 MariaDB IP + ansible.builtin.shell: | + {{ shell_header }} + {{ oc_header }} + oc get svc --selector "cr=mariadb-openstack-cell1" -ojsonpath='{.items[0].spec.clusterIP}' + register: podified_cell1_mariadb_ip_result + +- name: set podified MariaDB copy shell vars + no_log: "{{ use_no_log }}" + ansible.builtin.set_fact: + mariadb_copy_shell_vars: | + PODIFIED_MARIADB_IP={{ podified_mariadb_ip_result.stdout }} + PODIFIED_CELL1_MARIADB_IP={{podified_cell1_mariadb_ip_result.stdout}} + PODIFIED_DB_ROOT_PASSWORD="{{ podified_db_root_password }}" + +- name: configure pre-FFU workarounds for Nova compute EDPM services to update its version records + ansible.builtin.shell: | + {{ shell_header }} + {{ oc_header }} + oc apply -f - <antelope FFU + ansible.builtin.shell: | + {{ shell_header }} + {{ oc_header }} + oc exec -it nova-cell0-conductor-0 -- nova-manage db online_data_migrations + oc exec -it nova-cell1-conductor-0 -- nova-manage db online_data_migrations + register: nova_exec_result + until: nova_exec_result is success + retries: 10 + delay: 6 + +- name: Adopted Nova FFU post-checks + ansible.builtin.include_role: + name: nova_adoption + tasks_from: verify.yaml