<div dir="ltr">Thanks for reporting, this seems to be a problem with python 3.5.<div>Pythons 3.5 json.loads only accepts str type, only after python 3.6 it will also accept str, bytes or bytearray.</div><div>I'll have that fixed in the next version so it also supports 3.5, we don't have distributions with 3.5 so we didn't notice.</div><div><br></div><div>Cheers,</div><div>Rene</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 14, 2020 at 6:15 PM Wolfgang Walkowiak <<a href="mailto:walkowiak@hep.physik.uni-siegen.de">walkowiak@hep.physik.uni-siegen.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Hi Rene et al,<br>
<br>
I seem to have (preliminarily) fixed it by modifying line 373 in <br>
linstorapi.py as follows:<br>
<br>
# data = json.loads(resp_data)<br>
data = json.loads(resp_data.decode('utf-8'))<br>
<br>
At least<br>
# linstor r l<br>
provides sensible output again.<br>
<br>
Please check whether is the actual fix or just a work-around.<br>
<br>
Thank you and cheers,<br>
<br>
w.w.<br>
<br>
On Tue, 14 Jan 2020, Wolfgang Walkowiak wrote:<br>
<br>
><br>
> Hi Rene et al,<br>
><br>
> thank you for this new release. I just tried updating our linstor<br>
> controller (on a Debian 9.11 LXC container) to this new version,<br>
> ie updating the following linstor packages:<br>
><br>
> linstor-client 1.0.9-1 0.9.9-1<br>
> linstor-common 1.4.0-1 0.9.13-1<br>
> linstor-controller 1.4.0-1 0.9.13-1<br>
> python-linstor 1.0.9-1 0.9.9-1<br>
><br>
> It looks loke the controller comes up, but I have an issue with the client:<br>
><br>
> pm1drbdctl:~# linstor r l<br>
> Traceback (most recent call last):<br>
> File "/usr/bin/linstor", line 24, in <module><br>
> linstor_client_main.main()<br>
> File "/usr/lib/python3/dist-packages/linstor_client_main.py", line 668, in <br>
> main<br>
> LinStorCLI().run()<br>
> File "/usr/lib/python3/dist-packages/linstor_client_main.py", line 633, in <br>
> run<br>
> rc = self.parse_and_execute(sys.argv[1:])<br>
> File "/usr/lib/python3/dist-packages/linstor_client_main.py", line 331, in <br>
> parse_and_execute<br>
> self._linstorapi.connect()<br>
> File "/usr/lib/python3.5/dist-packages/linstor/linstorapi.py", line 554, in <br>
> connect<br>
> self._ctrl_version = self.controller_version()<br>
> File "/usr/lib/python3.5/dist-packages/linstor/linstorapi.py", line 2202, <br>
> in controller_version<br>
> "GET", "/v1/controller/version"<br>
> File "/usr/lib/python3.5/dist-packages/linstor/linstorapi.py", line 341, in <br>
> _rest_request<br>
> return self.__convert_rest_response(apicall, response, path)<br>
> File "/usr/lib/python3.5/dist-packages/linstor/linstorapi.py", line 373, in <br>
> __convert_rest_response<br>
> data = json.loads(resp_data)<br>
> File "/usr/lib/python3.5/json/__init__.py", line 312, in loads<br>
> s.__class__.__name__))<br>
> TypeError: the JSON object must be str, not 'bytes'<br>
><br>
> The same if I just call<br>
> # linstor<br>
><br>
> However,<br>
> # linstor --help<br>
> shows the help. ;-)<br>
><br>
> I understand that this is now using python3.<br>
> I wonder whether I miss a package or alike. Any hint on how to fix this issue <br>
> will be greatly appreciated.<br>
><br>
> Thank you very much,<br>
><br>
> w.w.<br>
><br>
> On Tue, 14 Jan 2020, Rene Peinthor wrote:<br>
><br>
>> Hi!<br>
>> This release has a rather big packaging change, per default python3 will <br>
>> now<br>
>> be used.<br>
>> The library was ported a long time ago to python3, while still running<br>
>> python2 per default, but now<br>
>> as python2 is EoL, we will per default run on python3 now.<br>
>> Linbit provided packages will still use python2 on rhel/centos7, others <br>
>> will<br>
>> use python3.<br>
>> <br>
>> The high level API got a new object for resource groups and as mentioned<br>
>> last time the storage pool definition commands were removed from the <br>
>> client.<br>
>> <br>
>> python-linstor 1.0.9<br>
>> --------------------<br>
>> * High level API resource groups object<br>
>> * Removed swordfish support<br>
>> * Added resource groups query-max-volume-size<br>
>> <br>
>> <a href="https://www.linbit.com/downloads/linstor/python-linstor-1.0.9.tar.gz" rel="noreferrer" target="_blank">https://www.linbit.com/downloads/linstor/python-linstor-1.0.9.tar.gz</a><br>
>> <br>
>> linstor-client 1.0.9<br>
>> --------------------<br>
>> * Removed storage-pool-definition commands<br>
>> * Unhide physical-storage commands<br>
>> * Added resource groups query-max-volume-size command<br>
>> * Added gross size flag for volume definitions<br>
>> <br>
>> <a href="https://www.linbit.com/downloads/linstor/linstor-client-1.0.9.tar.gz" rel="noreferrer" target="_blank">https://www.linbit.com/downloads/linstor/linstor-client-1.0.9.tar.gz</a><br>
>> <br>
>> Linstor PPA:<br>
>> <a href="https://launchpad.net/~linbit/+archive/ubuntu/linbit-drbd9-stack" rel="noreferrer" target="_blank">https://launchpad.net/~linbit/+archive/ubuntu/linbit-drbd9-stack</a><br>
>> <br>
>> Best regards,<br>
>> Rene<br>
>> <br>
>> <br>
><br>
> ==========================================================2020-01-14==17:41==<br>
><br>
> Dr. Wolfgang Walkowiak Phone: +49-271-740-3889<br>
> Fakultaet IV / Physik Fax : +49-271-740-3886<br>
> Emmy Noether Campus<br>
> Universitaet Siegen --> <a href="mailto:Wolfgang.Walkowiak@hep.physik.uni-siegen.de" target="_blank">Wolfgang.Walkowiak@hep.physik.uni-siegen.de</a><br>
> Walter-Flex-Str. 3 <a href="mailto:Wolfgang.Walkowiak@gmx.net" target="_blank">Wolfgang.Walkowiak@gmx.net</a><br>
> 57068 Siegen<br>
> Germany<br>
><br>
> =============================================================================<br>
<br>
==========================================================2020-01-14==18:12==<br>
<br>
Dr. Wolfgang Walkowiak Phone: +49-271-740-3889<br>
Fakultaet IV / Physik Fax : +49-271-740-3886<br>
Emmy Noether Campus<br>
Universitaet Siegen --> <a href="mailto:Wolfgang.Walkowiak@hep.physik.uni-siegen.de" target="_blank">Wolfgang.Walkowiak@hep.physik.uni-siegen.de</a><br>
Walter-Flex-Str. 3 <a href="mailto:Wolfgang.Walkowiak@gmx.net" target="_blank">Wolfgang.Walkowiak@gmx.net</a><br>
57068 Siegen<br>
Germany<br>
<br>
=============================================================================</blockquote></div>