only save sliver record if operstions succeed
diff --git a/planetstack/observer/steps/sync_slivers.py b/planetstack/observer/steps/sync_slivers.py
index 299d079..9780dcb 100644
--- a/planetstack/observer/steps/sync_slivers.py
+++ b/planetstack/observer/steps/sync_slivers.py
@@ -34,7 +34,8 @@
pubkeys = [sm.user.public_key for sm in slice_memberships if sm.user.public_key]
if sliver.creator.public_key:
pubkeys.append(sliver.creator.public_key)
-
+ if sliver.slice.creator.public_key:
+ pubkeys.append(sliver.slice.creator.public_key)
# netowrks
#nics = self.get_requested_networks(sliver.slice, sliver.node.deployment)
nics = []
@@ -76,8 +77,8 @@
nics = nics )
sliver.instance_id = instance.id
sliver.instance_name = getattr(instance, 'OS-EXT-SRV-ATTR:instance_name')
+ sliver.save()
if sliver.instance_id and metadata_update:
driver.update_instance_metadata(sliver.instance_id, metadata_update)
- sliver.save()