Question

Cloud init stoped working within the last 14 days.

When I create a new droplet using the api, cloud-init doesn’t work.

I can’t use ssh to log in with the ssh key defined in digital ocean. After at power cycle however the ssh key works again.

The supplied user_data (yaml file supplied in the api call) dont execute, meaning that the droplet isn’t configured the way I need it to be.

cloud-init.log contains two tracebacks:

2019-06-04 08:28:33,688 - util.py[DEBUG]: failed stage init
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 655, in status_wrapper
    ret = functor(name, args)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 284, in main_init
    sys.stderr.write("%s\n" % (netinfo.debug_info()))
  File "/usr/local/lib/python2.7/site-packages/cloudinit/netinfo.py", line 448, in debug_info
    netdev_lines = netdev_pformat().splitlines()
  File "/usr/local/lib/python2.7/site-packages/cloudinit/netinfo.py", line 393, in netdev_pformat
    (dev, data["up"], addr["ip"], empty, addr["scope6"],
KeyError: 'scope6'

and:

 2019-06-04 08:28:40,634 - util.py[DEBUG]: Running module ssh-authkey-fingerprints (<module 'cloudinit.config.cc_ssh_authkey_fingerprints' from '/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_ssh_
authkey_fingerprints.pyc'>) failed
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/cloudinit/stages.py", line 800, in _run_modules
    freq=freq)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/cloud.py", line 54, in run
    return self._runners.run(name, functor, args, freq, clear_on_fail)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/helpers.py", line 187, in run
    results = functor(*args)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_ssh_authkey_fingerprints.py", line 107, in handle
    (key_fn, key_entries) = ssh_util.extract_authorized_keys(user_name)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/ssh_util.py", line 209, in extract_authorized_keys
    (ssh_dir, pw_ent) = users_ssh_info(username)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/ssh_util.py", line 202, in users_ssh_info
    pw_ent = pwd.getpwnam(username)
KeyError: 'getpwnam(): name not found: freebsd'

If I skip the user_data part cloud-init still fails to init my ssh key.

I tried for 7 days to log into the support portal but I keep getting an SSO failure. Now im posting here instead.

I really need to get in touch with the support team at Digital Ocean to get this solved.

Thanks. -Danny


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Whenever I do an update/upgrade I get this:

1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up cloud-init (19.1-1-gbaa47854-0ubuntu1~16.04.1) ...
Leaving 'diversion of /etc/init/ureadahead.conf to /etc/init/ureadahead.conf.disabled by cloud-init'
[Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/cloudinit/sources/helpers/digitalocean.py'
[Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceDigitalOcean.py'
dpkg: error processing package cloud-init (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 cloud-init
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up cloud-init (19.1-1-gbaa47854-0ubuntu1~16.04.1) ...
Leaving 'diversion of /etc/init/ureadahead.conf to /etc/init/ureadahead.conf.disabled by cloud-init'
[Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/cloudinit/sources/helpers/digitalocean.py'
[Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceDigitalOcean.py'
dpkg: error processing package cloud-init (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 cloud-init
E: Sub-process /usr/bin/dpkg returned an error code (1)

Hey Danny,

Knowing more about the Droplet this is happening on will help us diagnose the root of the issue. You mentioned an SSO failure trying to login to the support portal; could you try once more via another browser/device? Should you continue facing issues you can email into support@digitalocean.com with all of the issue details + Droplet details so we can investigate with you on this. :)

Regards, Ethan Fox Developer Support Engineer II - DigitalOcean

(Check out our fantastic community articles: https://www.digitalocean.com/community)