No need to update resource if property is the same

Bug #1514680 reported by huangtianhua
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Rabi Mishra
Kilo
Fix Released
Undecided
Unassigned

Bug Description

Heat allows define some property using name or id, if user modify the template from name to id(or id to name), but in fact they are the same physical resource, what is important is that if the property is not updatable, the resource will be replacement, so I think we should do some check to avoid this happen.

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
description: updated
Changed in heat:
importance: Undecided → Medium
Changed in heat:
status: New → Triaged
Changed in heat:
assignee: huangtianhua (huangtianhua) → Steven Hardy (shardy)
status: Triaged → In Progress
Changed in heat:
milestone: none → mitaka-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/257581
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=3a82e0cd59f8d4bb9308969109dead0d7887c2f3
Submitter: Jenkins
Branch: master

commit 3a82e0cd59f8d4bb9308969109dead0d7887c2f3
Author: Steven Hardy <email address hidden>
Date: Mon Dec 14 22:15:38 2015 +0000

    Neutron port, tolerate switching network name/id

    It's valid to switch the network name for an ID referencing the
    same network, and vice-versa so allow that behavior when using the
    network property which can accept either name or ID.

    Change-Id: I0889ff8fc277dc9703d30b7e42fd799cfb57e975
    Partial-Bug: #1514680

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

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/257904

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

Fix proposed to branch: master
Review: https://review.openstack.org/257966

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

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/257993

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/257994

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

Reviewed: https://review.openstack.org/257966
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=f2dcc463ce11ea1f5facff6cf2395deee98f9414
Submitter: Jenkins
Branch: master

commit f2dcc463ce11ea1f5facff6cf2395deee98f9414
Author: Steven Hardy <email address hidden>
Date: Tue Dec 15 15:04:37 2015 +0000

    Neutron port allow switching between network_id and network

    The network_id property is deprecated, so we should tolerate switching
    to the not-deprecated network property without replacing the port.

    This also adjusts the logic in _needs_update slightly to enable easier
    backporting to stable branches.

    Change-Id: I289a88c1a9c3351df976424504bc14a5ec878573
    Partial-Bug: #1514680

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

Reviewed: https://review.openstack.org/257904
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=ab3c52543493ec2aa7e1d9f8d189a62034f342b7
Submitter: Jenkins
Branch: stable/liberty

commit ab3c52543493ec2aa7e1d9f8d189a62034f342b7
Author: Steven Hardy <email address hidden>
Date: Mon Dec 14 22:15:38 2015 +0000

    Neutron port, tolerate switching network name/id

    It's valid to switch the network name for an ID referencing the
    same network, and vice-versa so allow that behavior when using the
    network property which can accept either name or ID.

    This has been squashed with I289a88c1a9c3351df976424504bc14a5ec878573
    to make backporting easier:

    Neutron port allow switching between network_id and network

    The network_id property is deprecated, so we should tolerate switching
    to the not-deprecated network property without replacing the port.

    Conflicts:
     heat/engine/resources/openstack/neutron/port.py

    Also modified heat/tests/neutron/test_neutron_port.py to make tests pass.

    (cherry picked from commit 3a82e0cd59f8d4bb9308969109dead0d7887c2f3)
    (combined with review I289a88c1a9c3351df976424504bc14a5ec878573)

    Partial-Bug: #1514680
    Change-Id: I0889ff8fc277dc9703d30b7e42fd799cfb57e975

tags: added: in-stable-liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (stable/kilo)

Change abandoned by Giulio Fidente (<email address hidden>) on branch: stable/kilo
Review: https://review.openstack.org/257994
Reason: for liberty this was squashed together with I289a88c1a9c3351df976424504bc14a5ec878573

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

Fix proposed to branch: master
Review: https://review.openstack.org/263805

Changed in heat:
assignee: Steven Hardy (shardy) → Rabi Mishra (rabi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/265136

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/265137

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

Change abandoned by Rabi Mishra (<email address hidden>) on branch: master
Review: https://review.openstack.org/263805
Reason: Abandoning this in favor of https://review.openstack.org/#/c/265136/ and using translate_properties.

Changed in heat:
milestone: mitaka-2 → mitaka-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/kilo)

Reviewed: https://review.openstack.org/257993
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=03ee72291746143a50b888303a4361042b479954
Submitter: Jenkins
Branch: stable/kilo

