ssh-authkey-fingerprints fails on boot

Bug #1073204 reported by Neil Wilson
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I'm getting a failure in cloud-init on boot

Oct 30 14:34:45 srv-2dg76 [CLOUDINIT] util.py[WARNING]: Running ssh-authkey-fingerprints (<module 'cloudinit.config.cc_ssh_authkey_fingerprints' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.pyc'>) failed
Oct 30 14:34:45 srv-2dg76 [CLOUDINIT] util.py[DEBUG]: Running ssh-authkey-fingerprints (<module 'cloudinit.config.cc_ssh_authkey_fingerprints' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.pyc'>) failed#012Traceback (most recent call last):#012 File "/usr/lib/python2.7/dist-packages/cloudinit/stages.py", line 531, in _run_modules#012 cc.run(run_name, mod.handle, func_args, freq=freq)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/cloud.py", line 63, in run#012 return self._runners.run(name, functor, args, freq, clear_on_fail)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/helpers.py", line 178, in run#012 results = functor(*args)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.py", line 105, in handle#012 auth_key_entries, hash_meth)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.py", line 83, in _pprint_key_entries#012 max_len = len(max(authtbl_lines, key=len))#012ValueError: max() arg is an empty sequence

which causes a dmesg log

[ 30.965377] init: cloud-final main process (1098) terminated with status 1

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: cloud-init 0.7.0-0ubuntu2
ProcVersionSignature: User Name 3.5.0-17.28-generic 3.5.5
Uname: Linux 3.5.0-17-generic x86_64
ApportVersion: 2.6.1-0ubuntu6
Architecture: amd64
Date: Tue Oct 30 15:25:45 2012
MarkForUpload: True
PackageArchitecture: all
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Neil Wilson (neil-aldur) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cloud-init (Ubuntu):
status: New → Confirmed
Revision history for this message
Scott Moser (smoser) wrote :

Hey, can you verify that this is still a problem on 14.04, and give some info on how you did it ?
Did the user have no keys?

Revision history for this message
Neil Wilson (neil-aldur) wrote : Re: [Bug 1073204] Re: ssh-authkey-fingerprints fails on boot

All looks fine on Trusty.

I've built both with the same user. The current Trusty works and the
current Quantal does not.

On 3 June 2014 16:33, Scott Moser <email address hidden> wrote:
> Hey, can you verify that this is still a problem on 14.04, and give some info on how you did it ?
> Did the user have no keys?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1073204
>
> Title:
> ssh-authkey-fingerprints fails on boot
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1073204/+subscriptions

--
Neil Wilson

Revision history for this message
Scott Moser (smoser) wrote :

marking as fix-released as this is fixed in 14.04 per Neil's comment.

Changed in cloud-init (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Fix Released
Revision history for this message
Daniel Bidwell (bidwell) wrote :

I am running maas-*-1.7.1 and I am still getting this on machines when trying to commission them. These machines used to commission just fine, maybe before the last update. Now nothing commissions. What kinds of logs are useful and from which machines, the maas server or the client machines that are trying to be commissioned? This is on the current 14.04.1 ubuntu.

Revision history for this message
Jan Segre (jansegre) wrote :

I am having this bug in trusty apparently:

```
Ubuntu 14.04.2 LTS ubuntu ttyS0

ubuntu login: Cloud-init v. 0.7.5 running 'modules:final' at Wed, 03 Jun 2015 19:49:18 +0000. Up 13.50 seconds.
2015-06-03 19:49:18,181 - util.py[WARNING]: Running ssh-authkey-fingerprints (<module 'cloudinit.config.cc_ssh_authkey_fingerprints' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_ssh_authkey_fingerprints.pyc'>) failed
ec2:
ec2: #############################################################
ec2: -----BEGIN SSH HOST KEY FINGERPRINTS-----
ec2: -----END SSH HOST KEY FINGERPRINTS-----
ec2: #############################################################
-----BEGIN SSH HOST KEY KEYS-----
-----END SSH HOST KEY KEYS-----
Cloud-init v. 0.7.5 finished at Wed, 03 Jun 2015 19:49:18 +0000. Datasource DataSourceOpenStack [net,ver=2]. Up 13.66 seconds
```

I tried with all trusty cloud images currently on https://cloud-images.ubuntu.com/trusty/ which as of now are 20150313, 20150531, 20150601 and 20150602, the current points to 20150531. The same problem occurs.

Current precise, utopic and vivid images work just fine, as well as fedora and coreos images. But trusty images have this issue.

However the very SAME trusty images (untouched) were working about two weeks ago. I tracked all little changes we made on our OpenStack deployment to see if they were somehow related but reverting them did no good.

I'm currently not entirely sure there is a bug on cloud-init, however it can't be anywhere else since cloud-init from all other images work like a charm.

Revision history for this message
Jan Segre (jansegre) wrote :

This actually happened because of our use of vendordata, adding and empty "cloud-init" entry to it solves the problem.

Revision history for this message
Rafa_FS (flyingstones) wrote :

I staked with this problem which affect Xenial only, in Trusty all works fine... this when I trying to deploy with MAAS (or Juju).
In Juju I find the environments.yaml to edit somethin but, Jan Segre please how and where can I "adding and empty 'cloud-init' entry to it solves the problem"

In brief, I started with MAAS 2.0 in a LXD container, then in the host, now i updated to 2.1, erasing all the cache in every update, i renewed the ssh keys, etc...

I don't know what more can do....

Please help! Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.