← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1581398] [NEW] no need to handle 501 in API layer for some server actions l

 

Public bug reported:

currently we have 
https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/pause_server.py#L52
to handle 501 error 

but actually,

https://github.com/openstack/nova/blob/master/nova/compute/rpcapi.py#L655

it's a cast action so no exception will be reported


change code to make libvirt directly return 501 (nova/virt/libvirt/driver.py)

    def pause(self, instance):
        """Pause VM instance."""
        raise NotImplementedError

DEBUG (session:225) REQ: curl -g -i -X POST http://192.168.122.105:8774/v2.1/611bfd117d714430ac2c927f7e50163c/servers/721a02a5-ba2c-49a3-9fd5-ddcaec487c62/action -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.18" -H "X-Auth-Token: {SHA1}933b15a27b80d8a5f090aba7d67640c065c2808c" -d '{"pause": null}'
DEBUG (connectionpool:387) "POST /v2.1/611bfd117d714430ac2c927f7e50163c/servers/721a02a5-ba2c-49a3-9fd5-ddcaec487c62/action HTTP/1.1" 202 0

still get 202

** Affects: nova
     Importance: Undecided
     Assignee: jichenjc (jichenjc)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => jichenjc (jichenjc)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1581398

Title:
  no need to handle 501 in API layer for some server actions l

Status in OpenStack Compute (nova):
  New

Bug description:
  currently we have 
  https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/pause_server.py#L52
  to handle 501 error 

  but actually,

  https://github.com/openstack/nova/blob/master/nova/compute/rpcapi.py#L655

  it's a cast action so no exception will be reported

  
  change code to make libvirt directly return 501 (nova/virt/libvirt/driver.py)

      def pause(self, instance):
          """Pause VM instance."""
          raise NotImplementedError

  DEBUG (session:225) REQ: curl -g -i -X POST http://192.168.122.105:8774/v2.1/611bfd117d714430ac2c927f7e50163c/servers/721a02a5-ba2c-49a3-9fd5-ddcaec487c62/action -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.18" -H "X-Auth-Token: {SHA1}933b15a27b80d8a5f090aba7d67640c065c2808c" -d '{"pause": null}'
  DEBUG (connectionpool:387) "POST /v2.1/611bfd117d714430ac2c927f7e50163c/servers/721a02a5-ba2c-49a3-9fd5-ddcaec487c62/action HTTP/1.1" 202 0

  still get 202

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1581398/+subscriptions


Follow ups