Fix 'Ensure DNF modules have the right stream'
This change solves bug [1]. Change introduces a new mandatory field to DnfStreams parameter and adjusts 'Ensure DNF modules have the right stream' task to use new field. New field is called distribution_version and its purpose is to choose modules enabled in centos8 or in centos9. DnfStreams parameter defines list of dnf module streams to be configured before updating packages both on undercloud and overcloud. [1]https://bugs.launchpad.net/tripleo/+bug/1968706 Change-Id: I3f7f3002c985b0b618ba30a2497635a33a318624
This commit is contained in:
parent
8cb7c81d20
commit
86d4a348a3
@ -108,8 +108,8 @@ parameters:
|
|||||||
default: []
|
default: []
|
||||||
description: List of streams to be configured before updating packages. Each list
|
description: List of streams to be configured before updating packages. Each list
|
||||||
element contains a dictionary with the following values defined
|
element contains a dictionary with the following values defined
|
||||||
module[mandatory], stream[mandatory] and profile[optional]. If the profile
|
module[mandatory], stream[mandatory], distribution_version[mandatory] and profile[optional].
|
||||||
is not specified 'common' will be used instead.
|
If the profile is not specified 'common' will be used instead.
|
||||||
type: json
|
type: json
|
||||||
tags:
|
tags:
|
||||||
- role_specific
|
- role_specific
|
||||||
@ -282,8 +282,9 @@ outputs:
|
|||||||
state: present
|
state: present
|
||||||
loop: "{{ dnf_module_list|list }}"
|
loop: "{{ dnf_module_list|list }}"
|
||||||
when:
|
when:
|
||||||
- ansible_facts['distribution_major_version'] is version('8', '>=')
|
|
||||||
- dnf_module_list|length > 0
|
- dnf_module_list|length > 0
|
||||||
|
- item.distribution_version is defined
|
||||||
|
- ansible_facts['distribution_major_version'] is version(item.distribution_version, '==')
|
||||||
- name: Ensure TripleO prerequisite packages are installed
|
- name: Ensure TripleO prerequisite packages are installed
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
@ -401,8 +402,9 @@ outputs:
|
|||||||
loop: "{{ dnf_module_list|list }}"
|
loop: "{{ dnf_module_list|list }}"
|
||||||
when:
|
when:
|
||||||
- step|int == 0
|
- step|int == 0
|
||||||
- ansible_facts['distribution_major_version'] is version('8', '>=')
|
|
||||||
- dnf_module_list|length > 0
|
- dnf_module_list|length > 0
|
||||||
|
- item.distribution_version is defined
|
||||||
|
- ansible_facts['distribution_major_version'] is version(item.distribution_version, '==')
|
||||||
- name: Check for existing yum.pid
|
- name: Check for existing yum.pid
|
||||||
stat: path=/run/yum.pid
|
stat: path=/run/yum.pid
|
||||||
register: yum_pid_file
|
register: yum_pid_file
|
||||||
|
@ -37,8 +37,8 @@ parameters:
|
|||||||
default: []
|
default: []
|
||||||
description: List of streams to be configured before updating packages. Each list
|
description: List of streams to be configured before updating packages. Each list
|
||||||
element contains a dictionary with the following values defined
|
element contains a dictionary with the following values defined
|
||||||
module[mandatory], stream[mandatory] and profile[optional]. If the profile
|
module[mandatory], stream[mandatory], distribution_version[mandatory] and profile[optional].
|
||||||
is not specified 'common' will be used instead.
|
If the profile is not specified 'common' will be used instead.
|
||||||
type: json
|
type: json
|
||||||
tags:
|
tags:
|
||||||
- role_specific
|
- role_specific
|
||||||
@ -72,8 +72,9 @@ outputs:
|
|||||||
loop: "{{ dnf_module_list|list }}"
|
loop: "{{ dnf_module_list|list }}"
|
||||||
when:
|
when:
|
||||||
- step|int == 0
|
- step|int == 0
|
||||||
- ansible_facts['distribution_major_version'] is version('8', '==')
|
|
||||||
- dnf_module_list|length > 0
|
- dnf_module_list|length > 0
|
||||||
|
- item.distribution_version is defined
|
||||||
|
- ansible_facts['distribution_major_version'] is version(item.distribution_version, '==')
|
||||||
- name: Clean up Nova containers
|
- name: Clean up Nova containers
|
||||||
when: step|int == 0
|
when: step|int == 0
|
||||||
block:
|
block:
|
||||||
|
@ -5,4 +5,4 @@ resource_registry:
|
|||||||
|
|
||||||
parameter_defaults:
|
parameter_defaults:
|
||||||
UndercloudUpgrade: true
|
UndercloudUpgrade: true
|
||||||
DnfStreams: [{'module':'container-tools', 'stream':'3.0'}]
|
DnfStreams: [{'module':'container-tools', 'stream':'3.0', 'distribution_version':'8'}]
|
||||||
|
@ -7,4 +7,4 @@ resource_registry:
|
|||||||
|
|
||||||
parameter_defaults:
|
parameter_defaults:
|
||||||
CephAnsiblePlaybook: default
|
CephAnsiblePlaybook: default
|
||||||
DnfStreams: [{'module':'container-tools', 'stream':'3.0'}]
|
DnfStreams: [{'module':'container-tools', 'stream':'3.0', 'distribution_version':'8'}]
|
||||||
|
@ -17,4 +17,4 @@ parameter_defaults:
|
|||||||
UpgradeInitCommonCommand: |
|
UpgradeInitCommonCommand: |
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eu
|
set -eu
|
||||||
DnfStreams: [{'module':'container-tools', 'stream':'3.0'}]
|
DnfStreams: [{'module':'container-tools', 'stream':'3.0', 'distribution_version':'8'}]
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
other:
|
||||||
|
- |
|
||||||
|
Mandatory fields of DnfStreams parameter was extended with new field
|
||||||
|
'distribution_version' which specifies distribution version of the OS
|
||||||
|
to check against during enabled dnf streams check. DnfStreams parameter
|
||||||
|
defines list of dnf module streams to be configured before updating
|
||||||
|
packages both on undercloud and overcloud.
|
Loading…
Reference in New Issue
Block a user