Project

General

Profile

Bug #13741

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

Added by Florian Heigl about 2 years ago. Updated 1 day ago.

Status:
Pending release
Priority:
N/A
Category:
Techniques
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Getting started - demo | first install | Technique editor and level 1 Techniques
Effort required:
Priority:
58

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

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

Updated by Benoît PECCATTE almost 2 years ago

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

#2

Updated by Florian Heigl almost 2 years ago

Hi,

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

#3

Updated by Florian Heigl almost 2 years ago

same happens on 18.04

#4

Updated by François ARMAND almost 2 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

#5

Updated by François ARMAND almost 2 years ago

  • Priority changed from 70 to 0

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

#6

Updated by Florian Heigl almost 2 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.

#7

Updated by François ARMAND over 1 year 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
#8

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 5.0.9 to 5.0.10
#9

Updated by Vincent MEMBRÉ over 1 year ago

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

Updated by Vincent MEMBRÉ over 1 year ago

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

Updated by Vincent MEMBRÉ over 1 year ago

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

Updated by Vincent MEMBRÉ about 1 year ago

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

Updated by Vincent MEMBRÉ about 1 year ago

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

Updated by Nicolas CHARLES 12 months 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

#15

Updated by Vincent MEMBRÉ 11 months ago

  • Target version changed from 5.0.15 to 5.0.16
#16

Updated by Alexis MOUSSET 9 months ago

  • Target version changed from 5.0.16 to 5.0.17
#17

Updated by Vincent MEMBRÉ 7 months ago

  • Target version changed from 5.0.17 to 5.0.18
#18

Updated by Vincent MEMBRÉ 3 months ago

  • Target version changed from 5.0.18 to 5.0.19
#19

Updated by Vincent MEMBRÉ about 2 months ago

  • Target version changed from 5.0.19 to 5.0.20
#20

Updated by Nicolas CHARLES about 1 month ago

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

Updated by Nicolas CHARLES about 1 month ago

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

#22

Updated by Nicolas CHARLES about 1 month 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
#23

Updated by Nicolas CHARLES 12 days ago

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

Updated by Nicolas CHARLES 11 days ago

  • Status changed from Pending technical review to Pending release

Also available in: Atom PDF