<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2018-05-03 21:58 GMT+02:00 Tomáš Golembiovský <span dir="ltr">&lt;<a href="mailto:tgolembi@redhat.com" target="_blank">tgolembi@redhat.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I&#39;m trying to reinstall a CentOS host (using master-snapshot) and I<br>
noticed otopi is trying to use python3 while the ovirt-host-deploy is<br>
not yet fully python3 compatible:<br></blockquote><div><br></div><div>How did you got python 3 on CentOS?</div><div>It&#39;s not in CentOS distribution.</div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
&gt; 2018-05-03 21:35:56,855+0200 DEBUG <a href="http://otopi.plugins.otopi.system.info" rel="noreferrer" target="_blank">otopi.plugins.otopi.system.<wbr>info</a> info._init:39 SYSTEM INFORMATION - BEGIN       <br>
&gt; 2018-05-03 21:35:56,855+0200 DEBUG <a href="http://otopi.plugins.otopi.system.info" rel="noreferrer" target="_blank">otopi.plugins.otopi.system.<wbr>info</a> info._init:40 executable /bin/python3          <br>
&gt; 2018-05-03 21:35:56,855+0200 DEBUG <a href="http://otopi.plugins.otopi.system.info" rel="noreferrer" target="_blank">otopi.plugins.otopi.system.<wbr>info</a> info._init:41 python version 3.4.8 (default, Mar 23 2018, 10:04:27)<br>
&gt; [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]<br>
&gt; 2018-05-03 21:35:56,855+0200 DEBUG <a href="http://otopi.plugins.otopi.system.info" rel="noreferrer" target="_blank">otopi.plugins.otopi.system.<wbr>info</a> info._init:42 python /bin/python3              <br>
&gt; 2018-05-03 21:35:56,856+0200 DEBUG <a href="http://otopi.plugins.otopi.system.info" rel="noreferrer" target="_blank">otopi.plugins.otopi.system.<wbr>info</a> info._init:43 platform linux                   <br>
&gt; 2018-05-03 21:35:56,856+0200 DEBUG <a href="http://otopi.plugins.otopi.system.info" rel="noreferrer" target="_blank">otopi.plugins.otopi.system.<wbr>info</a> info._init:44 distribution (&#39;CentOS Linux&#39;, &#39;7.4.1708&#39;, &#39;Core&#39;)<br>
&gt; 2018-05-03 21:35:56,856+0200 DEBUG <a href="http://otopi.plugins.otopi.system.info" rel="noreferrer" target="_blank">otopi.plugins.otopi.system.<wbr>info</a> info._init:45 host &#39;ovirt-host2&#39;               <br>
&gt; 2018-05-03 21:35:56,856+0200 DEBUG <a href="http://otopi.plugins.otopi.system.info" rel="noreferrer" target="_blank">otopi.plugins.otopi.system.<wbr>info</a> info._init:51 uid 0 euid 0 gid 0 egid 0        <br>
&gt; 2018-05-03 21:35:56,856+0200 DEBUG <a href="http://otopi.plugins.otopi.system.info" rel="noreferrer" target="_blank">otopi.plugins.otopi.system.<wbr>info</a> info._init:53 SYSTEM INFORMATION - END         <br>
<br>
and then later:<br>
<br>
&gt; 2018-05-03 21:35:56,912+0200 DEBUG otopi.context context._executeMethod:128 Stage init METHOD otopi.plugins.ovirt_host_<wbr>deploy.node.detect.Plugin._<wbr>init<br>
&gt; 2018-05-03 21:35:56,914+0200 DEBUG otopi.context context._executeMethod:143 method exception<br>
&gt; Traceback (most recent call last):<br>
&gt;   File &quot;/tmp/ovirt-a0GNITSwX9/<wbr>pythonlib/otopi/context.py&quot;, line 133, in _executeMethod<br>
&gt;     method[&#39;method&#39;]()<br>
&gt;   File &quot;/tmp/ovirt-a0GNITSwX9/otopi-<wbr>plugins/ovirt-host-deploy/<wbr>node/detect.py&quot;, line 131, in _init<br>
&gt;     odeploycons.FileLocations.<wbr>OVIRT_NODE_VARIANT_VAL)<br>
&gt;   File &quot;/tmp/ovirt-a0GNITSwX9/otopi-<wbr>plugins/ovirt-host-deploy/<wbr>node/detect.py&quot;, line 69, in hasconf<br>
&gt;     io.StringIO(&#39;[default]\n&#39; + f.read().decode(&#39;utf-8&#39;))<br>
&gt; AttributeError: &#39;str&#39; object has no attribute &#39;decode&#39;<br>
&gt; 2018-05-03 21:35:56,915+0200 ERROR otopi.context context._executeMethod:152 Failed to execute stage &#39;Initializing&#39;: &#39;str&#39; object has no attribute &#39;decode&#39;<br>
<br>
There is definitely a bug (or at least weirdness) in host-deploy -- why<br>
use .decode() on object returned by codecs.open()?<br>
<br>
But also, should host-deploy be already python3 compatible and is this<br>
otopi behaviour expected?<br>
<br>
    Tomas<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Tomáš Golembiovský &lt;<a href="mailto:tgolembi@redhat.com">tgolembi@redhat.com</a>&gt;<br>
______________________________<wbr>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@ovirt.org">Devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/devel</a></font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:uppercase"><span>SANDRO</span> <span>BONAZZOLA</span></p><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:10px;margin:0px 0px 4px;text-transform:uppercase"><span>ASSOCIATE MANAGER, SOFTWARE ENGINEERING, EMEA ENG VIRTUALIZATION R&amp;D</span><span style="color:rgb(170,170,170);margin:0px"></span></p><p style="font-family:overpass,sans-serif;margin:0px;font-size:10px;color:rgb(153,153,153)"><a href="https://www.redhat.com/" style="color:rgb(0,136,206);margin:0px" target="_blank">Red Hat <span>EMEA</span></a></p><p style="font-family:overpass,sans-serif;margin:0px 0px 6px;font-size:10px;color:rgb(153,153,153)"><span style="margin:0px;padding:0px"><a href="mailto:sbonazzo@redhat.com" style="color:rgb(0,136,206);margin:0px" target="_blank">sbonazzo@redhat.com</a>   </span></p><table border="0" style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium"><tbody><tr><td width="100px"><a href="https://red.ht/sig" target="_blank"><img src="https://www.redhat.com/files/brand/email/sig-redhat.png" width="90" height="auto"></a></td><td style="font-size:10px"><div><a href="https://redhat.com/summit" target="_blank"><img width="70px" height="auto" src="https://www.redhat.com/files/brand/email/sig-summit.png" style="outline:0px"></a></div></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div>