-
Notifications
You must be signed in to change notification settings - Fork 914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cloud-init collect-logs fails in impish #3895
Comments
Launchpad user James Falcon(falcojr) wrote on 2021-08-17T16:33:25.243198+00:00 PR at #985 |
Launchpad user James Falcon(falcojr) wrote on 2021-08-23T20:16:47.809912+00:00 This bug is believed to be fixed in cloud-init in version 21.3. If this is still a problem for you, please make a comment and set the state back to New Thank you. |
blackboxsw
added a commit
to blackboxsw/cloud-init
that referenced
this issue
Dec 13, 2023
…cal#3895) Historically cloud-config.service was declared the boot stage blocked on After=snapd.seeded.service to allow for any config module to potentially leverage snap utilities if present. In practice, only the config modules cc_snap, cc_lxd, cc_ubuntu_autoinstall and cc_runcmd are the modules that may strictly rely on snaps being seeded during initial boot. So the systemd ordering is not necessary in the majority of deployment cases. Avoid a hard systemd ordering `After=snapd-seeded.service` in cloud-config.service. Instead, directly call `snap system wait seed.loaded` if user-data requires that snaps are present and seeded. Add a semphore runner set limited to frequency PER_ONCE which calls snap wait system seed.loaded one time to block if any related cloud-config modules are active which may require snap interaction. Add this helper to each affected cloud-config module: snap, lxd, ubuntu_autoinstall. In rucmd, document the need for call: snap wait system seed.loaded if the runcmd user-data requires snaps being present. The runner will prevent cloud-init from making multiple calls to snap wait even if user-data requires snappy interaction is applicable for multiple config modules with a dependency on snaps.
blackboxsw
added a commit
to blackboxsw/cloud-init
that referenced
this issue
Dec 13, 2023
…cal#3895) Historically cloud-config.service was declared the boot stage blocked on After=snapd.seeded.service to allow for any config module to potentially leverage snap utilities if present. In practice, only the config modules cc_snap, cc_lxd, cc_ubuntu_autoinstall and cc_runcmd are the modules that may strictly rely on snaps being seeded during initial boot. So the systemd ordering is not necessary in the majority of deployment cases. Avoid a hard systemd ordering `After=snapd-seeded.service` in cloud-config.service. Instead, directly call `snap system wait seed.loaded` if user-data requires that snaps are present and seeded. Add a semphore runner set limited to frequency PER_ONCE which calls snap wait system seed.loaded one time to block if any related cloud-config modules are active which may require snap interaction. Add this helper to each affected cloud-config module: snap, lxd, ubuntu_autoinstall. In rucmd, document the need for call: snap wait system seed.loaded if the runcmd user-data requires snaps being present. The runner will prevent cloud-init from making multiple calls to snap wait even if user-data requires snappy interaction is applicable for multiple config modules with a dependency on snaps.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This bug was originally filed in Launchpad as LP: #1940235
Launchpad details
Launchpad user Christian Ehrhardt (paelzer) wrote on 2021-08-17T08:43:29.676613+00:00
New impish instance fails like this:
cloud-init collect-logs
Traceback (most recent call last):
File "/usr/bin/cloud-init", line 33, in
sys.exit(load_entry_point('cloud-init==21.2', 'console_scripts', 'cloud-init')())
File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 920, in main
retval = util.log_time(
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2454, in log_time
ret = func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/cloudinit/cmd/devel/logs.py", line 141, in handle_collect_logs_args
return collect_logs(args.tarfile, args.userdata, args.verbosity)
File "/usr/lib/python3/dist-packages/cloudinit/cmd/devel/logs.py", line 126, in collect_logs
shutil.copytree(CLOUDINIT_RUN_DIR,
File "/usr/lib/python3.9/shutil.py", line 557, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
File "/usr/lib/python3.9/shutil.py", line 513, in _copytree
raise Error(errors)
shutil.Error: [('/run/cloud-init/hook-hotplug-cmd', '/tmp/tmpxk4wjlsb/cloud-init-logs-2021-08-17/run/cloud-init/hook-hotplug-cmd', '
/run/cloud-init/hook-hotplug-cmd
is a named pipe')]$ dpkg -l cloud-init
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-==========================-============-=========================================================
ii cloud-init 21.2-69-g65607405-0ubuntu1 all initialization and customization tool for cloud instances
The text was updated successfully, but these errors were encountered: