yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #73747
[Bug 1779818] Re: child's root provider is not updated.
Reviewed: https://review.openstack.org/580246
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=bc8027515dbf7f4903568328633661c2658ee239
Submitter: Zuul
Branch: master
commit bc8027515dbf7f4903568328633661c2658ee239
Author: Tetsuro Nakamura <nakamura.tetsuro@xxxxxxxxxxxxx>
Date: Thu Jul 5 11:02:08 2018 +0900
Update root providers in same tree
When updating a parent provider of a resource provider, placement
didn't update a root provider of another resource provider in the
same tree.
This patch fixes it to update the root provider field of all the
resource providers in the same tree.
Change-Id: Icdedc10cdd5ebfda672ca2d65a75bf0143aa769c
Closes-Bug: #1779818
** 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/1779818
Title:
child's root provider is not updated.
Status in OpenStack Compute (nova):
Fix Released
Bug description:
Description
===========
You can update a resource provider(old root RP)'s parent RP from None to a specific existing RP(original root RP).
But if the resource provider(old root RP) has a child RP, the child RP's root RP is not updated automatically to the new root RP.
Reproduction
============
1. There is already an RP
```
* original_root
```
{
"resource_providers": [
{
"uuid": "da9bd8c5-e376-4828-b8ed-080081f8e4ed",
"parent_provider_uuid": null,
"generation": 1,
"root_provider_uuid": "da9bd8c5-e376-4828-b8ed-080081f8e4ed",
"name": "original_root"
}
]
}
2. create a new RP and its child using POST /resource_providers
```
* original_root
* old_root_rp
|
+-- child_rp
```
{
"resource_providers": [
{
"uuid": "da9bd8c5-e376-4828-b8ed-080081f8e4ed",
"parent_provider_uuid": null,
"generation": 1,
"root_provider_uuid": "da9bd8c5-e376-4828-b8ed-080081f8e4ed",
"name": "original_root"
},
{
"uuid": "6985934e-0d44-404e-9b59-92d33f89d9ef",
"parent_provider_uuid": null,
"generation": 0,
"root_provider_uuid": "6985934e-0d44-404e-9b59-92d33f89d9ef",
"name": "old_root_rp"
}
{
"uuid": "b80b63c9-1923-42ac-8659-e32479c70eaf",
"parent_provider_uuid": "6985934e-0d44-404e-9b59-92d33f89d9ef",
"generation": 0,
"root_provider_uuid": "6985934e-0d44-404e-9b59-92d33f89d9ef",
"name": "child_rp"
}
]
}
3. Update old root rp's parent to the original root using PUT
/resource_providers/6985934e-0d44-404e-9b59-92d33f89d9ef
```
* original_root
|
+-- old_root_rp
|
+-- child_rp
```
{
"resource_providers": [
{
"uuid": "da9bd8c5-e376-4828-b8ed-080081f8e4ed",
"parent_provider_uuid": null,
"generation": 1,
"root_provider_uuid": "da9bd8c5-e376-4828-b8ed-080081f8e4ed",
"name": "original_root"
},
{
"uuid": "6985934e-0d44-404e-9b59-92d33f89d9ef",
"parent_provider_uuid": "da9bd8c5-e376-4828-b8ed-080081f8e4ed", # updated :)
"generation": 0,
"root_provider_uuid": "da9bd8c5-e376-4828-b8ed-080081f8e4ed", # updated :)
"name": "old_root_rp"
},
{
"uuid": "b80b63c9-1923-42ac-8659-e32479c70eaf",
"parent_provider_uuid": "6985934e-0d44-404e-9b59-92d33f89d9ef", # not updated :(
"generation": 0,
"root_provider_uuid": "6985934e-0d44-404e-9b59-92d33f89d9ef", # not updated :(
"name": "child_rp"
}
]
}
The old_root_rp's root provider uuid is updated,
but the child_rp's root provider uuid remains old root rp's uuid.
Expected
========
The child_rp's root provider uuid is also updated to the
original_root's rp uuid.
{
"resource_providers": [
{
"uuid": "da9bd8c5-e376-4828-b8ed-080081f8e4ed",
"parent_provider_uuid": null,
"generation": 1,
"root_provider_uuid": "da9bd8c5-e376-4828-b8ed-080081f8e4ed",
"name": "original_root"
},
{
"uuid": "6985934e-0d44-404e-9b59-92d33f89d9ef",
"parent_provider_uuid": "da9bd8c5-e376-4828-b8ed-080081f8e4ed",
"generation": 0,
"root_provider_uuid": "da9bd8c5-e376-4828-b8ed-080081f8e4ed",
"name": "old_root_rp"
},
{
"uuid": "b80b63c9-1923-42ac-8659-e32479c70eaf",
"parent_provider_uuid": "da9bd8c5-e376-4828-b8ed-080081f8e4ed", # updated as well :)
"generation": 0,
"root_provider_uuid": "da9bd8c5-e376-4828-b8ed-080081f8e4ed", # updated as well :)
"name": "child_rp"
}
]
}
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1779818/+subscriptions
References