commit 03ee72291746143a50b888303a4361042b479954
Author: Steven Hardy <email address hidden>
Date: Mon Dec 14 22:15:38 2015 +0000

    Neutron port, tolerate switching network name/id

    It's valid to switch the network name for an ID referencing the
    same network, and vice-versa so allow that behavior when using the
    network property which can accept either name or ID.

    Neutron port allow switching between network_id and network

    The network_id property is deprecated, so we should tolerate switching
    to the not-deprecated network property without replacing the port.

    Conflicts:
     heat/engine/resources/openstack/neutron/port.py

    (cherry picked from commit ab3c52543493ec2aa7e1d9f8d189a62034f342b7
     with manual fallback for NETWORK_ID due to the lack of
     translation_rules in stable/kilo)
    Partial-Bug: #1514680
    Change-Id: I0889ff8fc277dc9703d30b7e42fd799cfb57e975

tags: added: in-stable-kilo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/265136
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=beb63368e4a1504306b8863829482d2f13efe3ae
Submitter: Jenkins
Branch: master

commit beb63368e4a1504306b8863829482d2f13efe3ae
Author: Rabi Mishra <email address hidden>
Date: Fri Jan 8 11:32:29 2016 +0530

    Add new translation rule to resolve with client

    Adds a new `Resolve` rule to resolve property using specified
    client plugin and finder.

    Also refactors the execute_rule function to split out the
    rule specific logic.

    Subsequent patches in the series adds usage of this rule for name_id
    properties.

    Change-Id: If598597d0fe92ccba1c0823f36388838c549ba88
    Partial-Bug: #1514680

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/265137
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=0388da504765f9975aeadc509672c0a47bbcc244
Submitter: Jenkins
Branch: master

commit 0388da504765f9975aeadc509672c0a47bbcc244
Author: Rabi Mishra <email address hidden>
Date: Tue Jan 5 17:19:52 2016 +0530

    Resolve name/id using translation rules

    This changes the first set of neutron resouces to
    use translation rules to resolve name_id properties.

    Changed reources:

    - OS::Neutron::Subnet
    - OS::Neutron::Port
    - OS::Neutron:Router
    - OS::Neutron:FloatingIp

    Change-Id: I2119401e3554d0bafd34978e6c8e7610712148ac
    Partial-Bug: #1514680

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

Fix proposed to branch: master
Review: https://review.openstack.org/280045

Changed in heat:
milestone: mitaka-3 → mitaka-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/287834

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

Reviewed: https://review.openstack.org/280045
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=2e637091f3bb183bb4bde0d0838a609942a1b6b4
Submitter: Jenkins
Branch: master

commit 2e637091f3bb183bb4bde0d0838a609942a1b6b4
Author: Rabi Mishra <email address hidden>
Date: Tue Jan 5 17:19:52 2016 +0530

    Resolve name/id using translation rules

    This changes the first set of neutron resouces to
    use translation rules to resolve name_id properties.

    Changed reources:

    - OS::Neutron::Subnet
    - OS::Neutron::Port
    - OS::Neutron::Router
    - OS::Neutron::FloatingIp

    Change-Id: I13f30abb5e284beff4ece9e0c88ee7319ff1be80
    Partial-Bug: #1514680
    Closes-Bug: #1553362

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/287834
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=9305478141502f5eec289b30c9363731a699948c
Submitter: Jenkins
Branch: master

commit 9305478141502f5eec289b30c9363731a699948c
Author: Rabi Mishra <email address hidden>
Date: Thu Jan 28 10:08:57 2016 +0530

    Resolve name/id using translation rules for Server

    This changes OS::Nova::Server resource to use
    translation rules to resolve name_id properties.

    As most of the tests in test_server.py and
    test_rackspace_cloud_server.py are impacted by this
    change, this also changes all the tests to use mock
    library. Though the change is very big, it's mostly
    mox to mock conversion for the tests.

    This reduces the LOC drastically. Some of these test
    modules have become very big to manage. We can split
    them into smaller ones in the future.

    Change-Id: Iaa630ab3b013dfb65e9131b1f265e846c8274037
    Partial-Bug: #1514680
    Blueprint: mox-to-mock-conversion

Revision history for this message
Rabi Mishra (rabi) wrote :

Closing this one and adding a new one to handle lbaas v1/v2 and some other resources, which we'll do in the next cycle.

Changed in heat:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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