<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"><<a href="mailto:tgolembi@redhat.com" target="_blank">tgolembi@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'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'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>
> 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>
> 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>
> 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>
> [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]<br>
> 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>
> 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>
> 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 ('CentOS Linux', '7.4.1708', 'Core')<br>
> 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 'ovirt-host2' <br>
> 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>
> 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>
> 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>
> 2018-05-03 21:35:56,914+0200 DEBUG otopi.context context._executeMethod:143 method exception<br>
> Traceback (most recent call last):<br>
> File "/tmp/ovirt-a0GNITSwX9/<wbr>pythonlib/otopi/context.py", line 133, in _executeMethod<br>
> method['method']()<br>
> File "/tmp/ovirt-a0GNITSwX9/otopi-<wbr>plugins/ovirt-host-deploy/<wbr>node/detect.py", line 131, in _init<br>
> odeploycons.FileLocations.<wbr>OVIRT_NODE_VARIANT_VAL)<br>
> File "/tmp/ovirt-a0GNITSwX9/otopi-<wbr>plugins/ovirt-host-deploy/<wbr>node/detect.py", line 69, in hasconf<br>
> io.StringIO('[default]\n' + f.read().decode('utf-8'))<br>
> AttributeError: 'str' object has no attribute 'decode'<br>
> 2018-05-03 21:35:56,915+0200 ERROR otopi.context context._executeMethod:152 Failed to execute stage 'Initializing': 'str' object has no attribute 'decode'<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ý <<a href="mailto:tgolembi@redhat.com">tgolembi@redhat.com</a>><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&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>