Project

General

Profile

Actions

Bug #13741

closed

apt configuration issue - add apost-check to validate generated line

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

Status:
Released
Priority:
N/A
Category:
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:
58
Name check:
Reviewed
Fix check:
Checked
Regression:

Description

Getting this on a Rudder 5.0 node on 4.3 master:

root@ubu-hg:/etc/apt/sources.list.d# cat *
  1. Managed by Rudder, edit with care ###
    deb http://de.archive.ubuntu.com/ubuntu ${apt_detected_distro} universe multiverse

breaks updates and OS install.

This is an LTS ubuntu that came out ages ago, no idea what is going wrong.

root@ubu-hg:/etc/apt/sources.list.d# cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

since I see that there's a preexisting issue for the same problem a few years back... please could you consider a cleaner solution, that validates the generated url before writing it.

https://www.rudder-project.org/redmine/issues/11336

I know it's just Ubuntu, but still :)


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #18352: Add Ubuntu 20.x in Technique Package sources and settings (APT) RejectedVincent MEMBRÉActions
Actions #1

Updated by Benoît PECCATTE over 5 years ago

This has been corrected in a newer version of the technique.
It should work if you upgrade it.

Actions #2

Updated by Florian Heigl over 5 years ago

Hi,

this is on technique version 3.1, the newest I can chose.

Actions #3

Updated by Florian Heigl over 5 years ago

same happens on 18.04

Actions #4

Updated by François ARMAND over 5 years ago

Could you share the content of the directory (and files in it) "/var/rudder/cfengine-community/inputs/aptPackageManagerSettings" on the node? (privately if needed, or after anonymisation)?

Thanks

Actions #5

Updated by François ARMAND about 5 years ago

  • Priority changed from 70 to 0

Florian, we are not able to reproduce without the asked information. Does that problem still occures?

Actions #6

Updated by Florian Heigl about 5 years ago

how about you add any validation of the generated line instead?
if it generates a line with an unrendered variable it will always be incorrect.

it's best to fix the main issue instead of the single thing that triggered it.

Actions #7

Updated by François ARMAND about 5 years ago

  • Subject changed from apt configuration issue to apt configuration issue - add apost-check to validate generated line
  • Target version set to 5.0.9
  • User visibility changed from Getting started - demo | first install | level 1 Techniques to Getting started - demo | first install | Technique editor and level 1 Techniques
  • Priority changed from 0 to 65
Actions #8

Updated by Vincent MEMBRÉ almost 5 years ago

  • Target version changed from 5.0.9 to 5.0.10
Actions #9

Updated by Vincent MEMBRÉ almost 5 years ago

  • Target version changed from 5.0.10 to 5.0.11
  • Priority changed from 65 to 64
Actions #10

Updated by Vincent MEMBRÉ almost 5 years ago

  • Target version changed from 5.0.11 to 5.0.12
  • Priority changed from 64 to 63
Actions #11

Updated by Vincent MEMBRÉ over 4 years ago

  • Target version changed from 5.0.12 to 5.0.13
  • Priority changed from 63 to 62
Actions #12

Updated by Vincent MEMBRÉ over 4 years ago

  • Target version changed from 5.0.13 to 5.0.14
  • Priority changed from 62 to 60
Actions #13

Updated by Vincent MEMBRÉ over 4 years ago

  • Target version changed from 5.0.14 to 5.0.15
  • Priority changed from 60 to 59
Actions #14

Updated by Nicolas CHARLES over 4 years ago

  • Priority changed from 59 to 58

You are totally right, we should validate that the string apt_autodetect is defined before editing the file
This would be the perfect chance to rewrite this technique to have it compliant with our coding guideline

Actions #15

Updated by Vincent MEMBRÉ over 4 years ago

  • Target version changed from 5.0.15 to 5.0.16
Actions #16

Updated by Alexis Mousset about 4 years ago

  • Target version changed from 5.0.16 to 5.0.17
Actions #17

Updated by Vincent MEMBRÉ almost 4 years ago

  • Target version changed from 5.0.17 to 5.0.18
Actions #18

Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 5.0.18 to 5.0.19
Actions #19

Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 5.0.19 to 5.0.20
Actions #20

Updated by Nicolas CHARLES over 3 years ago

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES
Actions #21

Updated by Nicolas CHARLES over 3 years ago

it is harder than expected, as agent seems to believe variable is defined while it's not

Actions #22

Updated by Nicolas CHARLES over 3 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/1621
Actions #23

Updated by Nicolas CHARLES over 3 years ago

  • Related to Bug #18352: Add Ubuntu 20.x in Technique Package sources and settings (APT) added
Actions #24

Updated by Nicolas CHARLES over 3 years ago

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

Updated by Nicolas CHARLES over 3 years ago

  • Fix check set to Checked
Actions #26

Updated by Alexis Mousset over 3 years ago

  • Name check set to Reviewed
Actions #27

Updated by Vincent MEMBRÉ almost 3 years ago

This bug has been fixed in Rudder 5.0.20, 6.0.10, 6.1.6, 6.2.0~beta1 which were released by the end of October 2020.

Actions #28

Updated by Vincent MEMBRÉ almost 3 years ago

  • Status changed from Pending release to Released
Actions

Also available in: Atom PDF