Enable adding packages into Leapp's to_remove/to_install files.
Leapp enables removal and installing packages during the leapp upgrade, so that the change takes effect during the machines reboot. This patch adds a mechanism to configure that list of packages via two new heat parameters: UpgradeLeappToInstall and UpgradeLeappToRemove. Also, as part of the upgrade from Queens to Train, there is a big jump in the openvswitch versions, having ovs2.11 in Queens and ovs2.13 in Train, which are mutually exclusive. This package adds these two pacakges into the to_remove/ to_install mechanism so that the openvswitch package upgrade takes place during Leapps reboot to upgrade the Operating System. Change-Id: I2d07f19da68dd17b74189f273e75af3fe1d7a955
This commit is contained in:
parent
07e9f470d8
commit
9afe811ef4
@ -69,6 +69,14 @@ parameters:
|
||||
description: Timeout (seconds) for the OS upgrade phase via Leapp
|
||||
type: number
|
||||
default: 1800
|
||||
UpgradeLeappToRemove:
|
||||
default: []
|
||||
description: List of packages to remove during Leapp upgrade.
|
||||
type: comma_delimited_list
|
||||
UpgradeLeappToInstall:
|
||||
default: []
|
||||
description: List of packages to install after Leapp upgrade.
|
||||
type: comma_delimited_list
|
||||
UpgradeInitCommand:
|
||||
type: string
|
||||
description: |
|
||||
@ -112,7 +120,9 @@ outputs:
|
||||
- never
|
||||
- system_upgrade
|
||||
- system_upgrade_prepare
|
||||
when: step|int == 3
|
||||
when:
|
||||
- step|int == 3
|
||||
- upgrade_leapp_enabled
|
||||
block:
|
||||
- name: remove all OpenStack packages
|
||||
shell: |
|
||||
@ -124,12 +134,24 @@ outputs:
|
||||
-python2-jinja2 \
|
||||
-python2-markupsafe \
|
||||
-python2-six
|
||||
when: upgrade_leapp_enabled
|
||||
- name: install leapp
|
||||
package:
|
||||
name: leapp
|
||||
state: latest
|
||||
when: upgrade_leapp_enabled
|
||||
- name: "add packages into Leapp's to_remove file"
|
||||
vars:
|
||||
pkg_to_remove: { get_param: UpgradeLeappToRemove }
|
||||
lineinfile:
|
||||
path: "/etc/leapp/transaction/to_remove"
|
||||
line: "{{ item }}"
|
||||
loop: "{{ pkg_to_remove }}"
|
||||
- name: "add packages into Leapp's to_install file"
|
||||
vars:
|
||||
pkg_to_install: { get_param: UpgradeLeappToInstall }
|
||||
lineinfile:
|
||||
path: "/etc/leapp/transaction/to_install"
|
||||
line: "{{ item }}"
|
||||
loop: "{{ pkg_to_install }}"
|
||||
|
||||
- name: system_upgrade_prepare step 4
|
||||
tags:
|
||||
|
@ -11,6 +11,8 @@ parameter_defaults:
|
||||
EnablePackageInstall: true
|
||||
ServerDeletionPolicy: retain
|
||||
UpgradeLevelNovaCompute: auto
|
||||
UpgradeLeappToRemove: ['openvswitch2.11','ovn2.11']
|
||||
UpgradeLeappToInstall: ['openvswitch2.13','ovn2.13']
|
||||
UpgradeInitCommonCommand: |
|
||||
#!/bin/bash
|
||||
set -eu
|
||||
|
Loading…
Reference in New Issue
Block a user