<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=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@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;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri","sans-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;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"批注框文本 Char";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:9.0pt;
font-family:"Calibri","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
text-indent:21.0pt;
font-size:10.5pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.Char
{mso-style-name:"批注框文本 Char";
mso-style-priority:99;
mso-style-link:批注框文本;
font-family:"Calibri","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1640450959;
mso-list-type:hybrid;
mso-list-template-ids:-217268872 -171246080 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-text:"%1\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:27.0pt;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-text:"%2\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:51.0pt;
text-indent:-21.0pt;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:72.0pt;
text-indent:-21.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:93.0pt;
text-indent:-21.0pt;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-text:"%5\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:114.0pt;
text-indent:-21.0pt;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:135.0pt;
text-indent:-21.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:156.0pt;
text-indent:-21.0pt;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-text:"%8\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:177.0pt;
text-indent:-21.0pt;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:198.0pt;
text-indent:-21.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></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="ZH-CN" link="blue" vlink="purple" style="text-justify-trim:punctuation">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">Hi Ramy,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:9.0pt"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">Thanks for your help.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:9.0pt"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-indent:9.0pt"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">I have already confirmed proxy setting again, and it works fine(no matter whether the NODEPOOL_ variables are declared or not):<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:27.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA"><span style="mso-list:Ignore">1)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">not only in the host machine on which DIB run,
<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:27.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA"><span style="mso-list:Ignore">2)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">but also in the first half part of DIB(before the DIB running chroot).<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:27.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1">
<![if !supportLists]><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA"><span style="mso-list:Ignore">3)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">furthmore, I ran the commands manually in the host env, they also works fine.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:27.0pt;text-indent:10.5pt"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">$</span><span lang="EN-US">
</span><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">sudo -H virtualenv /usr/zuul-swift-logs-env<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:27.0pt;text-indent:10.5pt"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">$</span><span lang="EN-US">
</span><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">sudo -H /usr/zuul-swift-logs-env/bin/pip install python-magic argparse requests glob2<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:9.0pt"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-indent:9.0pt"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">So, if I understood correctly, it seems obvious, that the proxy setting is missed when DIB goes into chroot env.
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:9.0pt"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">Thus, when DIB attempts to connect internet to download/install/update some materials to prepare the image within the chroot env, the error will
be encountered.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:9.0pt"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">In this case, DIB will run “pip install” in the chroot env zuul-swift-logs-env to install python-magic, argparse and so forth.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:9.0pt"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-indent:9.0pt"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">Actually, all NODEPOOL_ variables were already declared by the install_master.sh previously, and the proxy setting also derived from the host machine`s
proxy setting.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:9.0pt"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-indent:9.0pt"><span lang="EN-US" style="color:#1F497D;mso-fareast-language:JA">Xiexs<o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Asselin, Ramy [mailto:ramy.asselin@hp.com]
<br>
<b>Sent:</b> Tuesday, August 04, 2015 12:54 PM<br>
<b>To:</b> OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b> Re: [openstack-dev] [CI]How to set proxy for nodepool<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Hi Xiexs,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">You are using disk image builder (DIB), so make sure your proxy is set correctly also without the NODEPOOL_ prefix.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Those NODEPOOL_ prefixed variables are what would be used when DIB is not used / when the script approach is used with nova/glance (nodepool image-update). I don’t recommend using
that if you can use DIB.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Also, I’ve found some of the infra project-config elements don’t work in my environment and aren’t needed as they’re specific to infra. For those, simply comment out the portions
that don’t work. I didn’t notice any negative side-effects.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Ramy<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" align="left" style="text-align:left"><b><span lang="EN-US" style="font-size:11.0pt">From:</span></b><span lang="EN-US" style="font-size:11.0pt"> Xie, Xianshan [<a href="mailto:xiexs@cn.fujitsu.com">mailto:xiexs@cn.fujitsu.com</a>]
<br>
<b>Sent:</b> Monday, August 03, 2015 9:37 PM<br>
<b>To:</b> <a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a><br>
<b>Subject:</b> [openstack-dev] [CI]How to set proxy for nodepool<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:JA">Hi All,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">When I ran “nodepool image-build <image-name>” to create a new image, I got this error message:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">…<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">INFO nodepool.image.build.dpc: + sudo -H virtualenv /usr/zuul-swift-logs-env<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">INFO nodepool.image.build.dpc: sudo: unable to resolve host fnst01<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">INFO nodepool.image.build.dpc: + sudo -H /usr/zuul-swift-logs-env/bin/pip install python-magic argparse requests glob2<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">INFO nodepool.image.build.dpc: sudo: unable to resolve host fnst01<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">INFO nodepool.image.build.dpc: Collecting python-magic<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">INFO nodepool.image.build.dpc: Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.',
gaierror(-5, 'No address associated with hostname'))': /simple/python-magic/<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">INFO nodepool.image.build.dpc: Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.',
gaierror(-5, 'No address associated with hostname'))': /simple/python-magic/<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">…<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">And I exported the bash env when the script elements/nodepool-base/install.d/90-venv-swift-logs ran,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">it seems that the nodepool proxy and dns has already been set:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">declare -x NODEPOOL_HTTPS_PROXY=<a href="http://xx.xx.xx.xx:8080/">http://xx.xx.xx.xx:8080/</a> </span><span lang="EN-US" style="font-family:Wingdings;mso-fareast-language:JA">ß</span><span lang="EN-US" style="mso-fareast-language:JA">valid
proxy<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">declare -x NODEPOOL_HTTP_PROXY="<a href="http://xx.xx.xx.xx:8080/">http://xx.xx.xx.xx:8080/</a>"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">declare -x NODEPOOL_NO_PROXY="localhost,127.0.0.1"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">declare -x NODEPOOL_SCRIPTDIR="/etc/nodepool/scripts"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">declare -x NODEPOOL_STATIC_NAMESERVER="xx.xx.xx.xx"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">declare -x PS1="(zuul-swift-logs-env)"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">INFO nodepool.image.build.dpc: + cat /etc/resolv.conf<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">INFO nodepool.image.build.dpc: nameserver xx.xx.xx.xx </span><span lang="EN-US" style="font-family:Wingdings;mso-fareast-language:JA">ß</span><span lang="EN-US" style="mso-fareast-language:JA">valid
dns<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">And I have tried to add element “local-config” into nodepool.yaml, but it does not work.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">So, my questions are:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:28.5pt;text-indent:-18.0pt"><span lang="EN-US" style="mso-fareast-language:JA">1)</span><span lang="EN-US" style="font-size:7.0pt;font-family:"Times New Roman","serif";mso-fareast-language:JA">
</span><span lang="EN-US" style="mso-fareast-language:JA">These bash env will be passed into the virtualenv zuul-swift-logs-env after chroot, is it right?<o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:28.5pt;text-indent:-18.0pt"><span lang="EN-US" style="mso-fareast-language:JA">2)</span><span lang="EN-US" style="font-size:7.0pt;font-family:"Times New Roman","serif";mso-fareast-language:JA">
</span><span lang="EN-US" style="mso-fareast-language:JA">If not, how to configure the proxy for nodepool?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">Many thanks to any suggestion.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-indent:10.5pt"><span lang="EN-US" style="mso-fareast-language:JA">Xiexs<o:p></o:p></span></p>
</div>
</body>
</html>