Public bug reported:

Before cell0 was introduced the API would create the "create" instance
action for each instance in the nova cell database before casting off to
conductor to do scheduling:

https://github.com/openstack/nova/blob/mitaka-
eol/nova/compute/api.py#L1180

Note that conductor failed to "complete" the action with a failure
event:

https://github.com/openstack/nova/blob/mitaka-
eol/nova/conductor/manager.py#L374

But at least the action was created.

Since then, with cell0, if scheduling fails the instance is buried in
the cell0 database but no instance action is created. To illustrate, I
disabled the single nova-compute service on my devstack host and created
a server which failed with NoValidHost:

$ openstack server show build-fail1 -f value -c fault
{u'message': u'No valid host was found. ', u'code': 500, u'created': 
u'2019-11-13T15:57:13Z'}

When listing instance actions I expected to see a "create" action but
there were none:

$ nova instance-action-list 008a7d52-dd83-4f52-a720-b3cfcc498259
+--------+------------+---------+------------+------------+
| Action | Request_ID | Message | Start_Time | Updated_At |
+--------+------------+---------+------------+------------+
+--------+------------+---------+------------+------------+

This is because the "create" action is only created when the instance is
scheduled to a specific cell:

https://github.com/openstack/nova/blob/20.0.0/nova/conductor/manager.py#L1460

Solution:

The ComputeTaskManager._bury_in_cell0 method should also create a
"create" action in cell0 like it does for the instance BDMs and tags.

This goes back to Ocata: https://review.opendev.org/#/c/319379/

** Affects: nova
     Importance: Low
     Assignee: Matt Riedemann (mriedem)
         Status: Triaged

** Affects: nova/ocata
     Importance: Low
         Status: Triaged

** Affects: nova/pike
     Importance: Low
         Status: Triaged

** Affects: nova/queens
     Importance: Low
         Status: Triaged

** Affects: nova/rocky
     Importance: Low
         Status: Triaged

** Affects: nova/stein
     Importance: Low
         Status: Triaged

** Affects: nova/train
     Importance: Low
         Status: Triaged


** Tags: cells regression

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

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

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

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

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

** Also affects: nova/stein
   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/1852458

Title:
  "create" instance action not created when instance is buried in cell0

Status in OpenStack Compute (nova):
  Triaged
Status in OpenStack Compute (nova) ocata series:
  Triaged
Status in OpenStack Compute (nova) pike series:
  Triaged
Status in OpenStack Compute (nova) queens series:
  Triaged
Status in OpenStack Compute (nova) rocky series:
  Triaged
Status in OpenStack Compute (nova) stein series:
  Triaged
Status in OpenStack Compute (nova) train series:
  Triaged

Bug description:
  Before cell0 was introduced the API would create the "create" instance
  action for each instance in the nova cell database before casting off
  to conductor to do scheduling:

  https://github.com/openstack/nova/blob/mitaka-
  eol/nova/compute/api.py#L1180

  Note that conductor failed to "complete" the action with a failure
  event:

  https://github.com/openstack/nova/blob/mitaka-
  eol/nova/conductor/manager.py#L374

  But at least the action was created.

  Since then, with cell0, if scheduling fails the instance is buried in
  the cell0 database but no instance action is created. To illustrate, I
  disabled the single nova-compute service on my devstack host and
  created a server which failed with NoValidHost:

  $ openstack server show build-fail1 -f value -c fault
  {u'message': u'No valid host was found. ', u'code': 500, u'created': 
u'2019-11-13T15:57:13Z'}

  When listing instance actions I expected to see a "create" action but
  there were none:

  $ nova instance-action-list 008a7d52-dd83-4f52-a720-b3cfcc498259
  +--------+------------+---------+------------+------------+
  | Action | Request_ID | Message | Start_Time | Updated_At |
  +--------+------------+---------+------------+------------+
  +--------+------------+---------+------------+------------+

  This is because the "create" action is only created when the instance
  is scheduled to a specific cell:

  https://github.com/openstack/nova/blob/20.0.0/nova/conductor/manager.py#L1460

  Solution:

  The ComputeTaskManager._bury_in_cell0 method should also create a
  "create" action in cell0 like it does for the instance BDMs and tags.

  This goes back to Ocata: https://review.opendev.org/#/c/319379/

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

Reply via email to