Project

General

Profile

Bug #14888

Broken ubuntu version detection in apt settings technique with 5.0+ agents

Added by Florian Heigl about 1 month ago. Updated 28 days ago.

Status:
Released
Priority:
N/A
Category:
Techniques
Target version:
Severity:
User visibility:
Effort required:
Priority:
0

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::

Associated revisions

Revision 97a5ab61 (diff)
Added by Alexis MOUSSET about 1 month ago

Fixes #14888: Broken ubuntu version detection in apt settings technique with 5.0+ agents

History

#1

Updated by François ARMAND about 1 month 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)

#2

Updated by Alexis MOUSSET about 1 month 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.

#3

Updated by Alexis MOUSSET about 1 month ago

  • Subject changed from xenial detection in apt management to Broken ubuntu version detection in apt settings technique with 5.0+ agents
#4

Updated by Alexis MOUSSET about 1 month ago

  • Target version set to 5.0.11
#5

Updated by Alexis MOUSSET about 1 month ago

  • Status changed from New to In progress
#6

Updated by Alexis MOUSSET about 1 month 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
#7

Updated by Alexis MOUSSET about 1 month ago

  • Description updated (diff)
#8

Updated by Rudder Quality Assistant about 1 month ago

  • Assignee changed from Benoît PECCATTE to Alexis MOUSSET
#9

Updated by Alexis MOUSSET about 1 month ago

  • Status changed from Pending technical review to Pending release
#10

Updated by Vincent MEMBRÉ 28 days ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 5.0.11 which was released today.

Also available in: Atom PDF