cc_salt_minion behaves badly if apt-get update fails
Bug #1594576 reported by
Ross Vandegrift
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Medium
|
Unassigned |
Bug Description
I'm using cloud-init to setup some salt-minion config like so:
#cloud-config
salt_minion:
conf:
grains:
my_grain_1: a
my_grain_2: b
cc_salt_minion.py triggers apt-get update. If apt-get update fails, then cc_salt_minion does not update /etc/salt/minion, but nonetheless continues. My automation depends on finding these grains, and salt-minion is already built in.
Please consider the attached patch, which will skip the install if a flag is included. Alternatively, cc_salt_minion could write out /etc/salt/minion even if apt-get fails.
Ross
To post a comment you must log in.
Hi,
Thanks for the bug report and patch.
Why was package installation failing for you? Ideally that should not fail.
Second, I think i'd like to have the ability for 'install_packages' to take an option to not install package if the package exists already. Then, we could change the minion code to allow user-data to set that flag. I think ultimately, you would still normally want 'apt-get install <package>' to have run, since that would mean you had then gotten any security updates or other package fixes from the sources provided.