← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1251943] Re: xenserver disable/enable host report error

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => juno-2

-- 
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/1251943

Title:
  xenserver disable/enable host report error

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  When XenServer disable/enable host, the api set_host_enabled() need to
  get service info for the target host, but the rpc call of
  set_host_enabled() did not transfer host as parameter, this will cause
  the api call failed.

  def set_host_enabled(self, host, enabled):
          """Sets the specified host's ability to accept new instances."""
          # Since capabilities are gone, use service table to disable a node
          # in scheduler
          status = {'disabled': not enabled,
                  'disabled_reason': 'set by xenapi host_state'
                  }
          cntxt = context.get_admin_context()
          service = self._conductor_api.service_get_by_args(
                  cntxt,
                  host, <<<<<<<<< 
                  'nova-compute')
          self._conductor_api.service_update(
                  cntxt,
                  service,
                  status)

          args = {"enabled": jsonutils.dumps(enabled)}
          response = call_xenhost(self._session, "set_host_enabled", args)
          return response.get("status", response)

  ======================================
      def set_host_enabled(self, ctxt, enabled, host):
          cctxt = self.client.prepare(server=host)
          return cctxt.call(ctxt, 'set_host_enabled', enabled=enabled) <<<<<<<<<< No host

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