-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ovs/externalids/osdiff #418
Changes from all commits
a0910b4
4a0297f
61f213c
217c554
dc5bea6
c8b5e94
17b48d9
2108d34
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
oc get -n openstack-operators pod -l app.kubernetes.io/name=openstack-ansibleee-operator -o name | ||
register: old_ansibleee_operator_pod | ||
|
||
- name: use ansible-runner image built from source or latest if none is defined | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
|
@@ -228,11 +228,11 @@ | |
playbook: osp.edpm.nova | ||
EOF | ||
|
||
- name: Create OpenStackDataPlaneNodeSet | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
oc apply -f - <<EOF | ||
cat <<EOF > edpm-crd.yaml | ||
apiVersion: dataplane.openstack.org/v1beta1 | ||
kind: OpenStackDataPlaneNodeSet | ||
metadata: | ||
|
@@ -341,6 +341,18 @@ | |
edpm_ovn_ofctrl_wait_before_clear: 8000 | ||
EOF | ||
|
||
- name: check ovs external-ids with os-diff before deployment | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ os_diff_dir }}/os-diff diff {{ os_diff_data_dir }}/tripleo/ovs_external_ids/standalone/ovs_external_ids.json edpm-crd.yaml --crd --service ovs_external_ids -f ${PWD}/{{ os_diff_dir }}/config.yaml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fails as TASK [dataplane_adoption : check ovs external-ids with os-diff before deployment] *** I guess it needs to be reverted There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's strange though is that this PR passed CI at merge time. So perhaps we could disable the failing test if we need to, but i wouldn't revert 418 as some of the refactorings (e.g. the order in which things happen) are quite fundamental and i don't think reverting them would be necessary. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we should revert this PR, the issue pointed here is because the version of os-diff used is very old: 9bfd05cafd41d46df3a0c94b5ac781b54646eea6 from Mar 1. |
||
|
||
- name: deploy dataplane | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
cat edpm-crd.yaml | oc apply -f - | ||
|
||
# TODO: Apply the ceph backend config for Cinder in the original openstack CR, via kustomize | ||
- name: prepare adopted EDPM workloads to use Ceph backend for Cinder, if configured so | ||
no_log: "{{ use_no_log }}" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dependencies: | ||
- role: common_defaults |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Pull nova configuration steps | ||
- name: set shell vars pull openstack configuration ssh commands | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.set_fact: | ||
pull_openstack_configuration_ssh_shell_vars: | | ||
CONTROLLER_SSH="{{ controller1_ssh }}" | ||
|
||
- name: get src database service environment variables | ||
ansible.builtin.include_role: | ||
name: mariadb_copy | ||
tasks_from: env_vars_src.yaml | ||
|
||
# NOTE(bogdando): env variables must be used to keep this consistent with documentation, | ||
# where the stored values need to be compared with post-adoption ones w/o using ansible specifics | ||
- name: test connection to the original DB | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
{{ mariadb_copy_shell_vars_src }} | ||
export PULL_OPENSTACK_CONFIGURATION_DATABASES=$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysql -rsh "$SOURCE_MARIADB_IP" -uroot -p"$SOURCE_DB_ROOT_PASSWORD" -e 'SHOW databases;') | ||
echo "$PULL_OPENSTACK_CONFIGURATION_DATABASES" | ||
register: _databases_check | ||
|
||
- name: run mysqlcheck on the original DB to look for things that are not OK | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
{{ mariadb_copy_shell_vars_src }} | ||
export PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK=$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysqlcheck --all-databases -h "${SOURCE_MARIADB_IP}" -uroot -p"${SOURCE_DB_ROOT_PASSWORD}" | grep -v OK) | ||
echo "$PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK" | ||
failed_when: _mysqlnok_check.stdout != '' | ||
register: _mysqlnok_check | ||
|
||
- name: get source Nova services topology specific configuration | ||
no_log: "{{ use_no_log }}" | ||
block: | ||
- name: get Nova cells mappings from database | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
{{ mariadb_copy_shell_vars_src }} | ||
export PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS=$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysql -rsh "${SOURCE_MARIADB_IP}" -uroot -p"${SOURCE_DB_ROOT_PASSWORD}" nova_api -e \ | ||
'select uuid,name,transport_url,database_connection,disabled from cell_mappings;') | ||
echo "$PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS" | ||
register: _novadb_mapped_cells_check | ||
|
||
- name: get the host names of the registered Nova compute services | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
{{ mariadb_copy_shell_vars_src }} | ||
export PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES=$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysql -rsh "$SOURCE_MARIADB_IP" -uroot -p"$SOURCE_DB_ROOT_PASSWORD" nova_api -e \ | ||
"select host from nova.services where services.binary='nova-compute';") | ||
echo "$PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES" | ||
register: _nova_compute_hostnames_check | ||
|
||
- name: get the list of mapped Nova cells | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ pull_openstack_configuration_ssh_shell_vars }} | ||
export PULL_OPENSTACK_CONFIGURATION_NOVAMANAGE_CELL_MAPPINGS=$($CONTROLLER_SSH sudo podman exec -it nova_api nova-manage cell_v2 list_cells) | ||
echo "$PULL_OPENSTACK_CONFIGURATION_NOVAMANAGE_CELL_MAPPINGS" | ||
register: _nova_cell_mappings_check | ||
|
||
- name: set cached fact for pulled openstack services configuration shell headers | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.set_fact: | ||
pulled_openstack_configuration_shell_headers: | | ||
PULL_OPENSTACK_CONFIGURATION_DATABASES="{{ _databases_check.stdout_lines | join(' ') }}" | ||
PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK="{{ _mysqlnok_check.stdout_lines | join(' ') }}" | ||
PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS="{{ _novadb_mapped_cells_check.stdout_lines | join(' ') }}" | ||
PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES="{{ _nova_compute_hostnames_check.stdout_lines | join(' ') }}" | ||
PULL_OPENSTACK_CONFIGURATION_NOVAMANAGE_CELL_MAPPINGS="{{ _nova_cell_mappings_check.stdout_lines | join(' ') }}" | ||
|
||
- name: store exported variables for future use | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
{{ mariadb_copy_shell_vars_src }} | ||
cat > ~/.source_cloud_exported_variables << EOF | ||
PULL_OPENSTACK_CONFIGURATION_DATABASES="$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysql -rsh $SOURCE_MARIADB_IP -uroot -p$SOURCE_DB_ROOT_PASSWORD -e 'SHOW databases;')" | ||
PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK="$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysqlcheck --all-databases -h $SOURCE_MARIADB_IP -u root -p$SOURCE_DB_ROOT_PASSWORD | grep -v OK)" | ||
PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS="$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysql -rsh $SOURCE_MARIADB_IP -uroot -p$SOURCE_DB_ROOT_PASSWORD nova_api -e \ | ||
'select uuid,name,transport_url,database_connection,disabled from cell_mappings;')" | ||
PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES="$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysql -rsh $SOURCE_MARIADB_IP -uroot -p$SOURCE_DB_ROOT_PASSWORD nova_api -e \ | ||
"select host from nova.services where services.binary='nova-compute';")" | ||
PULL_OPENSTACK_CONFIGURATION_NOVAMANAGE_CELL_MAPPINGS="$($CONTROLLER_SSH sudo podman exec -it nova_api nova-manage cell_v2 list_cells)" | ||
EOF | ||
chmod 0600 ~/.source_cloud_exported_variables |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
os_diff_etc_dir: /etc/os-diff | ||
os_diff_dir: tmp/os-diff | ||
os_diff_data_dir: tmp/os-diff/data | ||
os_diff_data_dir: tmp/os-diff | ||
source_os_diff_config_ip: 192.168.122.100 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,103 +1,2 @@ | ||
- name: Run os_diff pull config tasks | ||
ansible.builtin.include_tasks: os_diff_pull_config.yaml | ||
|
||
# Pull nova configuration steps | ||
- name: set shell vars pull openstack configuration ssh commands | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.set_fact: | ||
pull_openstack_configuration_ssh_shell_vars: | | ||
CONTROLLER_SSH="{{ controller1_ssh }}" | ||
|
||
- name: get src database service environment variables | ||
ansible.builtin.include_role: | ||
name: mariadb_copy | ||
tasks_from: env_vars_src.yaml | ||
|
||
# NOTE(bogdando): env variables must be used to keep this consistent with documentation, | ||
# where the stored values need to be compared with post-adoption ones w/o using ansible specifics | ||
- name: test connection to the original DB | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
{{ mariadb_copy_shell_vars_src }} | ||
export PULL_OPENSTACK_CONFIGURATION_DATABASES=$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysql -rsh "$SOURCE_MARIADB_IP" -uroot -p"$SOURCE_DB_ROOT_PASSWORD" -e 'SHOW databases;') | ||
echo "$PULL_OPENSTACK_CONFIGURATION_DATABASES" | ||
register: _databases_check | ||
|
||
- name: run mysqlcheck on the original DB to look for things that are not OK | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
{{ mariadb_copy_shell_vars_src }} | ||
export PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK=$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysqlcheck --all-databases -h "${SOURCE_MARIADB_IP}" -uroot -p"${SOURCE_DB_ROOT_PASSWORD}" | grep -v OK) | ||
echo "$PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK" | ||
failed_when: _mysqlnok_check.stdout != '' | ||
register: _mysqlnok_check | ||
|
||
- name: get source Nova services topology specific configuration | ||
no_log: "{{ use_no_log }}" | ||
block: | ||
- name: get Nova cells mappings from database | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
{{ mariadb_copy_shell_vars_src }} | ||
export PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS=$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysql -rsh "${SOURCE_MARIADB_IP}" -uroot -p"${SOURCE_DB_ROOT_PASSWORD}" nova_api -e \ | ||
'select uuid,name,transport_url,database_connection,disabled from cell_mappings;') | ||
echo "$PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS" | ||
register: _novadb_mapped_cells_check | ||
|
||
- name: get the host names of the registered Nova compute services | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
{{ mariadb_copy_shell_vars_src }} | ||
export PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES=$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysql -rsh "$SOURCE_MARIADB_IP" -uroot -p"$SOURCE_DB_ROOT_PASSWORD" nova_api -e \ | ||
"select host from nova.services where services.binary='nova-compute';") | ||
echo "$PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES" | ||
register: _nova_compute_hostnames_check | ||
|
||
- name: get the list of mapped Nova cells | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ pull_openstack_configuration_ssh_shell_vars }} | ||
export PULL_OPENSTACK_CONFIGURATION_NOVAMANAGE_CELL_MAPPINGS=$($CONTROLLER_SSH sudo podman exec -it nova_api nova-manage cell_v2 list_cells) | ||
echo "$PULL_OPENSTACK_CONFIGURATION_NOVAMANAGE_CELL_MAPPINGS" | ||
register: _nova_cell_mappings_check | ||
|
||
- name: set cached fact for pulled openstack services configuration shell headers | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.set_fact: | ||
pulled_openstack_configuration_shell_headers: | | ||
PULL_OPENSTACK_CONFIGURATION_DATABASES="{{ _databases_check.stdout_lines | join(' ') }}" | ||
PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK="{{ _mysqlnok_check.stdout_lines | join(' ') }}" | ||
PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS="{{ _novadb_mapped_cells_check.stdout_lines | join(' ') }}" | ||
PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES="{{ _nova_compute_hostnames_check.stdout_lines | join(' ') }}" | ||
PULL_OPENSTACK_CONFIGURATION_NOVAMANAGE_CELL_MAPPINGS="{{ _nova_cell_mappings_check.stdout_lines | join(' ') }}" | ||
|
||
- name: store exported variables for future use | ||
no_log: "{{ use_no_log }}" | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
{{ mariadb_copy_shell_vars_src }} | ||
cat > ~/.source_cloud_exported_variables << EOF | ||
PULL_OPENSTACK_CONFIGURATION_DATABASES="$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysql -rsh $SOURCE_MARIADB_IP -uroot -p$SOURCE_DB_ROOT_PASSWORD -e 'SHOW databases;')" | ||
PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK="$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysqlcheck --all-databases -h $SOURCE_MARIADB_IP -u root -p$SOURCE_DB_ROOT_PASSWORD | grep -v OK)" | ||
PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS="$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysql -rsh $SOURCE_MARIADB_IP -uroot -p$SOURCE_DB_ROOT_PASSWORD nova_api -e \ | ||
'select uuid,name,transport_url,database_connection,disabled from cell_mappings;')" | ||
PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES="$(oc run mariadb-client -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ | ||
mysql -rsh $SOURCE_MARIADB_IP -uroot -p$SOURCE_DB_ROOT_PASSWORD nova_api -e \ | ||
"select host from nova.services where services.binary='nova-compute';")" | ||
PULL_OPENSTACK_CONFIGURATION_NOVAMANAGE_CELL_MAPPINGS="$($CONTROLLER_SSH sudo podman exec -it nova_api nova-manage cell_v2 list_cells)" | ||
EOF | ||
chmod 0600 ~/.source_cloud_exported_variables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This edpm-crd.yaml file is then not used anywhere below to actually create the NodeSet? I think we need an
oc apply
call that would use this file?