manual provider add-machine fails if no ubuntu user on machine

Bug #1356899 reported by Kapil Thangavelu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Critical
Jesse Meek

Bug Description

bootstrap works fine, but add-machine fails with

2014/08/14 10:15.51:DEBUG Running juju command: juju add-machine ssh:root@192.241.201.218 --ssh-key /home/kapil/.ssh/id_dsa
No passwd entry for user 'ubuntu'
ERROR subprocess encountered error code 1
2014/08/14 10:15.55:ERROR Failed to run command juju add-machine ssh:root@192.241.201.218 --ssh-key /home/kapil/.ssh/id_dsa

description: updated
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

also fwiw, this is a major regression against 1.18

tags: added: manual-provider
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

actually it fails with bootstrap as well, i had updated my trunk (so some change in the last week broke this) between bootstrap and add-machine which is why it worked on the former.

Changed in juju-core:
importance: Undecided → Critical
tags: added: regression
Changed in juju-core:
milestone: none → 1.21-alpha1
Revision history for this message
Kapil Thangavelu (hazmat) wrote :
Download full text (3.2 KiB)

here's the output with --debug

2014/08/14 10:58.49:DEBUG Running juju command: juju bootstrap --debug --upload-tools --series precise,trusty
2014-08-14 14:58:49 INFO juju.cmd supercommand.go:37 running juju [1.21-alpha1-trusty-amd64 gc]
Use of --series is deprecated. Please use --upload-series instead.
2014-08-14 14:58:49 INFO juju.environs.manual init.go:148 initialising "162.243.123.121", user "root"
2014-08-14 14:58:49 DEBUG juju.utils.ssh ssh_openssh.go:131 running: ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" -o "ServerAliveInterval 30" -i /opt/juju/boot-ocean/ssh/juju_id_rsa -i /home/kapil/.ssh/id_rsa -i /home/kapil/.ssh/id_dsa ubuntu@162.243.123.121 sudo -n true
2014-08-14 14:58:50 DEBUG juju.utils.ssh ssh_openssh.go:131 running: ssh -o "StrictHostKeyChecking no" -o "ServerAliveInterval 30" -t -t -i /opt/juju/boot-ocean/ssh/juju_id_rsa -i /home/kapil/.ssh/id_rsa -i /home/kapil/.ssh/id_dsa root@162.243.123.121 sudo "/bin/bash -c '
set -e
umask 0077
temp=\$(mktemp)
echo '\"'\"'ubuntu ALL=(ALL) NOPASSWD:ALL'\"'\"' > \$temp
install -m 0440 \$temp /etc/sudoers.d/90-juju-ubuntu
rm \$temp
su ubuntu -c '\"'\"'install -D -m 0600 /dev/null ~/.ssh/authorized_keys'\"'\"'
export authorized_keys='\"'\"'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkJpczRanMozBC8A9r5oODzLH0prAJVh4vzQPgFvYKw0gnkS9YBcR6d1b05CzY9mm1Yw+nQZFO9N9SjnJbr4Xz3eu0KBO84TvkwU1gIM1j1ln/xD4Cv1KsXFCpxjKM0h7eFntvOTJCxo9/g3uNmhQ3GvGm+KfOU/zaS6h/Ynn/dskhElBL/xJmq9LL9lPS07u2td5d8hbxY94Mf5jvhTWjp6x+wWZul7NxYFwhpyrD9ygnF/iQxxmmChtw\
iw5tEZFiAbp2eIHQ0NxiwoXSb6TaWwQo2XUBQ38wVfM/VAqOZRbE3m7926/XZsaDBtvRgzhf4l/kAsYH42F159OFPHxl juju-client-key
ssh-dss AAAAB3NzaC1kc3MAAACBAKT2bynvGT1/WbQRAV0EDQ/bGnit57aJjteKHIqZootUnpvZ3RwbcjACFjl9kJg1EsVn3jjzRcfPaNKX53xqOjKfBJYRliCI+cvqwoC3Vtx+MnUm64e2dKEc13fBdRHaCH3QSfe614Hr1nv8UazDxs65Ic9+fGdfe4+xfOkLRff/AAAAFQDCS3mDWD0rfbVM7BszMuLE/W37aQAAAIBMeU71/UUBmBFFH1mfXFG0jz9kUlc8Q6avdhZhbUMOs97rD+RTJsVDt6wznO9cVNGJpqmkveGB1R4HtI\
v8l5akKMnZuR84sB88bbAyEbufp2Dzu8WEILCAy97QbLR3yeDA+bSWCqaDqnUcBePpN+VXBxCVci06mWYcgqF1JlRF2wAAAIBqslaS0khju/JcGuszOzCdPyzox1eFpB7LZ1ndxx10ZVS9HWOCLcIQk0VnzZNzlzB1po1SHmHuPBsmGASs0g6WMyKXBEbiUO+BWCdrUD+f3M3RGy+0gcNebr271dvY+Gc5cQZknxdpbt0y3GJbZDnXQ0zR5eZuu1RmUcVTMsNJ/Q== <email address hidden>
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA2G+pJiqup78e+QsXe39MNBLFkSAJ5X/TG/Wt4wyJKfLLWNWgO3WLCFFUSvGEbA7eLF6MSNHqz1ZRST3NzZ83IJaLkisl2cABBqZ8rFS35K5pFRNqyUhYn52fKla2Kx3lQP+vnmUKzCgy3ZHZihMuI83z0GlJ0BZK/o3acAWDhddTUP0ZppBnWK9nx0qxi6T1uX/3tV0yRhUoRicl67uWtVzxxBbHwnT1PuY4sLcCLzJduAei+Rx2GZNe6DSV48EPw5LW7lcyEipNkwbFt6ddhFHbPu\
tZxr+3ZV4k/YQ7ObNg4hRTaOud4TBi8zCBnA1rNiTXjGEZAI95r9c0XmyINQ== <email address hidden>
'\"'\"'
if [ ! -z \"\$authorized_keys\" ]; then
    su ubuntu -c '\"'\"'printf \"%s\\n\" \"\$authorized_keys\" >> ~/.ssh/authorized_keys'\"'\"'
fi'"
No passwd entry for user 'ubuntu'
2014-08-14 14:58:50 ERROR juju.provider.manual provider.go:31 initializing ubuntu user: subprocess encountered error code 1 (Connection to 162.243.123.121 closed.)
2014-08-14 14:58:50 ERROR juju.cmd supercommand.go:323 there was an issue examining the environment: subprocess encountered error code 1 (Connection to 162.243.123.121 closed.)
2014...

Read more...

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

only effects trunk .. 1.20.4 does the right thing

Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
no longer affects: juju-core/1.20
Revision history for this message
Nate Finch (natefinch) wrote :

This is almost certainly due to this change: https://github.com/juju/juju/pull/289

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

yeah... looks like a one liner fix .. line 180 of init.go

Jesse Meek (waigani)
Changed in juju-core:
assignee: nobody → Jesse Meek (waigani)
status: Triaged → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
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.