Store the actual UUID of obj_id in Senlin database for webhook create
In 'webhook' DB table, it has a field named 'obj_id' to reference a
target which the webhook will act on. Now if we create a webhook
with target name, then it will store the target name in the 'obj_id'
field of 'webhook' table. Triggering this webhook maybe lead to
unexpected result. An example is as following.
1. Create the first cluster named 'cluster1'
2. Create webhook on 'cluster1' with CLUSTER_SCALE_OUT action
3. Delete the cluster1
4. Create a second cluster also names 'cluster1'
5. Trigger the webhook which will result in scaling out the
second cluster.
Reviewed: https:/ /review. openstack. org/251187 /git.openstack. org/cgit/ openstack/ senlin/ commit/ ?id=4e5d76e5c9d f29fe5371a31211 4ac40bbc2b2e39
Committed: https:/
Submitter: Jenkins
Branch: master
commit 4e5d76e5c9df29f e5371a312114ac4 0bbc2b2e39
Author: Jun, Xu <email address hidden>
Date: Mon Nov 30 04:29:37 2015 +0000
Store the actual UUID of obj_id in Senlin database for webhook create
In 'webhook' DB table, it has a field named 'obj_id' to reference a
target which the webhook will act on. Now if we create a webhook
with target name, then it will store the target name in the 'obj_id'
field of 'webhook' table. Triggering this webhook maybe lead to
unexpected result. An example is as following.
1. Create the first cluster named 'cluster1'
2. Create webhook on 'cluster1' with CLUSTER_SCALE_OUT action
3. Delete the cluster1
4. Create a second cluster also names 'cluster1'
5. Trigger the webhook which will result in scaling out the
second cluster.
Change-Id: Idf2d27d7f16535 a52fbf6c59f1c99 7e4e0728c89
Closes-Bug: #1521049