[Yahoo-eng-team] [Bug 1760303] Re: ComputeManager.cleanup_host fails when there are waiting events: ValueError: Field value network-vif-plugged-ce531f90-199f-48c0-816c is invalid

2018-04-09 Thread OpenStack Infra
Reviewed:  https://review.openstack.org/558059
Committed: 
https://git.openstack.org/cgit/openstack/nova/commit/?id=d9369d034cb0694def2510885ddfb9b039cbad49
Submitter: Zuul
Branch:master

commit d9369d034cb0694def2510885ddfb9b039cbad49
Author: Matt Riedemann 
Date:   Sat Mar 31 10:28:29 2018 -0400

Fix cancel_all_events event name parsing

The cancel_all_events function was incorrectly assuming
that event tags didn't have dashes in them, but they all
do since they are either port or volume IDs, which are UUIDs.

Instead of just storing our event data indexed by the composite
event key, we should just store the name and tag distinctly so
that there is no question about how to dissect the two from the
key later. This is all internal record-keeping inside of the
compute manager, so we can change it to whatever we want.

This includes a slight change to the internal virtapi interface
for wait_for_instance_event(), which removes the ability to
pass composite event keys as strings instead of (name, tag)
tuples. In reality, none of the virt code was using the key string
format, so this just cleans up a few tests that were. It makes
that interface less ambiguous, which is good anyway.

Change-Id: I15f041e820c2dabe82e8e25bf77f9cc86330a76a
Closes-Bug: #1760303


** 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/1760303

Title:
  ComputeManager.cleanup_host fails when there are waiting events:
  ValueError: Field value network-vif-plugged-ce531f90-199f-48c0-816c is
  invalid

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) ocata series:
  Triaged
Status in OpenStack Compute (nova) pike series:
  Triaged
Status in OpenStack Compute (nova) queens series:
  Triaged

Bug description:
  The parsing in cancel_all_events() fails to account for names such as:

  network-vif-plugged-ce531f90-199f-48c0-816c

  
https://github.com/openstack/nova/blob/167023b5074c7cb241b33767d76a116ec95d652c/nova/compute/manager.py#L406

  Which can be constructed when registering the event using a tuple of
  the event name and tag:

  
https://github.com/openstack/nova/blob/167023b5074c7cb241b33767d76a116ec95d652c/nova/compute/manager.py#L460-L463

  
https://github.com/openstack/nova/blob/167023b5074c7cb241b33767d76a116ec95d652c/nova/objects/external_event.py#L51

  So we almost need something like that make_key function but more like
  parse_key where using the known EVENT_NAMES we can split the event
  name to get the name and tag.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1760303/+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 1760303] Re: ComputeManager.cleanup_host fails when there are waiting events: ValueError: Field value network-vif-plugged-ce531f90-199f-48c0-816c is invalid

2018-03-31 Thread Matt Riedemann
** Also affects: nova/ocata
   Importance: Undecided
   Status: New

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

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

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

Title:
  ComputeManager.cleanup_host fails when there are waiting events:
  ValueError: Field value network-vif-plugged-ce531f90-199f-48c0-816c is
  invalid

Status in OpenStack Compute (nova):
  Triaged
Status in OpenStack Compute (nova) ocata series:
  New
Status in OpenStack Compute (nova) pike series:
  New
Status in OpenStack Compute (nova) queens series:
  New

Bug description:
  The parsing in cancel_all_events() fails to account for names such as:

  network-vif-plugged-ce531f90-199f-48c0-816c

  
https://github.com/openstack/nova/blob/167023b5074c7cb241b33767d76a116ec95d652c/nova/compute/manager.py#L406

  Which can be constructed when registering the event using a tuple of
  the event name and tag:

  
https://github.com/openstack/nova/blob/167023b5074c7cb241b33767d76a116ec95d652c/nova/compute/manager.py#L460-L463

  
https://github.com/openstack/nova/blob/167023b5074c7cb241b33767d76a116ec95d652c/nova/objects/external_event.py#L51

  So we almost need something like that make_key function but more like
  parse_key where using the known EVENT_NAMES we can split the event
  name to get the name and tag.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1760303/+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