Project

General

Profile

Actions

User story #19033

closed

package method leads to report error when package with non-zero epoch is updated

Added by François ARMAND about 3 years ago. Updated over 1 year ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
To do
Fix check:
To do
Regression:
No

Description

On a centos, if a package is present and a new version is available, for the package technique, with option update only if package installed, with option install last version, I get the following behavior:

- package is correctly updated (and not installed on a node without it before hand)
- an error is outputed


Files

clipboard-202103160958-gow6b.png (50.3 KB) clipboard-202103160958-gow6b.png François ARMAND, 2021-03-16 09:58

Related issues 1 (0 open1 closed)

Related to Rudder - User story #18909: Add an "upgrade only" option to the technique packageManagementReleasedNicolas CHARLESActions
Actions #1

Updated by François ARMAND about 3 years ago

Actually, it's even stranger than that: the run in error in the node never reach rudder server: no reports are stored in base for it. But they are not in "output" reports on the node (in /var/rudder/tmp/reports/), nor in relayd process queue in /var/rudder/reports/{incoming, failed, ready}).

UPDATE: it was a debug run, they are not send, it's clearly written in the help.

Actions #2

Updated by Félix DALLIDET about 3 years ago

I was able to reproduce this issue. It does seem to come from the package module/promise. See a simple cf file to reproduce in a minimal setup.
I could reproduce going from version "8.0.1763-10.el8" to "8.0.1763-15.el8".

It may come from the epoch which appears to be listed in some yum outputs and not in some others. The package module is listing the epoch in the target version prior to an update but doesn't after the upgrade, and packages were the epoch is never listed seem to work fine.

Before update:

[root@server packages]# ./yum list-installed < /dev/null | grep -A2 vim-minimal
Name=vim-minimal
Version=8.0.1763-10.el8
Architecture=x86_64

See the epoch prefix in the version tag

[root@server packages]# ./yum list-updates < /dev/null | grep -A2 vim-minimal
Failed to set locale, defaulting to C
Name=vim-minimal
Version=2:8.0.1763-15.el8
Architecture=x86_64

After Update:
[root@server packages]# ./yum list-installed < /dev/null | grep -A2 vim-minimal
Name=vim-minimal
Version=8.0.1763-15.el8
Architecture=x86_64

Actions #3

Updated by François ARMAND about 3 years ago

  • Parent task deleted (#18909)

I'm breaking the parent/child link, since it's a different problem

Actions #4

Updated by François ARMAND about 3 years ago

  • Related to User story #18909: Add an "upgrade only" option to the technique packageManagement added
Actions #5

Updated by François ARMAND about 3 years ago

  • Subject changed from Update-only package option lead to report error when package is updated to package technique leads to report error when package with non-zero epoch is updated
Actions #6

Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 6.1.10 to 6.1.11
Actions #7

Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 6.1.11 to 6.1.12
Actions #8

Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 6.1.12 to 6.1.13
Actions #9

Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 6.1.13 to 6.1.14
Actions #10

Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 6.1.14 to 6.1.15
Actions #11

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 6.1.15 to 6.1.16
Actions #12

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 6.1.16 to 6.1.17
Actions #13

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 6.1.17 to 6.1.18
Actions #14

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 6.1.18 to 6.1.19
Actions #15

Updated by Alexis Mousset about 2 years ago

  • Subject changed from package technique leads to report error when package with non-zero epoch is updated to package method leads to report error when package with non-zero epoch is updated
  • Category changed from Techniques to Generic methods
Actions #16

Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 6.1.19 to 6.1.20
Actions #17

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 6.1.20 to 6.1.21
Actions #18

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 6.1.21 to old 6.1 issues to relocate
Actions #19

Updated by Nicolas CHARLES over 1 year ago

  • Regression set to No

it is still the case, and causes error when upgrading rudder-agent

install candidate

Name=rudder-agent
Version=1398866025:7.1.3-1.EL.8
Architecture=x86_64

action

rudder    debug: Formatted list of packages to be send to package module: [Name=rudder-agent
Version=1398866025:7.1.3-1.EL.8
Architecture=x86_64
]
rudder    debug: Installing repo type package: 'Name=rudder-agent
Version=1398866025:7.1.3-1.EL.8
Architecture=x86_64
'
rudder    debug: Sending install command to package module: 'options=
Name=rudder-agent
Version=1398866025:7.1.3-1.EL.8
Architecture=x86_64
'

validation of package installed

rudder    debug: Validating package: rudder-agent
rudder    debug: Updating cache: 0
rudder    debug: Opened fds 6 and 9 for command '/var/rudder/cfengine-community/modules/packages/yum list-installed'.

returns without epoch
Name=rudder-agent
Version=7.1.3-1.EL.8
Architecture=x86_64

and thus it fails

rudder    debug: Looking for key in installed packages cache: N<rudder-agent>V<1398866025:7.1.3-1.EL.8>A<x86_64>
rudder    debug: Looking for package rudder-agent in cache returned: 0
rudder    debug: Validating package rudder-agent:1398866025:7.1.3-1.EL.8:x86_64 installation result: 102
rudder    debug: Evaluating present action promise status: f
   error: Error installing package 'rudder-agent'

Actions #20

Updated by Nicolas CHARLES over 1 year ago

  • Target version changed from old 6.1 issues to relocate to 6.2.17
Actions #21

Updated by Nicolas CHARLES over 1 year ago

  • Status changed from New to In progress
  • Assignee changed from Félix DALLIDET to Nicolas CHARLES
Actions #22

Updated by Nicolas CHARLES over 1 year ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Alexis Mousset
  • Pull Request set to https://github.com/Normation/ncf/pull/1362
Actions #23

Updated by Nicolas CHARLES over 1 year ago

  • Assignee changed from Alexis Mousset to Félix DALLIDET
  • Pull Request changed from https://github.com/Normation/ncf/pull/1362 to https://github.com/Normation/ncf/pull/1363
Actions #24

Updated by Nicolas CHARLES over 1 year ago

  • Target version changed from 6.2.17 to 7.2.0~rc1

Targeting to 7.2 as it fix changes behaviour : it makes "latest" work, but need the exact version with epoch if it exists to install a package in a specific version

Actions #25

Updated by Anonymous over 1 year ago

  • Status changed from Pending technical review to Pending release
Actions #26

Updated by Vincent MEMBRÉ over 1 year ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 7.2.0~rc1 which was released today.

Actions

Also available in: Atom PDF