creating audittemplate failed with old scope format

Bug #1882049 reported by licanwei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
New
Undecided
licanwei

Bug Description

In https://specs.openstack.org/openstack/watcher-specs/specs/queens/implemented/cdm-scoping.html, we changed the scope format, when creating audittemplate with old scope, there is an exception Additional properties are not allowed ('host_aggregates' was unexpected).
for example, scope file:[{"host_aggregates": [
                                    {"id": 1}]},
                               {"availability_zones": [
                                    {"name": "AZ1"},
                                    {"name": "AZ2"}]},
                               {"exclude": [
                                    {"instances": [
                                    ]},
                                    {"compute_nodes": [
                                    ]}
                               ]}]

CLI: watcher audittemplate create --scope /home/scope.json at1 dummy
return HTTP 500

licanwei (li-canwei2)
Changed in watcher:
assignee: nobody → licanwei (li-canwei2)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to watcher (master)

Fix proposed to branch: master
Review: https://review.opendev.org/733487

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to watcher (master)

Reviewed: https://review.opendev.org/733487
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=4a1915bec4c53f6aa893e649d14cd7106a983817
Submitter: Zuul
Branch: master

commit 4a1915bec4c53f6aa893e649d14cd7106a983817
Author: licanwei <email address hidden>
Date: Thu Jun 4 16:45:01 2020 +0800

    Compatible with old scope format

    Scope format changed from old to new after bp cdm-scoping.

    old format:
      - availability_zones:
        - name: nova
      - host_aggregates:
        - id: 1
        - name: agg
      - exclude:
        - compute_nodes:
          - name: w012

    new format:
    - compute:
      - availability_zones:
        - name: nova
      - host_aggregates:
        - id: 1
        - name: agg
      - exclude:
        - compute_nodes:
          - name: w012

    Change-Id: I2b5cd4d1cee19f5588e4d2185eb074343fff1187
    Closed-Bug: #1882049

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to watcher (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/735037

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to watcher (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/735038

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to watcher (stable/train)

Reviewed: https://review.opendev.org/735038
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=4422878ec73c8b5612e5875ba35f198e951d2c26
Submitter: Zuul
Branch: stable/train

commit 4422878ec73c8b5612e5875ba35f198e951d2c26
Author: licanwei <email address hidden>
Date: Thu Jun 4 16:45:01 2020 +0800

    Compatible with old scope format

    Scope format changed from old to new after bp cdm-scoping.

    old format:
      - availability_zones:
        - name: nova
      - host_aggregates:
        - id: 1
        - name: agg
      - exclude:
        - compute_nodes:
          - name: w012

    new format:
    - compute:
      - availability_zones:
        - name: nova
      - host_aggregates:
        - id: 1
        - name: agg
      - exclude:
        - compute_nodes:
          - name: w012

    Change-Id: I2b5cd4d1cee19f5588e4d2185eb074343fff1187
    Closed-Bug: #1882049
    (cherry picked from commit 4a1915bec4c53f6aa893e649d14cd7106a983817)

tags: added: in-stable-train
tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to watcher (stable/ussuri)

Reviewed: https://review.opendev.org/735037
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=6e1be3cca4f725e5e4bac5e600de6179a1cfb9bc
Submitter: Zuul
Branch: stable/ussuri

commit 6e1be3cca4f725e5e4bac5e600de6179a1cfb9bc
Author: licanwei <email address hidden>
Date: Thu Jun 4 16:45:01 2020 +0800

    Compatible with old scope format

    Scope format changed from old to new after bp cdm-scoping.

    old format:
      - availability_zones:
        - name: nova
      - host_aggregates:
        - id: 1
        - name: agg
      - exclude:
        - compute_nodes:
          - name: w012

    new format:
    - compute:
      - availability_zones:
        - name: nova
      - host_aggregates:
        - id: 1
        - name: agg
      - exclude:
        - compute_nodes:
          - name: w012

    Change-Id: I2b5cd4d1cee19f5588e4d2185eb074343fff1187
    Closed-Bug: #1882049
    (cherry picked from commit 4a1915bec4c53f6aa893e649d14cd7106a983817)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.