Project

General

Profile

Actions

Bug #14888

closed

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

Added by Florian Heigl over 5 years ago. Updated over 5 years ago.

Status:
Released
Priority:
N/A
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

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::
Actions #1

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)

Actions #2

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.

Actions #3

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
Actions #4

Updated by Alexis Mousset over 5 years ago

  • Target version set to 5.0.11
Actions #5

Updated by Alexis Mousset over 5 years ago

  • Status changed from New to In progress
Actions #6

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
Actions #7

Updated by Alexis Mousset over 5 years ago

  • Description updated (diff)
Actions #8

Updated by Rudder Quality Assistant over 5 years ago

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

Updated by Alexis Mousset over 5 years ago

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

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.

Actions

Also available in: Atom PDF