Stuck in Ubuntu Core Profile Setup

MikeB mabnhdev at gmail.com
Thu Sep 1 10:10:36 UTC 2016


I've been working on bringing up Ubuntu Core on some new hardware targets -
network switch whiteboxes.

Very recently, the first boot of Ubuntu Core has added a Profile Setup
step.  I'm stuck in this step and can't get out.  My target is now a
brick...

My Xenial Desktop development system is up to date as of this morning.

I built the kernel snap for the target using snapcraft 2.15.1.

I then use ubuntu-device-flash (Version 7 Rev 7 from the edge channel) to
build an image for the target using the following command.

ubuntu-device-flash core 16 --channel=edge --kernel=$snap --gadget=pc
--os=ubuntu-core -o $IMG

I then create an ONIE NOS Installer from the resulting image and install it
on my target switch.

Here's where the fun begins...

While the target is booting, it gets to the following and just sits there
forever with no indication that it is waiting for manual intervention -
requiring manual intervention during a boot is problematic for network
switches in any case.

===================================

...
[   24.633353] cloud-init[2405]: Cloud-init v. 0.7.7 running
'modules:config' at Thu, 01 Sep 2016 09:43:05 +0000. Up 24.04 seconds.
[   24.652503] cloud-init[2405]: 2016-09-01 09:43:06,375 -
util.py[WARNING]: Running module snappy (<module
'cloudinit.config.cc_snappy' from '/usr/lib/python3/distd
[FAILED] Failed to start Apply the settings specified in cloud-config.
See 'systemctl status cloud-config.service' for details.
         Starting Execute cloud user/final scripts...
ci-info: no authorized ssh keys fingerprints found for user ubuntu.
<14>Sep  1 09:43:09 ec2:
<14>Sep  1 09:43:09 ec2:
#############################################################
<14>Sep  1 09:43:09 ec2: -----BEGIN SSH HOST KEY FINGERPRINTS-----
<14>Sep  1 09:43:09 ec2: 1024
SHA256:TrfoEO2enrY3+HYlcxtKDV6MZjRSDvxwmdLaf07mEOI
root at localhost.localdomain (DSA)
<14>Sep  1 09:43:09 ec2: 256
SHA256:C0jrA04aKDV+z56ftvVNvd+NhUMf1zUncqpQPVSUnLg
root at localhost.localdomain (ECDSA)
<14>Sep  1 09:43:09 ec2: 256
SHA256:8t9b4izHmXc/RPKekQ6qP3yQM6icVOgrQgPLJ9d+XB8
root at localhost.localdomain (ED25519)
<14>Sep  1 09:43:09 ec2: 2048
SHA256:a2eY2+sMacC5UUy3k3hYGbXXP4KSJVhqYLu6vAu7xIw
root at localhost.localdomain (RSA)
<14>Sep  1 09:43:09 ec2: -----END SSH HOST KEY FINGERPRINTS-----
<14>Sep  1 09:43:09 ec2:
#############################################################
-----BEGIN SSH HOST KEY KEYS-----
ecdsa-sha2-nistp256
AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBATz2hu5/KC3AMAbx5ngRj+pzcaqntJ2Vu+YG3fk21MCJy0RwyorZWpcfJmRYu9YsWExNNLqI3ibkG4pe06MeCo=
roon
ssh-ed25519
AAAAC3NzaC1lZDI1NTE5AAAAICcyf82/UPZsuSzegwFjpegDn4l0jTW8ydd1/gtlGdqh
root at localhost.localdomain
ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABAQC4XYVVMexJ4gISwT5/GpiAZ/p2aPKJ9mHNq7bDUhSnNqGd++j5n9LbX8AeZSWJrvfXNI4h9HpEoc2Fcisp3xxGO/J+FeZXbkA5TTRtzLhi3AbPDbRA7ptEU3/xMhwIn
-----END SSH HOST KEY KEYS-----
[   27.730512] cloud-init[2461]: Cloud-init v. 0.7.7 running
'modules:final' at Thu, 01 Sep 2016 09:43:08 +0000. Up 27.21 seconds.
[   27.748699] cloud-init[2461]: ci-info: no authorized ssh keys
fingerprints found for user ubuntu.
[   27.764506] cloud-init[2461]: Cloud-init v. 0.7.7 finished at Thu, 01
Sep 2016 09:43:09 +0000. Datasource DataSourceNoCloud
[seed=/var/lib/cloud/seed/nocloud-nets

===================================

At this point, I happened to hit <ENTER> on the console keyboard, and a new
screen came up to

"Configure the network and setup an administrator account on this all-snap
Ubuntu Core system.  After this setup process you will have secure web or
command access to the system."

I followed the instructions and took default values for the network setup
since the switch gets everything from DHCP.  All good so far as it sets up
the network configuration.

At this point, it asks me to "Enter an email address from your account in
the store. ".

I enter the e-mail address I use whenever I log into 'Ubuntu One'.

At this point, I get one of two results.

1. I see a message saying 'Contacting the Store', then get the error
"Creating user failed:  error: bad user result: cannot create user for
<e-mail address>: no ssh keys found"

-- OR --

2. I immediately see the error "Creating user failed: error: bad user
result: cannot create user "<e-mail address>": Get
https://login.ubuntu.com/api/v2/keys/<email-address>: dial tcp: lookup
login.ubuntu.com on [::1]:53: read udp [::1]:40286->[::1]:53: read:
connection refused

I'l usually see the first error on the first try and the second error on
subsequent tries until I power-cycle the target switch.

In either case, I can never get past this setup, so as I said above, my
target switch is now a brick.

Can someone tell me how to get past this screen so that the boot completes
and I can get back to work?

Thanks, Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160901/5b10735e/attachment.html>


More information about the Snapcraft mailing list