Bug #13741
closedapt configuration issue - add apost-check to validate generated line
Description
Getting this on a Rudder 5.0 node on 4.3 master:
root@ubu-hg:/etc/apt/sources.list.d# cat *- 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 :)
Updated by Benoît PECCATTE about 6 years ago
This has been corrected in a newer version of the technique.
It should work if you upgrade it.
Updated by Florian Heigl about 6 years ago
Hi,
this is on technique version 3.1, the newest I can chose.
Updated by François ARMAND about 6 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
Updated by François ARMAND almost 6 years ago
- Priority changed from 70 to 0
Florian, we are not able to reproduce without the asked information. Does that problem still occures?
Updated by Florian Heigl almost 6 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.
Updated by François ARMAND over 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
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 5.0.9 to 5.0.10
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 5.0.10 to 5.0.11
- Priority changed from 65 to 64
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 5.0.11 to 5.0.12
- Priority changed from 64 to 63
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 5.0.12 to 5.0.13
- Priority changed from 63 to 62
Updated by Vincent MEMBRÉ about 5 years ago
- Target version changed from 5.0.13 to 5.0.14
- Priority changed from 62 to 60
Updated by Vincent MEMBRÉ about 5 years ago
- Target version changed from 5.0.14 to 5.0.15
- Priority changed from 60 to 59
Updated by Nicolas CHARLES about 5 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
Updated by Vincent MEMBRÉ almost 5 years ago
- Target version changed from 5.0.15 to 5.0.16
Updated by Alexis Mousset almost 5 years ago
- Target version changed from 5.0.16 to 5.0.17
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 5.0.17 to 5.0.18
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 5.0.18 to 5.0.19
Updated by Vincent MEMBRÉ about 4 years ago
- Target version changed from 5.0.19 to 5.0.20
Updated by Nicolas CHARLES about 4 years ago
- Status changed from New to In progress
- Assignee set to Nicolas CHARLES
Updated by Nicolas CHARLES about 4 years ago
it is harder than expected, as agent seems to believe variable is defined while it's not
Updated by Nicolas CHARLES about 4 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
Updated by Nicolas CHARLES about 4 years ago
- Related to Bug #18352: Add Ubuntu 20.x in Technique Package sources and settings (APT) added
Updated by Nicolas CHARLES about 4 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-techniques|526b9c7af41dfb2cdaf838a9d61cfc76d751d877.
Updated by Vincent MEMBRÉ over 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.
Updated by Vincent MEMBRÉ over 3 years ago
- Status changed from Pending release to Released