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
(cherry picked from commit 9afe811ef4
)
This commit is contained in:
parent
a925b755a0
commit
979e59782b
@ -76,6 +76,14 @@ parameters:
|
|||||||
description: Timeout (seconds) for the OS upgrade phase via Leapp
|
description: Timeout (seconds) for the OS upgrade phase via Leapp
|
||||||
type: number
|
type: number
|
||||||
default: 1800
|
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:
|
UpgradeInitCommand:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
@ -125,7 +133,9 @@ outputs:
|
|||||||
- never
|
- never
|
||||||
- system_upgrade
|
- system_upgrade
|
||||||
- system_upgrade_prepare
|
- system_upgrade_prepare
|
||||||
when: step|int == 3
|
when:
|
||||||
|
- step|int == 3
|
||||||
|
- upgrade_leapp_enabled
|
||||||
block:
|
block:
|
||||||
- name: Hack around broken ceph-common rpm removing /etc/ceph /var/lib/ceph
|
- name: Hack around broken ceph-common rpm removing /etc/ceph /var/lib/ceph
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
@ -165,12 +175,24 @@ outputs:
|
|||||||
-python2-requests
|
-python2-requests
|
||||||
-python2-six
|
-python2-six
|
||||||
-python2-urllib3
|
-python2-urllib3
|
||||||
when: upgrade_leapp_enabled
|
|
||||||
- name: install leapp
|
- name: install leapp
|
||||||
package:
|
package:
|
||||||
name: leapp
|
name: leapp
|
||||||
state: latest
|
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
|
- name: system_upgrade_prepare step 4
|
||||||
tags:
|
tags:
|
||||||
|
@ -10,6 +10,8 @@ resource_registry:
|
|||||||
parameter_defaults:
|
parameter_defaults:
|
||||||
EnablePackageInstall: true
|
EnablePackageInstall: true
|
||||||
UpgradeLevelNovaCompute: auto
|
UpgradeLevelNovaCompute: auto
|
||||||
|
UpgradeLeappToRemove: ['openvswitch2.11','ovn2.11']
|
||||||
|
UpgradeLeappToInstall: ['openvswitch2.13','ovn2.13']
|
||||||
UpgradeInitCommonCommand: |
|
UpgradeInitCommonCommand: |
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eu
|
set -eu
|
||||||
|
Loading…
Reference in New Issue
Block a user