On 02/22/2012 12:16 AM, Aaron Bento wrote:
I'm looking to provide some feedback on cloud-init and the F16 AMI's. I'm not
sure the proper place to file the bug against. I'm attempting to place a simple shell
script in user data to perform post-boot configuration. This fails since I'm unable to
execute anything within user data. (I'm hoping eventually to use cloud-config syntax)
The cloud-init startup process (sometime after placing the ssh keys) at one point runs:
/usr/bin/cloud-init-cfg all final During this stage, run-parts gets run to actually
execute the downloaded user data. It fails with the following:
CalledProcessError: Command '['run-parts', '--regex', '.*',
The --regex flag is not accepted by the Fedora version of run-parts. Debian/Ubuntu both
have a compiled binary of run-parts that accepts this flag.
Here is a reproduction of it on an already booted machine:
I've got two solutions that seem to work in initial testing.
1) Backing in a copy of run-parts that accepts the additional arguments into a new ami.
2) Removing the regex flag + expression out of
So my question to the group. What is a better fix to peruse, adding functionality to
run-parts, or patching util.py to not use the regex?
Well the --regex=.* above is just to avoid debian's implicit
filtering rules, and run all scripts.
The fedora run-parts will run everything anyway
(only avoiding obvious things like rpmsave files etc.)
So I'd change cloud-init to support the existing system,
which I've done in a patch attached to:
cloud-init upstream would need a more general tweak
to support both systems.