← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1633200] Re: Unable to create server with image that has hw_watchdog_action='disabled'

 

Reviewed:  https://review.openstack.org/386221
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=98d93196cddab435f7a258bc1ef8beca6a7e2004
Submitter: Jenkins
Branch:    master

commit 98d93196cddab435f7a258bc1ef8beca6a7e2004
Author: Matt Riedemann <mriedem@xxxxxxxxxx>
Date:   Tue Jan 3 17:27:40 2017 -0500

    Add 'disabled' to WatchdogAction field
    
    Image property hw_watchdog_action can have a 'disabled'
    value which is actually defined in the glance metadefs so
    someone using Horizon might pick that. Also, it's the default
    behavior in the libvirt driver. However, if you try to create
    a server with that set the create fails in nova-api because
    the enum field didn't have 'disabled' as a valid value.
    
    This adds it, bumps the ImageMetaProps version and adds tests.
    
    Change-Id: I4cec3e8b8527b909cc60893db26732a19263220d
    Closes-Bug: #1633200


** Changed in: nova
       Status: In Progress => Fix Released

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

Title:
  Unable to create server with image that has
  hw_watchdog_action='disabled'

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  This is from ocata devstack. Set the hw_watchdog_action image property
  with value 'disabled':

  stack@osc:~$ openstack image set --property
  hw_watchdog_action=disabled cirros-0.3.4-x86_64-uec

  stack@osc:~$ openstack image show -c properties cirros-0.3.4-x86_64-uec
  +------------+------------------------------------------------------------------------------------------------------------------------------------+
  | Field      | Value                                                                                                                              |
  +------------+------------------------------------------------------------------------------------------------------------------------------------+
  | properties | hw_watchdog_action='disabled', kernel_id='08463073-3460-4b5f-92cc-ade974936e96', ramdisk_id='ff195fc4-c039-43b5-acca-501aba68aba2' |
  +------------+------------------------------------------------------------------------------------------------------------------------------------+

  Then try to boot the server and it will fail:

  stack@osc:~$ nova boot --poll --image c8af19ff-cebc-4112-a237-78dcd19e588c --flavor 42 test-watchdog-disabled
  ERROR (BadRequest): Invalid image metadata. Error: Field value disabled is invalid (HTTP 400) (Request-ID: req-488be9ab-ebcb-473b-b238-968f91ed0f48)

  
  stack@osc:/opt/stack/nova$ git log -1
  commit 7a9eb10d0d15e5327aa73c72418d89afce11abef
  Merge: b796673 951dee3
  Author: Jenkins <jenkins@xxxxxxxxxxxxxxxxxxxx>
  Date:   Wed Oct 5 18:27:22 2016 +0000

      Merge "Fix periodic-nova-py{27,35}-with-oslo-master"

  
  The problem is the ImageMetaProps object in nova is using enums for the hw_watchdog_action field:

  https://github.com/openstack/nova/blob/7a9eb10d0d15e5327aa73c72418d89afce11abef/nova/objects/fields.py#L383

  And that doesn't have 'disabled' as a value.

  However, if you look at the glance metadef it's an option, so someone
  using Horizon could set this:

  https://github.com/openstack/glance/blob/d3e820724e1d578003b13e72e753d9b1d75173e1/etc/metadefs
  /compute-watchdog.json#L25

  And the libvirt driver actually defaults to 'disabled':

  https://github.com/openstack/nova/blob/7a9eb10d0d15e5327aa73c72418d89afce11abef/nova/virt/libvirt/driver.py#L4536

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


References