<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Hi Isaac,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Please send these questions to openstack-infra mailing list. You’ll get better responses.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Nodepool keys are injected here as documented [1]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"># Ensure the NODEPOOL_SSH_KEY variable is in the environment<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"># Otherwise nodepool won't be able to ssh into nodes based<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"># on the image built manually using these instructions<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">source /etc/default/nodepool<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">I suspect you don’t have that variable set.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Ramy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">[1] http://docs.openstack.org/infra/openstackci/third_party_ci.html#start-nodepool<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Isaac Beckman [mailto:ISAACB@il.ibm.com]
<br>
<b>Sent:</b> Monday, April 04, 2016 4:29 AM<br>
<b>To:</b> ramy.asselin@hp.com<br>
<b>Subject:</b> Nodepool issue (is it a bug?)<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Hi Ramy,</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">I'm working on setting a CI system for IBM storage products.</span><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">Currently I'm dealing with Nodepool.</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">I created an image and uplad it to glance and then I use nodepool to create VMs</span><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">I run the following command....</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">> nodepool image-update</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">After the VM is created in openstack nodepool tries to connect via ssh and fails
</span><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">the error is: (<b>from /var/log/nodepool.log</b>)</span><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:red">2016-04-03 16:34:08,985 INFO nodepool.utils: Auth exception for
<a href="mailto:root@9.11.122.132">root@9.11.122.132</a>. Try number 18..</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">I looked in nodepool.py. The problem seems to be with the following code:</span><br>
<br>
<br>
<tt><span style="font-size:10.0pt">    def bootstrapServer(self, server, key, use_password=False):</span></tt><br>
<tt><span style="font-size:10.0pt">        log = logging.getLogger("nodepool.image.build.%s.%s" %</span></tt><br>
<tt><span style="font-size:10.0pt">                                (self.provider.name, self.image.name))</span></tt><br>
<br>
<tt><span style="font-size:10.0pt">        ssh_kwargs = dict(log=log)</span></tt><br>
<tt><span style="font-size:10.0pt">        if not use_password:</span></tt><br>
<tt><span style="font-size:10.0pt">            ssh_kwargs['pkey'] = key</span></tt><br>
<tt><span style="font-size:10.0pt">        else:</span></tt><br>
<tt><span style="font-size:10.0pt">            ssh_kwargs['password'] = server['admin_pass']</span></tt><br>
<br>
<tt><span style="font-size:10.0pt">        host = utils.ssh_connect(server['public_ip'], 'root', ssh_kwargs,</span></tt><br>
<tt><span style="font-size:10.0pt">                                 timeout=CONNECT_TIMEOUT)</span></tt><br>
<br>
<tt><span style="font-size:10.0pt">        if not host:</span></tt><br>
<tt><span style="font-size:10.0pt">            # We have connected to the node but couldn't do anything as root</span></tt><br>
<tt><span style="font-size:10.0pt">            # try distro specific users, since we know ssh is up (a timeout</span></tt><br>
<tt><span style="font-size:10.0pt">            # didn't occur), we can connect with a very sort timeout.</span></tt><br>
<tt><span style="font-size:10.0pt">            for username in ['ubuntu', 'fedora', 'cloud-user', 'centos',</span></tt><br>
<tt><span style="font-size:10.0pt">                             'debian']:</span></tt><br>
<tt><span style="font-size:10.0pt">                try:</span></tt><br>
<tt><span style="font-size:10.0pt">                    host = utils.ssh_connect(server['public_ip'], username,</span></tt><br>
<tt><span style="font-size:10.0pt">                                             ssh_kwargs,</span></tt><br>
<tt><span style="font-size:10.0pt">                                             timeout=10)</span></tt><br>
<tt><span style="font-size:10.0pt">                    if host:</span></tt><br>
<tt><span style="font-size:10.0pt">                        break</span></tt><br>
<tt><span style="font-size:10.0pt">                except:</span></tt><br>
<tt><span style="font-size:10.0pt">                    continue</span></tt><br>
<br>
<tt><span style="font-size:10.0pt">        if not host:</span></tt><br>
<tt><span style="font-size:10.0pt">            raise Exception("Unable to log in via SSH")</span></tt><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">According to this code, nodepool tries to connect to the node with new generated key (by paramiko) and user = 'root' or user = 'ubuntu';</span><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">The problem is that no one put the ssh key in theses users?</span><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">Is it a bug?</span><br>
<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">Thanks,</span><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">Isaac Beckman</span><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif"><br>
Office: +972-3-6897874</span><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">Fax: +972-3-6897755</span><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">Mobile: +972-50-2680180<br>
Email: <a href="mailto:isaacb@il.ibm.com">isaacb@il.ibm.com</a></span><br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif"><br>
IBM XIV, Cloud Storage Solutions (previously HSG)</span><br>
<a href="www.ibm.com/storage/disk/xiv"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">www.ibm.com/storage/disk/xiv</span></a><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><br>
</span><img border="0" width="152" height="68" id="_x0000_i1025" src="cid:image001.gif@01D18E46.222833D0"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> 
</span><o:p></o:p></p>
</div>
</body>
</html>