If id_rsa.pub fails during build, 'drush vagrant-shell' will fail.

Comments

helmo’s picture

Status: Active » Needs work

I've also ran into this a couple of times.

Not sure why this is happening, but afterwards the situation is not handles properly.

Analysis:
* drush vagrant shell is called to determine the fqdn and IP
* In drush_vagrant_shell() drush_shell_exec_interactive is calling ssh
* The resulting status code is not properly saved/returned
* Thus the string "Permission denied (publickey,password)." is stored as fqdn

The drushrc contains an invalid fqdn and IP:

$ drush sa @aegir-up1
$aliases['aegir-up1'] = array (
  'project-path' => '/data/vagrant/projects/aegirtest1',
  'type' => 'vm',
  'vm-name' => 'aegir-up1',
  'fqdn' => 'Permission denied (publickey,password).',
  'ip-addr' => '(publickey,password).',
);

Log:

[aegir-up-dev1] Running provisioner: Vagrant::Provisioners::Puppet...
[aegir-up-dev1] Running Puppet with /tmp/vagrant-puppet/manifests/site.pp...
stdin: is not a tty
Could not find default node or by name with 'aegir-up-dev.aegirdev.local, aegir-up-dev.aegirdev, aegir-up-dev' on node aegir-up-dev.aegirdev.local

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

cd /tmp/vagrant-puppet/manifests && FACTER_git_name='Herman van Rink' FACTER_fqdn='' FACTER_aegir_user='aegir' FACTER_aegir_user_exists='true' FACTER_gid='1000' FACTER_uid='1000' FACTER_git_email='a@b' FACTER_aegir_root='/var/aegir' FACTER_username='helmo' puppet apply  --modulepath '/tmp/vagrant-puppet/modules-0' /tmp/vagrant-puppet/manifests/site.pp
Retrieved the FQDN for the aegir-up-dev1 VM.                                                                                      [ok]
Retrieved the IP address for the aegir-up-dev1 VM.                                                                                [ok]
Wrote project aliases file to /home/helmo/.drush/aegirdev.aliases.drushrc.php.                                                    [ok]
Enter your password to add entries for the VMs in your project to your /etc/hosts file.
sh: 1: Syntax error: "(" unexpected
Your project was successfully initialized.
The root for your project is '/home/helmo/vagrant/projects/aegirdev'
ergonlogic’s picture

Status: Needs work » Needs review

This should be fixed with a commit from a couple weeks ago, wherein we now specify '--default-user' when calling vagrant-shell during builds.

helmo’s picture

Status: Needs review » Fixed

That has probably fixed the root cause. However the lack of error handling that allowed the string "Permission denied (publickey,password)." to be stored as fqdn is probably not changed.... but that's for a later moment....

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.