-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nova: Refactor mariadb pre-checks, add post-checks
Get services topology specific configuration in pull_openstack_configuration. Add missing role for that as well. Split maridb source vs podified env vars shell headers to use it in corresponding places. Update and fix the composition of the services pre-check list to execute it before stopping services. Update and fix the composition of the list of the services to be stopped (cannot pull data from stopped services). 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 <[email protected]>
- Loading branch information
Showing
16 changed files
with
370 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,9 @@ The values are just illustrative, use values that are correct for your environme | |
|
||
```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 [email protected]" | ||
|
||
alias openstack="oc exec -t openstackclient -- openstack" | ||
``` | ||
|
||
## Pre-checks | ||
|
@@ -453,3 +456,21 @@ later on. | |
oc exec -it nova-cell1-conductor-0 -- nova-manage db online_data_migrations | ||
``` | ||
* Verify no Nova compute dataplane disruptions during the adoption/upgrade process: | ||
```bash | ||
$CONTROLLER_SSH sudo podman exec -it libvirt_virtqemud virsh list --all | grep 'instance-00000001 running' | ||
``` | ||
* Verify if Nova services control the existing VM instance: | ||
```bash | ||
openstack server list | grep -qF '| test | ACTIVE |' && openstack server stop test | ||
openstack server list | grep -qF '| test | SHUTOFF |' | ||
$CONTROLLER_SSH sudo podman exec -it libvirt_virtqemud virsh list --all | grep 'instance-00000001 shut off' | ||
openstack server list | grep -qF '| test | SHUTOFF |' && openstack server start test | ||
openstack server list | grep -F '| test | ACTIVE |' | ||
$CONTROLLER_SSH sudo podman exec -it libvirt_virtqemud virsh list --all | grep 'instance-00000001 running' | ||
``` | ||
Note that in this guide, the same host acts as a controller, and also as a compute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
- 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 MariaDB copy shell vars | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.set_fact: | ||
mariadb_copy_shell_vars_dst: | | ||
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 }}" | ||
# The CHARACTER_SET and collation should match the source DB | ||
# if the do not then it will break foreign key relationships | ||
# for any tables that are created in the future as part of db sync | ||
CHARACTER_SET=utf8 | ||
COLLATION=utf8_general_ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- name: set src MariaDB copy shell vars | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.set_fact: | ||
mariadb_copy_shell_vars_src: | | ||
MARIADB_IMAGE=quay.io/podified-antelope-centos9/openstack-mariadb:current-podified | ||
# TODO: remove the default(external_...) when CI is transitioned to use 'source_...' | ||
SOURCE_MARIADB_IP={{ source_mariadb_ip|default(external_mariadb_ip) }} | ||
SOURCE_DB_ROOT_PASSWORD="{{ source_db_root_password|default(external_db_root_password) }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.