Bug #14888
closedBroken ubuntu version detection in apt settings technique with 5.0+ agents
Description
Hi,
i hope this isn't just a thing on my end...
anyway - was dealing with a system that didn't get any automatic security updates
why? because rudder couldn't autodetect the distro and enforced me an invalid apt config
root@ubu-hg:/etc/apt/sources.list.d# cat rudder-apt.list ### Managed by Rudder, edit with care ### deb http://de.archive.ubuntu.com/ubuntu ${apt_detected_distro} universe multiverse
cf-promises detects this:
group_os_distro_ubuntu source=promise,inventory,attribute_name=rudder_groups ubuntu inventory,attribute_name=none,source=agent,derived-from-file=/etc/os-release,hardclass ubuntu_16 inventory,attribute_name=none,source=agent,derived-from=sys.flavor,hardclass ubuntu_16_04 inventory,attribute_name=none,source=agent,derived-from-file=/etc/os-release,hardclass
(Agent is 5.something)
aptPackageManagerSettings.st apparently needed patching as here:
@commit 89178c003b2770ee12fcf7740b70c2ad4527a0d9 Author: root user (CLI) <root@localhost> Date: Wed May 15 10:45:00 2019 +0200 bugfix ubuntu detection diff --git a/techniques/applications/aptPackageManagerSettings/3.1/aptPackageManagerSettings.st b/techniques/applications/aptPackageManagerSett index a149227..1ed9e73 100644 --- a/techniques/applications/aptPackageManagerSettings/3.1/aptPackageManagerSettings.st +++ b/techniques/applications/aptPackageManagerSettings/3.1/aptPackageManagerSettings.st @@ -88,7 +88,7 @@ bundle agent check_apt_settings ubuntu_willy|ubuntu_15_10:: "apt_detected_distro" string => "willy"; - ubuntu_xenial|ubuntu_16_4:: + ubuntu_xenial|ubuntu_16_4|ubuntu_16_04:: "apt_detected_distro" string => "xenial"; ubuntu_yakkety|ubuntu_16_10::
Updated by François ARMAND over 5 years ago
Thanks for reporting, we are investigating right now - it seems important (edit: it seems that cfengine changed the way they report distro in a minor... We are looking to it)
Updated by Alexis Mousset over 5 years ago
- Category set to Techniques
- Assignee set to Alexis Mousset
There was a bug in CFEngine 3.12 leading to trim zeros in minor version classes (https://github.com/cfengine/core/pull/3575/files).
We need to support both versions in the technique.
Updated by Alexis Mousset over 5 years ago
- Subject changed from xenial detection in apt management to Broken ubuntu version detection in apt settings technique with 5.0+ agents
Updated by Alexis Mousset over 5 years ago
- Status changed from New to In progress
Updated by Alexis Mousset over 5 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Alexis Mousset to Benoît PECCATTE
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/1443
Updated by Rudder Quality Assistant over 5 years ago
- Assignee changed from Benoît PECCATTE to Alexis Mousset
Updated by Alexis Mousset over 5 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-techniques|97a5ab61b7204e1f276f6aff513e5bd305f01816.
Updated by Vincent MEMBRÉ over 5 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 5.0.11 which was released today.