Missing slash in /v1/strategies{strategy_uuid}/state path

Bug #1871342 reported by Alexandra Nyitraiova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
New
Undecided
Unassigned

Bug Description

I was trying to issue a command `watcher strategy state wm_workload_conslidation --debug` and it responded with 500 response status. I think, the problem may be, that a slash is missing on the following line and therefore none of the routes is matched:

https://opendev.org/openstack/watcher/src/branch/master/watcher/common/policies/strategy.py#L59

Revision history for this message
licanwei (li-canwei2) wrote :

The strategy is vm_workload_consolidation, not wm_workload_conslidation

It's ok for my testing.

watcher strategy state vm_workload_consolidation
+------------+-----------------------------------------------+-----------+---------+
| Type | State | Mandatory | Comment |
+------------+-----------------------------------------------+-----------+---------+
| Datasource | Datasource is not presented for this strategy | True | |
| Metrics | [] | False | |
| CDM | [ | True | |
| | { | | |
| | "compute_model": "not available" | | |
| | }, | | |
| | { | | |
| | "storage_model": "not available" | | |
| | }, | | |
| | { | | |
| | "baremetal_model": "not available" | | |
| | } | | |
| | ] | | |
| Name | vm_workload_consolidation | | |
+------------+-----------------------------------------------+-----------+---------+

Revision history for this message
Dantali0n (dantalion) wrote :

I tested this in devstack and for me it also seems to work. I would have expected there to be a slash in that path though.

Revision history for this message
Dantali0n (dantalion) wrote :

Could you test if executing: `watcher strategy state vm_workload_consolidation` works for you?

Revision history for this message
Alexandra Nyitraiova (saskan) wrote :

I am sorry, that was just a typo. In my console, I copied the name of the strategy from list `watcher strategy list`, therefore I am sure I have the command right.

Revision history for this message
licanwei (li-canwei2) wrote :

Could you paste the log for watcher api?

Revision history for this message
Alexandra Nyitraiova (saskan) wrote :

Sure. Here it is. (I have OpenStack deployed through Kolla)

2020-04-11 17:05:15.602 42 INFO watcher-api [req-4141944b-7490-46a0-81b1-0f7e56125579 077f5d70f7ed4e81ad15f138e32efe39 dd88001aaffd48c5bfb324ed79d72c4a default - -] IP.*.*.ADDR "GET /v1/strategies HTTP/1.1" status: 200 len: 7198 time: 6.5651331

2020-04-11 17:06:28.780 40 ERROR wsme.api [req-f440291c-582f-42f4-af60-ffab8a23edfd 077f5d70f7ed4e81ad15f138e32efe39 dd88001aaffd48c5bfb324ed79d72c4a default - -] Server-side error: "Timed out waiting for a reply to message ID a871c1ae752e472bbde2734daeb29cff". Detail:
Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/wsmeext/pecan.py", line 85, in callfunction
    result = f(self, *args, **kwargs)

  File "/usr/lib/python2.7/site-packages/watcher/api/controllers/v1/strategy.py", line 317, in state
    rpc_strategy.name)

  File "/usr/lib/python2.7/site-packages/watcher/decision_engine/rpcapi.py", line 45, in get_strategy_info
    context, 'get_strategy_info', strategy_name=strategy_name)

  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/client.py", line 511, in call
    return self.prepare().call(ctxt, method, **kwargs)

  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/client.py", line 181, in call
    transport_options=self.transport_options)

  File "/usr/lib/python2.7/site-packages/oslo_messaging/transport.py", line 129, in _send
    transport_options=transport_options)

  File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 646, in send
    transport_options=transport_options)

  File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 634, in _send
    call_monitor_timeout)

  File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 523, in wait
    message = self.waiters.get(msg_id, timeout=timeout)

  File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 401, in get
    'to message ID %s' % msg_id)

MessagingTimeout: Timed out waiting for a reply to message ID a871c1ae752e472bbde2734daeb29cff
: MessagingTimeout: Timed out waiting for a reply to message ID a871c1ae752e472bbde2734daeb29cff

2020-04-11 17:06:28.783 40 INFO watcher-api [req-f440291c-582f-42f4-af60-ffab8a23edfd 077f5d70f7ed4e81ad15f138e32efe39 dd88001aaffd48c5bfb324ed79d72c4a default - -] IP.*.*.ADDR "GET /v1/strategies/vm_workload_consolidation/state HTTP/1.1" status: 500 len: 461 time: 60.8718081

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.