<font size=2 face="sans-serif">Thanks Ramy.</font><br><font size=2 face="sans-serif">I will post the question....</font><br><br><font size=2 face="sans-serif">In fact, I do have the NODEPOOL_SSH_KEY
set.</font><br><font size=2 face="sans-serif">This key is only referenced by Jenkins
puppet to enable puppet to connect to the node.</font><br><font size=2 face="sans-serif">The problem here is that nodepool tries
to access the node through user=root, and there is no code that sets the
key (that was created by nodpool itself) to the node's root authorized_keys.</font><br><font size=2 face="sans-serif"> </font><br><br><font size=2 face="sans-serif">Isaac Beckman</font><br><font size=2 face="sans-serif"><br>Office: +972-3-6897874</font><br><font size=2 face="sans-serif">Fax: +972-3-6897755</font><br><font size=2 face="sans-serif">Mobile: +972-50-2680180<br>Email: isaacb@il.ibm.com</font><br><font size=2 face="sans-serif"><br>IBM XIV, Cloud Storage Solutions (previously HSG)</font><br><a href=www.ibm.com/storage/disk/xiv><font size=2 color=blue face="sans-serif">www.ibm.com/storage/disk/xiv</font></a><font size=2 face="sans-serif"><br></font><img src=cid:_1_D25A3424D25A31540052B81EC2257F8B width=152 height=68 style="border:0px solid;"><font size=2 face="sans-serif"> </font><br><br><br><br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">"Asselin, Ramy"
<ramy.asselin@hpe.com></font><br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">Isaac Beckman/Israel/IBM@IBMIL,
"ramy.asselin@hp.com" <ramy.asselin@hp.com>, OpenStack
Infra <openstack-infra@lists.openstack.org></font><br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">04/04/2016 05:52 PM</font><br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">RE: Nodepool
issue (is it a bug?)</font><br><hr noshade><br><br><br><font size=2 color=#004080 face="Calibri">Hi Isaac,</font><br><font size=2 color=#004080 face="Calibri"> </font><br><font size=2 color=#004080 face="Calibri">Please send these questions
to openstack-infra mailing list. You’ll get better responses.</font><br><font size=2 color=#004080 face="Calibri"> </font><br><font size=2 color=#004080 face="Calibri">Nodepool keys are injected
here as documented [1]</font><br><font size=2 color=#004080 face="Calibri"> </font><br><font size=2 color=#004080 face="Calibri"># Ensure the NODEPOOL_SSH_KEY
variable is in the environment</font><br><font size=2 color=#004080 face="Calibri"># Otherwise nodepool won't
be able to ssh into nodes based</font><br><font size=2 color=#004080 face="Calibri"># on the image built manually
using these instructions</font><br><font size=2 color=#004080 face="Calibri">source /etc/default/nodepool</font><br><font size=2 color=#004080 face="Calibri"> </font><br><font size=2 color=#004080 face="Calibri">I suspect you don’t have
that variable set.</font><br><font size=2 color=#004080 face="Calibri"> </font><br><font size=2 color=#004080 face="Calibri">Ramy</font><br><font size=2 color=#004080 face="Calibri"> </font><br><font size=2 color=#004080 face="Calibri">[1] </font><a href="http://docs.openstack.org/infra/openstackci/third_party_ci.html#start-nodepool"><font size=2 color=#004080 face="Calibri">http://docs.openstack.org/infra/openstackci/third_party_ci.html#start-nodepool</font></a><br><font size=2 color=#004080 face="Calibri"> </font><br><font size=2 face="Calibri"><b>From:</b> Isaac Beckman [</font><a href=mailto:ISAACB@il.ibm.com><font size=2 face="Calibri">mailto:ISAACB@il.ibm.com</font></a><font size=2 face="Calibri">]
<b><br>Sent:</b> Monday, April 04, 2016 4:29 AM<b><br>To:</b> ramy.asselin@hp.com<b><br>Subject:</b> Nodepool issue (is it a bug?)</font><br><font size=3 face="Times New Roman"> </font><br><font size=2 face="Arial">Hi Ramy,</font><font size=3 face="Times New Roman"><br></font><font size=2 face="Arial"><br>I'm working on setting a CI system for IBM storage products.<br>Currently I'm dealing with Nodepool.</font><font size=3 face="Times New Roman"><br></font><font size=2 face="Arial"><br>I created an image and uplad it to glance and then I use nodepool to create
VMs<br>I run the following command....</font><font size=3 face="Times New Roman"><br></font><font size=2 face="Arial"><br>> nodepool image-update</font><font size=3 face="Times New Roman"><br></font><font size=2 face="Arial"><br>After the VM is created in openstack nodepool tries to connect via ssh
and fails <br>the error is: (<b>from /var/log/nodepool.log</b>)</font><font size=2 color=red face="Arial"><br>2016-04-03 16:34:08,985 INFO nodepool.utils: Auth exception for </font><a href=mailto:root@9.11.122.132><font size=2 color=blue face="Arial"><u>root@9.11.122.132</u></font></a><font size=2 color=red face="Arial">.
Try number 18..</font><font size=3 face="Times New Roman"><br></font><font size=2 face="Arial"><br>I looked in nodepool.py. The problem seems to be with the following code:</font><font size=3 face="Times New Roman"><br><br></font><font size=2 face="Courier New"><br> def bootstrapServer(self, server, key, use_password=False):<br> log = logging.getLogger("nodepool.image.build.%s.%s"
%<br>
(self.provider.name, self.image.name))</font><font size=3 face="Times New Roman"><br></font><font size=2 face="Courier New"><br> ssh_kwargs = dict(log=log)<br> if not use_password:<br> ssh_kwargs['pkey'] = key<br> else:<br> ssh_kwargs['password'] = server['admin_pass']</font><font size=3 face="Times New Roman"><br></font><font size=2 face="Courier New"><br> host = utils.ssh_connect(server['public_ip'],
'root', ssh_kwargs,<br>
timeout=CONNECT_TIMEOUT)</font><font size=3 face="Times New Roman"><br></font><font size=2 face="Courier New"><br> if not host:<br> # We have connected to the node
but couldn't do anything as root<br> # try distro specific users,
since we know ssh is up (a timeout<br> # didn't occur), we can connect
with a very sort timeout.<br> for username in ['ubuntu', 'fedora',
'cloud-user', 'centos',<br>
'debian']:<br> try:<br> host
= utils.ssh_connect(server['public_ip'], username,<br>
ssh_kwargs,<br>
timeout=10)<br> if
host:<br>
break<br> except:<br> continue</font><font size=3 face="Times New Roman"><br></font><font size=2 face="Courier New"><br> if not host:<br> raise Exception("Unable
to log in via SSH")</font><font size=3 face="Times New Roman"><br></font><font size=2 face="Arial"><br>According to this code, nodepool tries to connect to the node with new
generated key (by paramiko) and user = 'root' or user = 'ubuntu';<br>The problem is that no one put the ssh key in theses users?<br>Is it a bug?</font><font size=3 face="Times New Roman"><br></font><font size=2 face="Arial"><br>Thanks,<br>Isaac Beckman<br><br>Office: +972-3-6897874<br>Fax: +972-3-6897755<br>Mobile: +972-50-2680180<br>Email: </font><a href=mailto:isaacb@il.ibm.com><font size=2 color=blue face="Arial"><u>isaacb@il.ibm.com</u></font></a><font size=2 face="Arial"><br><br>IBM XIV, Cloud Storage Solutions (previously HSG)</font><font size=3 color=blue face="Times New Roman"><u><br></u></font><a href=www.ibm.com/storage/disk/xiv><font size=2 color=blue face="Arial"><u>www.ibm.com/storage/disk/xiv</u></font></a><font size=3 face="Times New Roman"><br></font><img src=cid:_1_D49152CCD4913A000052B81EC2257F8B width=152 height=68 style="border:0px solid;"><font size=2 face="Arial"> </font><br><br><BR>