<div dir="auto">Definitely a bug, we did some work on otopi (mostly packaging) to use python3 if it exists on a system - most of the otopi code was compatible, however, we didn't get to port host-deploy just yet. If you could open a bug for this issue that would be great.<div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Yuval</div></div><div class="gmail_extra"><br><div class="gmail_quote">On May 3, 2018 22:59, "Tomáš Golembiovský" <<a href="mailto:tgolembi@redhat.com">tgolembi@redhat.com</a>> wrote:<br type="attribution"><blockquote class="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>
<br>
<br>
> 2018-05-03 21:35:56,855+0200 DEBUG <a href="http://otopi.plugins.otopi.system.info" rel="noreferrer noreferrer" target="_blank">otopi.plugins.otopi.system.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 noreferrer" target="_blank">otopi.plugins.otopi.system.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 noreferrer" target="_blank">otopi.plugins.otopi.system.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 noreferrer" target="_blank">otopi.plugins.otopi.system.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 noreferrer" target="_blank">otopi.plugins.otopi.system.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 noreferrer" target="_blank">otopi.plugins.otopi.system.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 noreferrer" target="_blank">otopi.plugins.otopi.system.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 noreferrer" target="_blank">otopi.plugins.otopi.system.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 noreferrer" target="_blank">otopi.plugins.otopi.system.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_deploy.node.detect.Plugin._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/pythonlib/otopi/context.py", line 133, in _executeMethod<br>
> method['method']()<br>
> File "/tmp/ovirt-a0GNITSwX9/otopi-plugins/ovirt-host-deploy/node/detect.py", line 131, in _init<br>
> odeploycons.FileLocations.OVIRT_NODE_VARIANT_VAL)<br>
> File "/tmp/ovirt-a0GNITSwX9/otopi-plugins/ovirt-host-deploy/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<div class="signature-text"><br>
<br>
<br>
-- <br>
Tomáš Golembiovský <<a href="mailto:tgolembi@redhat.com" target="_blank" rel="noreferrer">tgolembi@redhat.com</a>><br>
_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@ovirt.org" target="_blank" rel="noreferrer">Devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/devel</a></div></blockquote></div><br></div>