Revert "Add nova placement to placement migration"
Since we are in U cycle now, we code for migrating placement is not needed anymore. This partially reverts commit cd32d15cc0cdae0a1e35b6ad81922163bd2ec07c Depends-On: https://review.opendev.org/693841 Change-Id: Ie7b675a2b24ee722c8cac228765f52bfb16de4bd
This commit is contained in:
parent
be43605882
commit
5734207630
@ -187,13 +187,11 @@ Upgrade infrastructure
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
We can now go ahead with the upgrade of all the infrastructure components. To
|
||||
ensure that rabbitmq and mariadb are upgraded, and to handle the transition
|
||||
from the nova placement service to the extracted placement service, we pass
|
||||
the appropriate flags.
|
||||
ensure that rabbitmq and mariadb are upgraded, we pass the appropriate flags.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# openstack-ansible setup-infrastructure.yml -e 'galera_upgrade=true' -e 'rabbitmq_upgrade=true' -e 'placement_migrate_flag=true'
|
||||
# openstack-ansible setup-infrastructure.yml -e 'galera_upgrade=true' -e 'rabbitmq_upgrade=true'
|
||||
|
||||
With this complete, we can now restart the mariadb containers one at a time,
|
||||
ensuring that each is started, responding, and synchronized with the other
|
||||
@ -208,21 +206,8 @@ ensuring that the containers are restarted in a controlled fashion.
|
||||
Upgrade OpenStack
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
We can now go ahead with the upgrade of all the OpenStack components, passing
|
||||
the flag that enabled the transition from the nova placement service to the
|
||||
extracted placement service.
|
||||
We can now go ahead with the upgrade of all the OpenStack components.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# openstack-ansible setup-openstack.yml -e 'placement_migrate_flag=true'
|
||||
|
||||
Remove legacy nova placement service backends
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Now that the new extracted placement service is operational, we can remove the
|
||||
legacy implementation from the load balancer.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# openstack-ansible haproxy-install.yml
|
||||
|
||||
# openstack-ansible setup-openstack.yml
|
||||
|
@ -35,20 +35,7 @@
|
||||
include_tasks: common-tasks/package-cache-proxy.yml
|
||||
when: install_method == "source"
|
||||
|
||||
- name: Stop nova-placement-api services for the upgrade
|
||||
delegate_to: "{{ item }}"
|
||||
service:
|
||||
name: nova-placement-api
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: placement_migrate_flag | default(False)
|
||||
with_items: "{{ groups['nova_api_placement'] }}"
|
||||
run_once: true
|
||||
ignore_errors: true
|
||||
|
||||
roles:
|
||||
- role: "galera_client"
|
||||
when: placement_migrate_flag | default(False)
|
||||
- role: "os_placement"
|
||||
- role: "system_crontab_coordination"
|
||||
tags:
|
||||
|
@ -169,7 +169,7 @@ function main {
|
||||
|
||||
pushd ${MAIN_PATH}/playbooks
|
||||
RUN_TASKS+=("${SCRIPTS_PATH}/upgrade-utilities/pip-conf-removal.yml")
|
||||
RUN_TASKS+=("${SCRIPTS_PATH}/upgrade-utilities/deploy-config-changes.yml -e 'placement_migrate_flag=true'")
|
||||
RUN_TASKS+=("${SCRIPTS_PATH}/upgrade-utilities/deploy-config-changes.yml")
|
||||
# we don't want to trigger container restarts for galera and rabbit
|
||||
# but as there will be no hosts available for metal deployments,
|
||||
# as a fallback option we just run setup-hosts.yml without any arguments
|
||||
@ -177,13 +177,11 @@ function main {
|
||||
openstack-ansible setup-hosts.yml -e 'lxc_container_allow_restarts=false' --limit 'galera_all:rabbitmq_all' || \
|
||||
openstack-ansible setup-hosts.yml")
|
||||
# upgrade infrastructure
|
||||
RUN_TASKS+=("setup-infrastructure.yml -e 'galera_upgrade=true' -e 'rabbitmq_upgrade=true' -e 'placement_migrate_flag=true'")
|
||||
RUN_TASKS+=("setup-infrastructure.yml -e 'galera_upgrade=true' -e 'rabbitmq_upgrade=true'")
|
||||
# explicitly perform controlled galera cluster restart with new lxc config
|
||||
RUN_TASKS+=("${SCRIPTS_PATH}/upgrade-utilities/galera-cluster-rolling-restart.yml")
|
||||
# upgrade openstack
|
||||
RUN_TASKS+=("setup-openstack.yml -e 'placement_migrate_flag=true'")
|
||||
# run haproxy setup again without the placement migrate flag to remove the nova placement api backends
|
||||
RUN_TASKS+=("haproxy-install.yml")
|
||||
RUN_TASKS+=("setup-openstack.yml")
|
||||
# Run the tasks in order
|
||||
for item in ${!RUN_TASKS[@]}; do
|
||||
echo "### NOW RUNNING: ${RUN_TASKS[$item]}"
|
||||
|
@ -97,30 +97,3 @@
|
||||
state: absent
|
||||
tags:
|
||||
- remove-fact-cache
|
||||
|
||||
- name: Define placement service hosts
|
||||
copy:
|
||||
dest: /etc/openstack_deploy/conf.d/placement.yml
|
||||
content: |-
|
||||
{% set config = {'placement-infra_hosts': {}} %}
|
||||
{% for host in groups['compute-infra_hosts'] %}
|
||||
{% set _ = config['placement-infra_hosts'].update(
|
||||
{
|
||||
host: {
|
||||
'ip': hostvars[host]['container_address']
|
||||
}
|
||||
}
|
||||
) %}
|
||||
{% endfor %}
|
||||
{{ config | to_yaml }}
|
||||
when:
|
||||
- placement_migrate_flag | default(False)
|
||||
- not ('placement-infra_hosts' in groups and groups['placement-infra_hosts'])
|
||||
|
||||
- name: Set placement service is_metal property
|
||||
copy:
|
||||
dest: /etc/openstack_deploy/env.d/placement_metal.yml
|
||||
content: "{{ '---\n' ~ {'container_skel': {'placement_container': {'properties': {'is_metal': true}}}} | to_yaml }}"
|
||||
when:
|
||||
- placement_migrate_flag | default(False)
|
||||
- hostvars[groups['nova_api_placement'][0]]['is_metal'] | default(False)
|
Loading…
x
Reference in New Issue
Block a user