receiver update faild

Bug #1746391 reported by chenyb4
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-senlinclient
Fix Released
Undecided
chenyb4

Bug Description

if use "openstack --debug cluster receiver update --name re3 39675fa6-5726-4a8c-ba41-f78be1d6e5bd"
,receiver update faild. appear error:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 134, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 169, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 113, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/site-packages/senlinclient/v1/receiver.py", line 265, in take_action
    senlin_client.update_receiver(receiver.id, **params)
  File "/usr/lib/python2.7/site-packages/openstack/cluster/v1/_proxy.py", line 959, in update_receiver
    return self._update(_receiver.Receiver, receiver, **attrs)
  File "/usr/lib/python2.7/site-packages/openstack/proxy2.py", line 37, in check
    return method(self, expected, actual, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/openstack/proxy2.py", line 174, in _update
    return res.update(self._session)
  File "/usr/lib/python2.7/site-packages/openstack/resource2.py", line 662, in update
    headers=request.headers)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 877, in patch
    return self.request(url, 'PATCH', **kwargs)
  File "/usr/lib/python2.7/site-packages/openstack/session.py", line 66, in map_exceptions_wrapper
    raise exceptions.from_exception(e)
HttpException: HttpException: None is not one of ['CLUSTER_CREATE', 'CLUSTER_DELETE', 'CLUSTER_UPDATE', 'CLUSTER_ADD_NODES', 'CLUSTER_DEL_NODES', 'CLUSTER_RESIZE', 'CLUSTER_CHECK', 'CLUSTER_RECOVER', 'CLUSTER_REPLACE_NODES', 'CLUSTER_SCALE_OUT', 'CLUSTER_SCALE_IN', 'CLUSTER_ATTACH_POLICY', 'CLUSTER_DETACH_POLICY', 'CLUSTER_UPDATE_POLICY', 'CLUSTER_OPERATION'] (HTTP 400) (Request-ID: req-7c37fd34-4758-46c6-94c2-e3da91c067c0), None is not one of ['CLUSTER_CREATE', 'CLUSTER_DELETE', 'CLUSTER_UPDATE', 'CLUSTER_ADD_NODES', 'CLUSTER_DEL_NODES', 'CLUSTER_RESIZE', 'CLUSTER_CHECK', 'CLUSTER_RECOVER', 'CLUSTER_REPLACE_NODES', 'CLUSTER_SCALE_OUT', 'CLUSTER_SCALE_IN', 'CLUSTER_ATTACH_POLICY', 'CLUSTER_DETACH_POLICY', 'CLUSTER_UPDATE_POLICY', 'CLUSTER_OPERATION']

if use "openstack --debug cluster receiver update --name re3 --action CLUSTER_SCALE_IN 39675fa6-5726-4a8c-ba41-f78be1d6e5bd", receiver successful.

So, the problem reson client execute operation not pass action parameter, action default value 'None', check faild.

View code:
https://github.com/openstack/senlin/blob/master/senlin/objects/requests/receivers.py#L90

action value None not in CLUSTER_ACTION_NAMES

chenyb4 (chenyb4)
Changed in python-senlinclient:
assignee: nobody → chenyb4 (chenyb4)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-senlinclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/539398

Changed in python-senlinclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-senlinclient (master)

Reviewed: https://review.openstack.org/539398
Committed: https://git.openstack.org/cgit/openstack/python-senlinclient/commit/?id=e6cdf2dac8493bead57d683cd407599803434ce8
Submitter: Zuul
Branch: master

commit e6cdf2dac8493bead57d683cd407599803434ce8
Author: Yuanbin.Chen <email address hidden>
Date: Wed Jan 31 10:10:07 2018 +0800

    Receiver update faild when action value None

    This patch fix action default value None, schem
    'ClusterActionName' check, the None not in CLUSTER_ACTION_NAMES

    Closes-bug: #1746391
    Change-Id: I6b867611f99fc9fd35f08da8d225101ae3c3831e

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

This issue was fixed in the openstack/python-senlinclient 1.7.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.