[Yahoo-eng-team] [Bug 1748942] Re: Ironic virt driver should not JSON encode traits in instance_info

2018-02-15 Thread OpenStack Infra
Reviewed:  https://review.openstack.org/543574
Committed: 
https://git.openstack.org/cgit/openstack/nova/commit/?id=54713a834f2a0e5b55b8f77c601ff35eb74b9b09
Submitter: Zuul
Branch:master

commit 54713a834f2a0e5b55b8f77c601ff35eb74b9b09
Author: Mark Goddard 
Date:   Mon Feb 12 18:35:33 2018 +

Don't JSON encode instance_info.traits for ironic

As of queens, the ironic virt driver pushes traits set on the flavor to
the ironic node's instance_info during instance spawn. This list of
traits is currently encoded as a JSON string, inside the JSON-encoded
instance_info. We should not use this double layer of JSON encoding, as
ironic expects instance_info.traits to be a list.

This change removes the nested JSON encoding when setting
node.instance_info.traits.

Change-Id: I1f3f96f7ef310022accde67cab1ae415bbc3c292
Closes-Bug: #1748942


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

** Changed in: nova/queens
   Status: Confirmed => In Progress

** Changed in: nova/queens
 Assignee: (unassigned) => Mark Goddard (mgoddard)

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

Title:
  Ironic virt driver should not JSON encode traits in instance_info

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) queens series:
  In Progress

Bug description:
  As of queens, the ironic virt driver pushes traits set on the flavor
  to the ironic node's instance_info during instance spawn. This list of
  traits is currently encoded as a JSON string, inside the JSON-encoded
  instance_info. We should not use this double layer of JSON encoding,
  as ironic expects instance_info.traits to be a list.

  Steps to reproduce
  ==

  Add a trait to an ironic node:

  openstack baremetal node add trait  

  Add a required trait to a flavor:

  openstack flavor set  --property 'trait:=required'

  Create an instance using this flavor:

  openstack server create ...

  Expected result
  ===

  Nova sets the node's instance_info.traits to a list containing the
  trait.

  Actual result
  =

  Nova sets the node's instance_info.traits to a JSON-encoded string
  containing a list containing the trait.

  Environment
  ===

  Nova stable/queens @ 01b756f960ed19ab801994d08d749dd94d729a22

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1748942] Re: Ironic virt driver should not JSON encode traits in instance_info

2018-02-12 Thread Matt Riedemann
(1:29:28 PM) mgoddard: mriedem: the scheduling works, but any flavor-requested 
traits won't be pushed to the ironic node's instance_info. These are not yet 
used by ironic, but will be used in future for some capabilities-like things
(1:29:49 PM) mriedem: mgoddard: if they aren't used in ironic in queens, then 
it's not something worth holding up rc2 IMO

** Also affects: nova/queens
   Importance: Undecided
   Status: New

** Changed in: nova/queens
   Status: New => Confirmed

** Changed in: nova/queens
   Importance: Undecided => Low

** Changed in: nova
   Importance: Undecided => Medium

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

Title:
  Ironic virt driver should not JSON encode traits in instance_info

Status in OpenStack Compute (nova):
  In Progress
Status in OpenStack Compute (nova) queens series:
  Confirmed

Bug description:
  As of queens, the ironic virt driver pushes traits set on the flavor
  to the ironic node's instance_info during instance spawn. This list of
  traits is currently encoded as a JSON string, inside the JSON-encoded
  instance_info. We should not use this double layer of JSON encoding,
  as ironic expects instance_info.traits to be a list.

  Steps to reproduce
  ==

  Add a trait to an ironic node:

  openstack baremetal node add trait  

  Add a required trait to a flavor:

  openstack flavor set  --property 'trait:=required'

  Create an instance using this flavor:

  openstack server create ...

  Expected result
  ===

  Nova sets the node's instance_info.traits to a list containing the
  trait.

  Actual result
  =

  Nova sets the node's instance_info.traits to a JSON-encoded string
  containing a list containing the trait.

  Environment
  ===

  Nova stable/queens @ 01b756f960ed19ab801994d08d749dd94d729a22

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp