def process_secgroup_after(self, resource, event, trigger, **kwargs):
"""Callback for handling security group/rule commit-complete events
This is when we should tell other things that a change has
happened and has been recorded permanently in the DB.
"""
# In Liberty, this is the only callback that's called.
# We use our own event names, which will identify AFTER_*
# events as the right time to commit, so in this case we
# simply call the commit function ourselves.
# This is not perfect - since we're not committing in one
# transaction we can commit the secgroup change but fail to
# propagate it to the journal and from there to etcd on a
# crash. It's all we can do for Liberty as it doesn't support
# in-transaction precommit events.
if not PRECOMMIT:
self.process_secgroup_commit(resource, event, trigger, **kwargs)
# Whatever the object that caused this, we've put something
# in the journal and now need to nudge the communicator
self.kick()
评论列表
文章目录