VMware: Horizon reports incorrect message for PAUSE instance

Bug #1340167 reported by Mayank Kumar
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Wishlist
Unassigned
OpenStack Dashboard (Horizon)
Invalid
Undecided
Unassigned

Bug Description

When I pause an instance hosted on VMware cluster, it shows
SUCCESS: Paused Instance: <instance_name>;
in horizon portal and nothing happens (instance does not go to Pause state)

In nova-compute log it shows: pause not supported for vmwareapi

2014-07-10 06:53:37.212 ERROR oslo.messaging.rpc.dispatcher [req-f8159224-a1e2-4271-84d8-eea2edeaaee1 admin demo] Exception during message handling: pause not supported for vmwareapi
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/exception.py", line 88, in wrapped
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher payload)
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/exception.py", line 71, in wrapped
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher return f(self, context, *args, **kw)
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/compute/manager.py", line 285, in decorated_function
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher pass
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/compute/manager.py", line 271, in decorated_function
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher return function(self, context, *args, **kwargs)
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/compute/manager.py", line 335, in decorated_function
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher function(self, context, *args, **kwargs)
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/compute/manager.py", line 313, in decorated_function
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher kwargs['instance'], e, sys.exc_info())
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/compute/manager.py", line 301, in decorated_function
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher return function(self, context, *args, **kwargs)
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/compute/manager.py", line 3680, in pause_instance
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher self.driver.pause(instance)
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/virt/vmwareapi/driver.py", line 678, in pause
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher _vmops.pause(instance)
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/virt/vmwareapi/vmops.py", line 938, in pause
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher raise NotImplementedError(msg)
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher NotImplementedError: pause not supported for vmwareapi
2014-07-10 06:53:37.212 TRACE oslo.messaging.rpc.dispatcher
2014-07-10 06:53:37.214 ERROR oslo.messaging._drivers.common [req-f8159224-a1e2-4271-84d8-eea2edeaaee1 admin demo] Returning exception pause not supported for vmwareapi to caller

This information is quite misleading for the user.
The message should come as "Pause not supported for vmwareapi"

Revision history for this message
Mayank Kumar (mayank0107) wrote :
Changed in horizon:
assignee: nobody → Mayank (mayank0107)
summary: - VMware: Horizon message for PAUSE instance is misleading
+ VMware: Horizon reports incorrect message for PAUSE instance
Changed in horizon:
assignee: Mayank (mayank0107) → nobody
Revision history for this message
Julie Pichon (jpichon) wrote :

Is there a Nova API Horizon could call to determine whether Pause is supported?

Also what's the error message returned by Nova when trying to pause from the CLI?

Revision history for this message
Mayank Kumar (mayank0107) wrote :
Download full text (11.0 KiB)

Is there a Nova API Horizon could call to determine whether Pause is supported?
- I am not aware of one. It is that horizon should return the same "Pause not supported for vmwareapi" as coming in compute logs

Is there a Nova API Horizon could call to determine whether Pause is supported?
- When I tried nova pause <instance_name>; it returned nothing nor the operation was successful.
nova --debug pause <instance> returned nothing in response body.

nova list
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+------------------+
| dada240c-4cb3-4a1f-93e2-acffd0714275 | test | ACTIVE | - | Running | private=10.0.0.2 |
+--------------------------------------+------+--------+------------+-------------+------------------+

nova pause dada240c-4cb3-4a1f-93e2-acffd0714275

nova list
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+------------------+
| dada240c-4cb3-4a1f-93e2-acffd0714275 | test | ACTIVE | - | Running | private=10.0.0.2 |
+--------------------------------------+------+--------+------------+-------------+------------------+

nova --debug pause dada240c-4cb3-4a1f-93e2-acffd0714275

REQ: curl -i 'http://10.10.120.130:5000/v2.0/tokens' -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "demo", "passwordCredentials": {"username": "demo", "password": "nova"}}}'
RESP: [200] {'date': 'Wed, 16 Jul 2014 11:17:27 GMT', 'content-type': 'application/json', 'content-length': '6162', 'vary': 'X-Auth-Token'}
RESP BODY: {"access": {"token": {"issued_at": "2014-07-16T11:17:27.944412", "expires": "2014-07-16T12:17:27Z", "id": "MIILEgYJKoZIhvcNAQcCoIILAzCCCv8CAQExCTAHBgUrDgMCGjCCCWgGCSqGSIb3DQEHAaCCCVkEgglVeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxNC0wNy0xNlQxMToxNzoyNy45NDQ0MTIiLCAiZXhwaXJlcyI6ICIyMDE0LTA3LTE2VDEyOjE3OjI3WiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQiOiB7ImRlc2NyaXB0aW9uIjogbnVsbCwgImVuYWJsZWQiOiB0cnVlLCAiaWQiOiAiZjUxZGE0ZWQ3YmJkNDU1OGE2Y2E3OWExYTU1NTc4N2QiLCAibmFtZSI6ICJkZW1vIn19LCAic2VydmljZUNhdGFsb2ciOiBbeyJlbmRwb2ludHMiOiBbeyJhZG1pblVSTCI6ICJodHRwOi8vMTAuMTAuMTIwLjEzMDo4Nzc0L3YyL2Y1MWRhNGVkN2JiZDQ1NThhNmNhNzlhMWE1NTU3ODdkIiwgInJlZ2lvbiI6ICJSZWdpb25PbmUiLCAiaW50ZXJuYWxVUkwiOiAiaHR0cDovLzEwLjEwLjEyMC4xMzA6ODc3NC92Mi9mNTFkYTRlZDdiYmQ0NTU4YTZjYTc5YTFhNTU1Nzg3ZCIsICJpZCI6ICJjYjg1OWZkOTUxNjY0YTczODdkM2VmZDIzYjdhNjczNyIsICJwdWJsaWNVUkwiOiAiaHR0cDovLzEwLjEwLjEyMC4xMzA6ODc3NC92Mi9mNTFkYTRlZDdiYmQ0NTU4YTZjYTc5YTFhNTU1Nzg3ZCJ9XSwgImVuZHBvaW50c19saW5rcyI6IFtdLCAidHlwZSI6ICJjb21wdXRlIiwgIm5hbWUiOiAibm92YSJ9LCB7ImVuZHBvaW50cyI6IFt7ImFkbWluVVJMIjogImh0dHA6Ly8xMC4xMC4xMjAuMTMwOjg3NzQvdjMiLCAicmVnaW9uIjogIlJlZ2lvbk9uZSIsICJpbnRlcm5hbFVSTCI6ICJodHRwOi8vMTAuMTAuMT...

Revision history for this message
Julie Pichon (jpichon) wrote :

I'm guessing pause is an asynchronous operation. Horizon depend on the APIs, if "nova pause" returns successfully we can't tell if something goes wrong later on, we don't have access to the compute logs.

Possible solutions would be for either Nova to surface this error message when calling "nova pause", and/or for Horizon to somehow query Nova to check whether an action is allowed and hide the "Pause" button when it's not possible. But since there could be multiple compute nodes, some that support pausing and others that don't, I'm not sure how feasible that would be either... Adding the Nova folks to see if they have some thoughts about this. It would be nice to have some way of letting the user know that no matter how many times they try to pause, it won't work in this case.

Tracy Jones (tjones-i)
Changed in nova:
importance: Undecided → Medium
status: New → Triaged
tags: added: error-reporting
Akihiro Motoki (amotoki)
tags: added: nova
Revision history for this message
Sean Dague (sdague) wrote :

this isn't fixable until some capabilities API is exposed, marking as wishlist.

Changed in nova:
status: Triaged → Confirmed
importance: Medium → Wishlist
Changed in horizon:
status: New → Invalid
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

This wishlist bug has been open a year without any activity. I'm going to move it to "Opinion / Wishlist", which is an easily-obtainable queue of older requests that have come on.

In case you want to work on that, consider writing a blueprints [1] and spec [2]. I'll recommend to read [3] if not yet done. The effort to implement the requested feature is then driven only by the blueprint (and spec).

NOTE:
The need for a "discover capabilites" API got discussed during the Newton summit [4] (but without a clear path forward IIUC).

References:
[1] https://blueprints.launchpad.net/nova/
[2] https://github.com/openstack/nova-specs
[3] https://wiki.openstack.org/wiki/Blueprints
[4] https://etherpad.openstack.org/p/newton-discovery

Changed in nova:
status: Confirmed → Opinion
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.