yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #76851
[Bug 1814294] Re: ubuntu-core: installing extra snap fails
Thanks for ths bug, Ondrej and making cloud-init better. That bug looks
valid against cloud-init's cc_snappy configuration module, but I since
(as you saw in logs) that module is now deprecated and due to drop in
18.5 I would like to steer folks instead to use the cc_snap module to
perform those snap install/config tasks.
Docs for the snap module are here:
https://cloudinit.readthedocs.io/en/latest/topics/modules.html#snap
If this is approach not possible or the suggestion below doesn't meet
your needs, please re-open this bug.
Here is the #cloud-config that I think can be provided to meet your needs:
#cloud-config
# ... your other cloud-config content
snap:
commands:
00: snap install avahi
01: snap set avahi host-name=db-test
As per your infomative snappy post[1] the other configuration options you provide will also be good for wiring that al together. Any snap command can be presented with an opaque key to specify the order in which the commands are run
References:
[1]: snappy post on avahi config https://forum.snapcraft.io/t/how-can-i-lookup-host-name-from-snap-core-using-avahi-mdns/3828/19
** Changed in: cloud-init
Status: New => Won't Fix
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1814294
Title:
ubuntu-core: installing extra snap fails
Status in cloud-init:
Won't Fix
Bug description:
Ubuntu core 16
installed of additional snap package fails, error seems to be related
to config part, without config part it mostly succeeds
error log:
Feb 01 16:59:50 localhost systemd[1]: Starting Execute cloud user/final scripts...
Feb 01 16:59:52 localhost cloud-init[2332]: Cloud-init v. 18.4-0ubuntu1~16.04.2 running 'modules:final' at Fri, 01 Feb 2019 16:59:52 +0000. Up 160.30 seconds.
Feb 01 16:59:52 localhost cloud-init[2332]: 2019-02-01 16:59:52,721 - cc_snappy.py[WARNING]: DEPRECATION: snappy module will be dropped in 18.3 release. Use snap module instead
Feb 01 16:59:52 localhost cloud-init[2332]: 2019-02-01 16:59:52,895 - cc_snappy.py[WARNING]: 'install' failed for 'avahi': Unexpected error while running command.
Feb 01 16:59:52 localhost cloud-init[2332]: Command: ['snap', 'install', 'avahi', '/run/cloud-init/tmp/tmp0q2ncq6p']
Feb 01 16:59:52 localhost cloud-init[2332]: Exit code: 1
Feb 01 16:59:52 localhost cloud-init[2332]: Reason: -
Feb 01 16:59:52 localhost cloud-init[2332]: Stdout:
Feb 01 16:59:52 localhost cloud-init[2332]: Stderr: error: only one snap file can be installed at a time
Feb 01 16:59:52 localhost cloud-init[2332]: 2019-02-01 16:59:52,918 - util.py[WARNING]: Running module snappy (<module 'cloudinit.config.cc_snappy' from '/usr/lib/python3/dist-packages/cloudinit/con
Feb 01 16:59:53 localhost ec2[2359]:
Feb 01 16:59:53 localhost ec2[2359]: #############################################################
Feb 01 16:59:53 localhost ec2[2359]: -----BEGIN SSH HOST KEY FINGERPRINTS-----
Feb 01 16:59:53 localhost ec2[2359]: 1024 SHA256:fDRAlYIRvUUUOynBQmNZ+7Om63hzTOkK5RREpKL6RFo root@localhost (DSA)
Feb 01 16:59:53 localhost ec2[2359]: 256 SHA256:ALXOme71nDUYorqH1J9SEiVG9l/F5qMP+6H6IZaq3TQ root@localhost (ECDSA)
Feb 01 16:59:53 localhost ec2[2359]: 256 SHA256:1wPrPY5tNIcxNsg8vglMz8bCsNT8l5EYDqnw/dsvGHs root@localhost (ED25519)
Feb 01 16:59:53 localhost ec2[2359]: 2048 SHA256:8DsSVXRXGfEUqlcGDCxgm+mFR5Z0BQv1e1NB4xjzY2c root@localhost (RSA)
Feb 01 16:59:53 localhost cloud-init[2332]: Cloud-init v. 18.4-0ubuntu1~16.04.2 finished at Fri, 01 Feb 2019 16:59:53 +0000. Datasource DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmod
Feb 01 16:59:53 localhost systemd[1]: cloud-final.service: Main process exited, code=exited, status=1/FAILURE
Feb 01 16:59:53 localhost systemd[1]: Failed to start Execute cloud user/final scripts.
Feb 01 16:59:53 localhost systemd[1]: cloud-final.service: Unit entered failed state.
Feb 01 16:59:53 localhost systemd[1]: cloud-final.service: Failed with result 'exit-code'.
Cloud config
#cloud-config
debug:
verbose: true
users:
- name: ubuntu
lock_passwd: False
groups: [adm, audio, cdrom, dialout, dip, floppy, lxd, netdev, plugdev, sudo, video]
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
plain_text_passwd: 'ubuntu'
snappy:
email: me@xxxxxxxx
packages: [avahi]
config:
avahi:
host-name: db-test
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1814294/+subscriptions
References