Skip to content

Instantly share code, notes, and snippets.

@Mohitsharma44
Last active February 13, 2019 15:26
Show Gist options
  • Select an option

  • Save Mohitsharma44/a10524f4bee0d1389ce4cdc524d3bc35 to your computer and use it in GitHub Desktop.

Select an option

Save Mohitsharma44/a10524f4bee0d1389ce4cdc524d3bc35 to your computer and use it in GitHub Desktop.
docker-py swarm events
# Manually, Force update a service (making sure its running on node named as "vox")
{'Actor': {'Attributes': {'name': 'uosvc-mohitsharma44-excalibur_ubuntu_latest'}, 'ID': 'kba52nqpsj4l50svf8sbezzir'}, 'Action': 'update', 'scope': 'swarm', 'time': 1536632249, 'Type': 'service', 'timeNano': 1536632249122423813}
{'Actor': {'Attributes': {'name': 'uosvc-mohitsharma44-excalibur_ubuntu_latest', 'updatestate.new': 'updating'}, 'ID': 'kba52nqpsj4l50svf8sbezzir'}, 'Action': 'update', 'scope': 'swarm', 'time': 1536632249, 'Type': 'service', 'timeNano': 1536632249127300410}
{'Actor': {'Attributes': {'name': 'uosvc-mohitsharma44-excalibur_ubuntu_latest', 'updatestate.new': 'completed', 'updatestate.old': 'updating'}, 'ID': 'kba52nqpsj4l50svf8sbezzir'}, 'Action': 'update', 'scope': 'swarm', 'time': 1536632260, 'Type': 'service', 'timeNano': 1536632260078772980}
# Rebooting the worker node "vox"
{'Actor': {'Attributes': {'state.old': 'ready', 'name': 'vox', 'state.new': 'down'}, 'ID': 'dp10x59efw44pn0mkflzcqy7s'}, 'Action': 'update', 'scope': 'swarm', 'time': 1536632567, 'Type': 'node', 'timeNano': 1536632567003739254}
### --
### This is where I was expecting to see the logs for rebalancing/ updating the service
### --
{'Actor': {'Attributes': {'state.old': 'down', 'name': 'vox', 'state.new': 'ready'}, 'ID': 'dp10x59efw44pn0mkflzcqy7s'}, 'Action': 'update', 'scope': 'swarm', 'time': 1536632802, 'Type': 'node', 'timeNano': 1536632802761456992}
# Manually, Force update the service running on different node, gets rebalanced to node "vox"
{'Actor': {'Attributes': {'name': 'uosvc-mohitsharma44-excalibur_ubuntu_latest'}, 'ID': 'kba52nqpsj4l50svf8sbezzir'}, 'Action': 'update', 'scope': 'swarm', 'time': 1536632909, 'Type': 'service', 'timeNano': 1536632909244263891}
{'Actor': {'Attributes': {'name': 'uosvc-mohitsharma44-excalibur_ubuntu_latest', 'updatestate.new': 'updating'}, 'ID': 'kba52nqpsj4l50svf8sbezzir'}, 'Action': 'update', 'scope': 'swarm', 'time': 1536632909, 'Type': 'service', 'timeNano': 1536632909248518694}
{'Actor': {'Attributes': {'name': 'uosvc-mohitsharma44-excalibur_ubuntu_latest', 'updatestate.new': 'completed', 'updatestate.old': 'updating'}, 'ID': 'kba52nqpsj4l50svf8sbezzir'}, 'Action': 'update', 'scope': 'swarm', 'time': 1536632920, 'Type': 'service', 'timeNano': 1536632920694809797}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment