Deployment update triggers unnecessary metadata pushes

Bug #1320262 reported by Steve Baker on 2014-05-16
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Steve Baker
os-collect-config
High
Clint Byrum

Bug Description

Tripleo are experiencing config being retriggered by deployment signalling, causing eternal config loops.

Changed in heat:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Steve Baker (steve-stevebaker)
milestone: none → juno-1

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

Changed in heat:
status: Triaged → In Progress

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

commit b221cd2da2417763f0d5dda6ee6d4b90bfdb7b68
Author: Steve Baker <email address hidden>
Date: Fri May 16 10:35:17 2014 -0400

    Only push metadata when required

    Metadata only needs to be pushed on deployment update when the
    config_id changes.

    Tripleo are experiencing config being retriggered by deployment signalling,
    causing eternal config loops.

    Change-Id: I3953d45db745ee6a7a4a7b0f989f18cb0ecba3bf
    Closes-Bug: #1320262

Changed in heat:
status: In Progress → Fix Committed
Steve Baker (steve-stevebaker) wrote :

The committed change only mitigates the actual issue.

With the above change disabled, a diff between the old and new metadata is as follows:
$ diff -u 3.json 4.json
--- 3.json 2014-05-20 10:41:45.978735676 +1200
+++ 4.json 2014-05-20 10:41:58.572823225 +1200
@@ -224,9 +224,9 @@
     "cfn": {
       "stack_name": "SoftwareConfigScenarioTest--1670516595",
       "metadata_url": "http://192.168.20.106:8000/v1/",
- "access_key_id": "599a329b46c0423398e8d92386f0f7b0",
+ "path": "server.Metadata",
       "secret_access_key": "bd400b72feb7449589ce04c8cd070251",
- "path": "server.Metadata"
+ "access_key_id": "599a329b46c0423398e8d92386f0f7b0"
     }
   }
 }

The json is structurally identical, but hashing in os-collect-config fails on the raw stream.

occ should probably compare the parsed json for equality instead.

Changed in heat:
status: Fix Committed → Triaged
status: Triaged → Fix Committed
Changed in heat:
status: Fix Committed → In Progress
Clint Byrum (clint-fewbar) wrote :

In o-c-c, we should not be hashing json, but comparing the actual data structures result after parsing the json.

Changed in os-collect-config:
status: New → Triaged
importance: Undecided → High

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

Changed in os-collect-config:
assignee: nobody → Clint Byrum (clint-fewbar)
status: Triaged → In Progress

Change abandoned by Steve Baker (<email address hidden>) on branch: master
Review: https://review.openstack.org/94283
Reason: will be fixed in occ

Reviewed: https://review.openstack.org/94548
Committed: https://git.openstack.org/cgit/openstack/os-collect-config/commit/?id=dc35d20358179e79d20f1fac0368eefd7d657e9d
Submitter: Jenkins
Branch: master

commit dc35d20358179e79d20f1fac0368eefd7d657e9d
Author: Clint Byrum <email address hidden>
Date: Wed May 21 01:02:05 2014 -0700

    Use json equality rather than raw text

    It turns out sometimes json will serialize differently given the same
    python structure. A check of the two parsed data structures will detect
    changes more reliably.

    Change-Id: Id165b36c0fa0fa89730c3507444a41c68bd70fb3
    Closes-Bug: #1320262

Changed in os-collect-config:
status: In Progress → Fix Committed
Changed in os-collect-config:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-06-11
Changed in heat:
milestone: juno-1 → juno-2
Steven Hardy (shardy) wrote :

Discussion with stevebaker indicates the fix committed is all that is planned for the heat part of this, and the os-collect-config change solved the issue, so marking fix committed.

Changed in heat:
status: In Progress → Fix Committed
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-10-16
Changed in heat:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers