Ansible ssh (ping) not working #286
Comments
Can you log in via SSH directly to this host using this key? Also, could you look at the server log via the OpenStack console? We're looking to see if cloud-init can pull the public key from the metadata service. |
I suppose the problem is that you forgot to run security-setup and add "-e @security.yml" before hosts provisioning. |
I am slightly confused by the documentation and the security Apparently, ansible-playbook site.yml --extra-vars=@security.yml is also openstack/provision-nova-key.yml also does that and the documentation asks Can anyone clarify the correct sequence of commands ? Do I need to run @security.yml before provision-nova-key.yml ?? Thanks, On Mon, May 18, 2015 at 7:58 AM, Vitalii Turovets notifications@github.com
|
Here is what I am doing :
security.yml tries to provision the hosts and then fails to reach it. Is this the correct order ? Here is the output when I run ansible-playbook site.yml admin@ubuntu-linux:~/saspraha/microservices-infrastructure$ PLAY [localhost] TASK: [check for security] skipping: [localhost] PLAY [localhost] TASK: [verify openstack environment] skipping: [localhost] => (item=OS_USERNAME) PLAY [all] TASK: [add ssh key to openstack tenant] ok: [host-04 -> 127.0.0.1] PLAY [localhost] TASK: [verify openstack environment] skipping: [localhost] => (item=OS_USERNAME) PLAY [all] TASK: [nova_compute ] changed: [host-02] TASK: [set ansible_ssh_host value to host private_ip] ok: [host-01] TASK: [print host ip address] ok: [host-01] => { TASK: [wait for host boot] ok: [host-05 -> 127.0.0.1] PLAY [all] TASK: [refresh yum cache] fatal: [host-01] => SSH Error: Permission denied FATAL: all hosts have already failed -- aborting PLAY RECAP wait for host boot ---------------------------------------------------- host-01 : ok=5 changed=1 unreachable=1 admin@ubuntu-linux:~/saspraha/microservices-infrastructure$ thanks, On Mon, May 18, 2015 at 11:16 AM, Saswat Praharaj saswat@gmail.com wrote:
|
@saswatp your SSH public key is deployed to the host during OpenStack provisioning. This is why I'm asking you to test direct SSH connections into the server. Even if nothing else is run from ansible, you should be able to log into the host once it is up and running. If you populate the file |
Steven, My bad, I forgot to mention that . Direct SSH connection to the provisioned ssh -o PasswordAuthentication=no centos@192.168.0.247 -vvv debug1: Unspecified GSS failure. Minor code may provide more information debug1: Unspecified GSS failure. Minor code may provide more information debug1: Unspecified GSS failure. Minor code may provide more information debug2: we did not send a packet, disable method Thanks, On Mon, May 18, 2015 at 11:34 AM, Steven Borrelli notifications@github.com
|
Ok, that helps. Can you run We're looking for cloud-init logs. You should see something like this:
|
root@openstack-kilo-aio:/home/cisco# nova console-log host-02 Welcome to [0;34mCentOS Linux 7 (Core) dracut-033-240.el7 (Initramfs)[0m! [ 0.967956] systemd[1]: No hostname configured. Welcome to [0;31mCentOS Linux 7 (Core)[0m! [[32m OK [0m] Stopped Switch Root. CentOS Linux 7 (Core) host-192-168-0-247 login: cloud-init[771]: 2015-05-18 18:36:28,700 - ssh-ed25519 -----END SSH HOST KEY KEYS----- Thanks, On Mon, May 18, 2015 at 11:46 AM, Steven Borrelli notifications@github.com
|
This is an issue we have seen in the past with openstack, where the metadata service fails to provide the ssh key to the instance on boot. We've found that sometimes shutting down/restarting the instance helps (or we just re-provision it). |
Restarting or re-provisioning it doesn't work. I am giving up on this. So, I moved to another setup (CCS) and re-trying . I am running into completely unrelated issue when i try to provision hosts. Host provisioning fails : microservices-infrastructure]> ansible-playbook -i inventory/1-datacenter PLAY [localhost] TASK: [verify openstack environment] skipping: [localhost] => (item=OS_USERNAME) PLAY [all] TASK: [nova_compute ] failed: [host-03] => {"failed": true, "parsed": false} failed: [host-01] => {"failed": true, "parsed": false} failed: [host-02] => {"failed": true, "parsed": false} failed: [host-04] => {"failed": true, "parsed": false} failed: [host-05] => {"failed": true, "parsed": false} FATAL: all hosts have already failed -- aborting PLAY RECAP nova_compute ----------------------------------------------------------- host-01 : ok=0 changed=0 unreachable=0 On Mon, May 18, 2015 at 12:05 PM, Steven Borrelli notifications@github.com
|
Can you check your versions of ansible and python-novaclient? This is what I have:
|
I had ansible version 1.9.1 but I again installed 1.9.0.1 to be sure , but
[saspraha@SASPRAHA-M-910F microservices-infrastructure]> ansible-playbook failed: [host-02] => {"failed": true, "parsed": false} FATAL: all hosts have already failed -- aborting PLAY RECAP nova_compute ----------------------------------------------------------- host-01 : ok=0 changed=0 unreachable=0 On Mon, May 18, 2015 at 5:40 PM, Steven Borrelli notifications@github.com
|
In python can you try running?
|
Python 2.7.9 (v2.7.9:648dcafa7e5f, Dec 10 2014, 10:10:46)
On Mon, May 18, 2015 at 6:34 PM, Steven Borrelli notifications@github.com
|
this is probably caused by ansible 1.9.1 1 uninstall all versions of ansible:
2 download and install ansible 1.8.4 using yum, from downloaded rpm 3 install ansible 1.9.0.1 using pip
4 check what you have
do not upgrade ansible try deploying cluster |
I worked with @saswatp today on this and was unable to make any progress on this. I think this is an issue for the Ansible folks. |
@saswatp we got rid of using Ansible to deploy openstack nodes in favor of terraform (due to issues like this one). I'm going to close this issue. Please feel free to open it again, or open an issue against the terraform openstack deployment. |
I have been trying to follow the instruction for openstack setup using microservices-infrastructure 2.0 version . While host-* vms have been created successfully , software installation is failing as ansible is not able to ssh into the hosts.
I am using Openstack kilo and CentOS7 . CentOS7 image does have a centos user.
Here are the logs :
The text was updated successfully, but these errors were encountered: