← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1779818] [NEW] child's root provider is not updated.

 

Public bug reported:

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"
        }
    ]
}

** Affects: nova
     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/1779818

Title:
  child's root provider is not updated.

Status in OpenStack Compute (nova):
  New

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


Follow ups