masakari command failed due to os-service-type1.2.0

Bug #1756047 reported by takahara.kengo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-masakariclient
Fix Released
Critical
Dinesh Bhor

Bug Description

[Environment]
- masakariclient has been applied the following patch.
  https://review.openstack.org/#/c/547879/
- openstacksdk version is 0.12.0
- os-service-types version is 1.2.0

[Issue]
An error occurred when executing the masakari command.
The error is as follow:
$ masakari --debug segment-list
Traceback (most recent call last):
  File "/usr/local/bin/masakari", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/masakariclient/shell.py", line 189, in main
    MasakariShell().main(args)
  File "/usr/local/lib/python2.7/dist-packages/masakariclient/shell.py", line 160, in main
    sc = self._setup_masakari_client(api_ver, args)
  File "/usr/local/lib/python2.7/dist-packages/masakariclient/shell.py", line 116, in _setup_masakari_client
    return masakari_client.Client(api_ver, user_agent=USER_AGENT, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/masakariclient/client.py", line 28, in Client
    return cls(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/masakariclient/v1/client.py", line 34, in __init__
    self.con = connection.create_connection(session)
  File "/usr/local/lib/python2.7/dist-packages/masakariclient/sdk/ha/connection.py", line 36, in create_connection
    raise e
AttributeError: Service Descriptors cannot be set

[Cause]
In os-service-types 1.2.0, "ha" service has been added to os_service_type/data/service-types.json.
So, if masakariclient tries add_service to openstack.connection.Connection object, then the error occurr.
However, if masakariclient don't add_service, it can not get the correct proxy class for masakari's operation.

Probably, the "ha" service of service-types.json is for use by masakari.
So I think we need to add the proxy class for masakari to openstacksdk like openstack/network/ or openstack/compute/.

Tushar Patil (tpatil)
Changed in python-masakariclient:
status: New → Confirmed
importance: Undecided → Critical
Changed in python-masakariclient:
assignee: nobody → Dinesh Bhor (dinesh-bhor)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-masakariclient (master)

Reviewed: https://review.openstack.org/557634
Committed: https://git.openstack.org/cgit/openstack/python-masakariclient/commit/?id=6d61f0a103576b36b1896caf19fb2d5f72ec6d9c
Submitter: Zuul
Branch: master

commit 6d61f0a103576b36b1896caf19fb2d5f72ec6d9c
Author: Kengo Takahara <email address hidden>
Date: Thu Mar 29 16:24:45 2018 +0900

    Remove masakariclient's proxy class

    Change I9b2d140065390d94dda532c39777cf691775e21e has added masakari
    commands to openstacksdk and those are available in openstacksdk
    version 0.13.0. So the respective sdk resource proxy class implemented
    in masakariclient is no longer required.

    This patch fixes below:
    - Removes the proxy class from masakariclient, and modifies to use the
      proxy class implemented in openstacksdk.
    - Related bug: #1756047

    Closes-Bug: #1756047
    Change-Id: I5ecc4f8edc283e16cc7a1bd83a0a21735135199c

Changed in python-masakariclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-masakariclient 5.1.0

This issue was fixed in the openstack/python-masakariclient 5.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.