yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #75026
[Bug 1739318] Re: RequestSpec online data migration context does not contain project_id
I've closed this bug since the immediate issue is fixed. In order to
remove the workaround during move operations from change
I34b1d99a9d0d2aca80f094a79ec1656abaf762dc we'd have to add an online
data migration, but that could be done later separately from this bug.
** Changed in: nova
Status: In Progress => Fix Released
** Changed in: nova/newton
Status: In Progress => Fix Released
** Changed in: nova/ocata
Status: In Progress => Fix Released
** Changed in: nova/pike
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/1739318
Title:
RequestSpec online data migration context does not contain project_id
Status in OpenStack Compute (nova):
Fix Released
Status in OpenStack Compute (nova) newton series:
Fix Released
Status in OpenStack Compute (nova) ocata series:
Fix Released
Status in OpenStack Compute (nova) pike series:
Fix Released
Bug description:
The online data migration generates a context in order to be able to
execute migrations:
https://github.com/openstack/nova/blob/master/nova/cmd/manage.py#L747
However, this context does not contain a `project_id` when running
this via CLI.
https://github.com/openstack/nova/blob/master/nova/context.py#L279-L290
During the creation of RequestSpec's for old instances, the context
which contains no `project_id`.
https://github.com/openstack/nova/blob/master/nova/objects/request_spec.py#L611-L622
This means that a RequestSpec gets created with `project_id` set to
`null`. During the day-to-day operations, things work okay, however,
when attempting to do a live migration, the `project_id` is set to
`null` when trying to claim resources which the placement API refuses.
https://github.com/openstack/nova/blob/master/nova/scheduler/utils.py#L791
This will give errors as such:
<html>
<head>
<title>400 Bad Request</title>
</head>
<body>
<h1>400 Bad Request</h1>
The server could not comply with the request since it is either malformed or otherwise incorrect.<br /><br />
JSON does not validate: None is not of type 'string'
Failed validating 'type' in schema['properties']['project_id']:
{'maxLength': 255, 'minLength': 1, 'type': 'string'}
On instance['project_id']:
None
</body>
</html>
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1739318/+subscriptions
References