Ask Your Question
0

packstack fails during setting up ssh key

asked 2015-10-15 09:02:41 -0600

ameya gravatar image
 cat /etc/fedora-release 
Fedora release 21 (Twenty One)
[fedora@asathe-fedora21 ~]$ rpm -qf /usr/bin/packstack
openstack-packstack-2015.1-0.11.dev1616.g5526c38.fc23.noarch
[fedora@asathe-fedora21 ~]$ hostname
asathe-fedora21.os1.phx2.redhat.com
[fedora@asathe-fedora21 ~]$ ping -c1 `hostname`
PING asathe-fedora21.os1.phx2.redhat.com (172.16.157.7) 56(84) bytes of data.
64 bytes from asathe-fedora21.os1.phx2.redhat.com (172.16.157.7): icmp_seq=1 ttl=64 time=0.020 ms

--- asathe-fedora21.os1.phx2.redhat.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.020/0.020/0.020/0.000 ms
[fedora@asathe-fedora21 ~]$

selinux is in permissive mode. packstack --allinone reports error during setup of ssh keys.

Setting up ssh keys                               [ ERROR ]

ERROR : Failed to run remote script, stdout:

openstack-setup.log is as follows:

<snip>
chmod 400 ~/.ssh/authorized_keys
restorecon -r ~/.ssh
2015-10-15 12:51:26::ERROR::run_setup::1018::root:: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 993, in main
    single_step_aio_install(options, logFile)
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 761, in single_step_aio_install
    single_step_install(options, logFile)
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 792, in single_step_install
    _main(options, answerfilepath, logFile)
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 655, in _main
    runSequences()
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 626, in runSequences
    controller.runAllSequences()
  File "/usr/lib/python2.7/site-packages/packstack/installer/setup_controller.py", line 81, in runAllSequences
    sequence.run(config=self.CONF, messages=self.MESSAGES)
  File "/usr/lib/python2.7/site-packages/packstack/installer/core/sequences.py", line 109, in run
    step.run(config=config, messages=messages)
  File "/usr/lib/python2.7/site-packages/packstack/installer/core/sequences.py", line 50, in run
    self.function(config, messages)
  File "/usr/lib/python2.7/site-packages/packstack/plugins/prescript_000.py", line 1198, in install_keys
    install_keys_on_host(hostname, sshkeydata)
  File "/usr/lib/python2.7/site-packages/packstack/plugins/prescript_000.py", line 1182, in install_keys_on_host
    server.execute()
  File "/usr/lib/python2.7/site-packages/packstack/installer/utils/shell.py", line 128, in execute
    raise ScriptRuntimeError(msg, stdout=out, stderr=err)
ScriptRuntimeError: Failed to run remote script, stdout: 
stderr: Warning: Permanently added '172.16.157.7' (ECDSA) to the list of known hosts.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
</snip>

I've created passwordless login for fedora user for this host and able to successfully login.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-10-15 10:28:44 -0600

mpetason gravatar image

It looks like it's trying to login with root. You may want to add your public key to the authorized_keys for root instead of fedora.

2015-10-15 12:51:26::ERROR::run_setup::1018::root:: Traceback (most recent call last):

Then it hasn't connected to the host before with the information provided so it adds it to the hosts file.

I'm not a packstack expert so we could wait for someone to come in who is. That's how I would read the error message you are receiving.

edit flag offensive delete link more

Comments

1

I had a similar issue. For me, the culprit was PermitRootLogin no in /etc/ssh/sshd_config. Once I changed this to yes, the automatically-generated id_rsa.pub is copied into /root/.ssh/authorized_keys and packstack installation proceeds.

gojun077 gravatar imagegojun077 ( 2016-02-21 20:32:18 -0600 )edit

That worked for me too, thanks gojun077!

gouthamraj91 gravatar imagegouthamraj91 ( 2017-05-24 07:50:47 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-10-15 09:02:41 -0600

Seen: 2,443 times

Last updated: Oct 15 '15