Some packages weren't upgraded after cluster update to 9.2MU
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mirantis OpenStack |
Confirmed
|
High
|
Denis Meltsaykin |
Bug Description
Fuel 9.2 (MOS_CENTOS_
Steps to reproduce:
- Deploy 9.1 env with following nodes:
* Controller
* Controller
* Controller
* Compute, ceph-osd
* Compute, ceph-osd
* Compute, ceph-osd
- Update cluster following the instructions: https:/
Observed behavior:
Some packages weren't upgraded. For example:
root@node-1:~# apt-cache policy qemu
qemu:
Installed: 1:2.3+dfsg-
Candidate: 1:2.5+dfsg-
Version table:
1:
1050 http://
*** 1:2.3+dfsg-
1050 http://
100 /var/lib/
1:
1050 http://
2.
500 http://
500 http://
2.
500 http://
summary: |
- Some packages weren't upgraded after cluster upgrade to 9.2MU + Some packages weren't upgraded after cluster update to 9.2MU |
Changed in mos: | |
milestone: | none → 9.x-updates |
importance: | Undecided → High |
description: | updated |
Changed in mos: | |
milestone: | 9.x-updates → 9.2-mu-3 |
assignee: | nobody → MOS Maintenance (mos-maintenance) |
status: | New → Confirmed |
Changed in mos: | |
assignee: | MOS Maintenance (mos-maintenance) → Max Yatsenko (myatsenko) |
Changed in mos: | |
milestone: | 9.2-mu-4 → 9.x-updates |
assignee: | Max Yatsenko (myatsenko) → Denis Meltsaykin (dmeltsaykin) |
Please find below information about why some packages are not updated
after cluster update to 9.2MU .
The main reason - is that 'get_packages_ for_upgrade. rb' puppet function doesn't return necessary list of packages (it returns a hash of packages).
To get needed packages for upgrade 'get_packages_ for_upgrade. rb' script runs this shell command: :sourcelist= '-' -o Dir::Etc: :sourceparts= '#{source_ list}' dist-upgrade -qq'
'apt-get --just-print -o Dir::etc:
, where 'source_list' - is a path to a directory, where repo file is located maintenance/ apt/sources. list.d/ ').
(it's hardcoded to '/etc/fuel/
In fact '/etc/fuel/ maintenance/ apt/sources. list.d/ ' directory contains a symbol link to a repository file located in standard place (/etc/apt/ sources. list.d/ ), updates. list" repo it contains the following: sources. list.d/ mos9.2- updates. list
for "mos9.2-
mos9.2-updates.list -> /etc/apt/
After run 'apt-get --just-print -o Dir::etc: :sourcelist= '-' :sourceparts= '#{source_ list}' dist-upgrade -qq' there is output like this: 1-7~u14. 04+mos20] [nova-compute:amd64 ] dfsg-5~ u14.04+ mos3] dfsg-5~ u14.04+ mos3] dfsg-5~ u14.04+ mos3] dfsg-5~ u14.04+ mos3] dfsg-5~ u14.04+ mos3] dfsg-5~ u14.04+ mos3] dfsg-5~ u14.04+ mos3] [qemu-system- x86:amd64 qemu-system- sparc:amd64 qemu-system- misc:amd64 ] dfsg-5~ u14.04+ mos3] [qemu-system- x86:amd64 qemu-system- sparc:amd64 ] dfsg-5~ u14.04+ mos3] [qemu-system- x86:amd64 ] dfsg-5~ u14.04+ mos3] dfsg1-3ubuntu4. 9] (2.9.3+ dfsg1-1~ u1404+mos2 mos9.0: mos9.0- updates [amd64]) 1~u14.04+ mos1] (0.94.9- 1~u14.04+ mos2 mos9.0: mos9.0- updates [amd64]) [] 1~u14.04+ mos1] (0.94.9- 1~u14.04+ mos2 mos9.0: mos9.0- updates [amd64]) [] 1~u14.04+ mos1] (0.94.9- 1~u14.04+ mos2 mos9.0: mos9.0- updates [amd64]) [] 1~u14.04+ mos1] (0.94.9- 1~u14.04+ mos2 mos9.0: mos9.0- updates [amd64]) [] 1~u14.04+ mos1] (0.94.9- 1~u14.04+ mos2 mos9.0: mos9.0- updates [amd64]) [] 1~u14.04+ mos1] (0.94.9- 1~u14.04+ mos2 mos9.0: mos9.0- updates [amd64]) [] 1~u14.04+ mos1] (0.94.9- 1~u14.04+ mos2 mos9.0: mos9.0- updates [amd64]) []
-o Dir::Etc:
....
..
Remv nova-compute-qemu [2:13.1.
Remv qemu [1:2.3+
Remv qemu-kvm [1:2.3+
Remv qemu-system [1:2.3+
Remv qemu-system-arm [1:2.3+
Remv qemu-system-ppc [1:2.3+
Remv qemu-system-mips [1:2.3+
Remv qemu-system-common [1:2.3+
Remv qemu-system-misc [1:2.3+
Remv qemu-system-sparc [1:2.3+
Remv qemu-system-x86 [1:2.3+
Inst libxml2 [2.9.1+
Inst ceph [0.94.6-
Inst ceph-common [0.94.6-
Inst python-rbd [0.94.6-
Inst python-rados [0.94.6-
Inst librbd1 [0.94.6-
Inst librados2 [0.94.6-
Inst python-cephfs [0.94.6-
..
.......
'get_packages_ for_upgrade. rb' script parses this output and select all lines that contain 'Inst' operation label. list_common_ out.split( "\n").select { |line| line =~ /^Inst\b/ }'
Here is a line of code that performs it:
'package_list = package_
Afer this parsing all packages with 'Remv' operation label are missed, they aren't returned to puppet manifest for package resource creation, package upgrade performing.
So it leads to a situation that is described in 'Bug Description': not all packages are upgraded after applying 9.2MU.
Why there is 'Remv' operation label ? :sourcelist= '-' :sourceparts= '/etc/fuel/ maintenance/ apt/sour. ..
When we run:
'apt-get --just-print -o Dir::etc:
-o Dir::Etc: