Project

General

Profile

Actions

Bug #14888

closed

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

Added by Florian Heigl almost 5 years ago. Updated almost 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

Also available in: Atom PDF