Merge "Do not upgrade packages without upgrades"
This commit is contained in:
@@ -179,7 +179,7 @@ Once CA is generated, we can proceed with standard OpenStack upgrade steps:
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
# openstack-ansible setup-hosts.yml --limit '!galera_all:!rabbitmq_all'
|
# openstack-ansible setup-hosts.yml --limit '!galera_all:!rabbitmq_all' -e package_state=latest
|
||||||
|
|
||||||
This command is the same setting up hosts on a new installation. The
|
This command is the same setting up hosts on a new installation. The
|
||||||
``galera_all`` and ``rabbitmq_all`` host groups are excluded to prevent
|
``galera_all`` and ``rabbitmq_all`` host groups are excluded to prevent
|
||||||
@@ -201,7 +201,7 @@ ensure that rabbitmq and mariadb are upgraded, we pass the appropriate flags.
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
# openstack-ansible setup-infrastructure.yml -e 'galera_upgrade=true' -e 'rabbitmq_upgrade=true'
|
# openstack-ansible setup-infrastructure.yml -e 'galera_upgrade=true' -e 'rabbitmq_upgrade=true' -e package_state=latest
|
||||||
|
|
||||||
With this complete, we can now restart the mariadb containers one at a time,
|
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
|
ensuring that each is started, responding, and synchronized with the other
|
||||||
@@ -220,4 +220,4 @@ We can now go ahead with the upgrade of all the OpenStack components.
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
# openstack-ansible setup-openstack.yml
|
# openstack-ansible setup-openstack.yml -e package_state=latest
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ A minor upgrade typically requires the following steps:
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
# openstack-ansible setup-hosts.yml
|
# openstack-ansible setup-hosts.yml -e package_state=latest
|
||||||
|
|
||||||
#. Update the infrastructure:
|
#. Update the infrastructure:
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ A minor upgrade typically requires the following steps:
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
# openstack-ansible setup-openstack.yml
|
# openstack-ansible setup-openstack.yml -e package_state=latest
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|||||||
@@ -34,11 +34,7 @@ ssh_delay: 5
|
|||||||
management_address: "{{ container_address }}"
|
management_address: "{{ container_address }}"
|
||||||
openstack_service_bind_address: "{{ management_address }}"
|
openstack_service_bind_address: "{{ management_address }}"
|
||||||
|
|
||||||
# Set the package install state for distribution packages
|
package_state: "present"
|
||||||
# Options are 'present' and 'latest'.
|
|
||||||
# NOTE(mhayden): Allowing CentOS and openSUSE to use package_state=present should give
|
|
||||||
# gate jobs a better chance to finish and expose more issues to fix.
|
|
||||||
package_state: "{{ (ansible_facts['pkg_mgr'] in ['dnf', 'zypper']) | ternary('present', 'latest') }}"
|
|
||||||
|
|
||||||
# Set "/var/log" to be a bind mount to the physical host.
|
# Set "/var/log" to be a bind mount to the physical host.
|
||||||
default_bind_mount_logs: true
|
default_bind_mount_logs: true
|
||||||
|
|||||||
@@ -173,15 +173,15 @@ function main {
|
|||||||
# we don't want to trigger container restarts for galera and rabbit
|
# we don't want to trigger container restarts for galera and rabbit
|
||||||
# but as there will be no hosts available for metal deployments,
|
# but as there will be no hosts available for metal deployments,
|
||||||
# as a fallback option we just run setup-hosts.yml without any arguments
|
# as a fallback option we just run setup-hosts.yml without any arguments
|
||||||
RUN_TASKS+=("setup-hosts.yml --limit '!galera_all:!rabbitmq_all' && \
|
RUN_TASKS+=("setup-hosts.yml --limit '!galera_all:!rabbitmq_all' -e package_state=latest && \
|
||||||
openstack-ansible setup-hosts.yml -e 'lxc_container_allow_restarts=false' --limit 'galera_all:rabbitmq_all' || \
|
openstack-ansible setup-hosts.yml -e 'lxc_container_allow_restarts=false' --limit 'galera_all:rabbitmq_all' || \
|
||||||
openstack-ansible setup-hosts.yml")
|
openstack-ansible setup-hosts.yml -e package_state=latest")
|
||||||
# upgrade infrastructure
|
# upgrade infrastructure
|
||||||
RUN_TASKS+=("setup-infrastructure.yml -e 'galera_upgrade=true' -e 'rabbitmq_upgrade=true'")
|
RUN_TASKS+=("setup-infrastructure.yml -e 'galera_upgrade=true' -e 'rabbitmq_upgrade=true' -e package_state=latest")
|
||||||
# explicitly perform controlled galera cluster restart with new lxc config
|
# explicitly perform controlled galera cluster restart with new lxc config
|
||||||
RUN_TASKS+=("${SCRIPTS_PATH}/upgrade-utilities/galera-cluster-rolling-restart.yml")
|
RUN_TASKS+=("${SCRIPTS_PATH}/upgrade-utilities/galera-cluster-rolling-restart.yml")
|
||||||
# upgrade openstack
|
# upgrade openstack
|
||||||
RUN_TASKS+=("setup-openstack.yml")
|
RUN_TASKS+=("setup-openstack.yml -e package_state=latest")
|
||||||
# Run the tasks in order
|
# Run the tasks in order
|
||||||
for item in ${!RUN_TASKS[@]}; do
|
for item in ${!RUN_TASKS[@]}; do
|
||||||
echo "### NOW RUNNING: ${RUN_TASKS[$item]}"
|
echo "### NOW RUNNING: ${RUN_TASKS[$item]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user