Project

General

Profile

Actions

Bug #17917

closed

On debian, package with new dependencies is not upgraded to latest available version

Added by Nicolas Ecarnot over 4 years ago. Updated over 4 years ago.

Status:
Released
Priority:
N/A
Category:
System techniques
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Getting started - demo | first install | Technique editor and level 1 Techniques
Effort required:
Priority:
70
Name check:
To do
Fix check:
Checked
Regression:

Description

Hello,

One of our directives is ensuring the availability of the 'rudder-agent' package in the latest version on all our nodes.
When our root server was in version 6.0.6 and before, the upgrades went fine on our nodes (a mix of 6.0.4, 6.0.6 and 6.0.7 nodes, in Ubuntu, Debian, Centos, OL7...).

On 2020-07-06 morning, I upgraded the server into 6.1.1. On 3 test nodes, I changed the /etc/apt/sources.list.d/rudder.list accordingly to the doc.
For instance, on a ubuntu bionic, this is :
deb http://repository.rudder.io/apt/6.1/ bionic main

One night later, I see that the the rudder agent hasn't been upgraded :
  1. rudder agent version
    Rudder agent 6.0.6-ubuntu18.04

FYI, when manually upgrading the agent, it gets upgraded correctly.

UPDATE: as found in comments, the problem arise only with apt for packages with new dependencies.

WORKAROUND

- on server, edit file: /usr/share/ncf/tree/10_ncf_internals/modules/packages/apt_get
- add --with-new-pkgs on call to apt-get in method def list_updates(online) so that the line looks like:

process = subprocess_Popen([apt_get_cmd] + apt_get_options + ["--simulate", "--ignore-hold", "--with-new-pkgs", "upgrade"], stdout=subprocess.PIPE)

- save
- execute rudder agent run -u on the server
- on node, remove cache: rm -f /var/rudder/cfengine-community/state/packages_updates_*
- run rudder agent run -u

Actions

Also available in: Atom PDF