Commit 3bc4717d authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: Bang Slave Instance when allocate it

  This ensure that timestamp is updated, and enforces that cache is updated
parent 604567c9
......@@ -15,7 +15,14 @@ assert instance.getAggregateValue() is None
compute_partition = portal.restrictedTraverse(compute_partition_url)
assert compute_partition.getPortalType() == "Compute Partition"
instance.edit(aggregate_value=compute_partition, activate_kw={'tag': 'allocate_%s' % compute_partition_url})
instance.edit(
aggregate_value=compute_partition,
activate_kw={'tag': 'allocate_%s' % compute_partition_url})
if instance.getPortalType() == "Slave Instance":
# Ensure bang timestamp get updated to ensure that
# timestamp is updated forcefully.
instance.bang(bang_tree=False, comment="Instance Allocated")
compute_node = compute_partition.getParentValue()
if compute_node.getPortalType() == 'Compute Node':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment