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