paunch/paunch
Steve Baker 82d6ff40fd Implement idempotency behaviour
This change implements idempotency so that apply can be run multiple
times with the same config ID. The aim of the idempotency behaviour is
to leave containers running when their config has not changed, but
replace containers which have modified config.

The logic sequence for idempotency is as follows:
- For each existing container with a matching config_id and
  managed_by:
  - delete containers which no longer exist in config
  - delete containers with missing config_data label
  - delete containers where config_data label differs from current
    config
- Do a full rename to desired names since deletes have occured
- Only create containers from config if there is no container running
  with that name
- exec actions will be run regardless, so commands they run may require
  their own idempotency behaviour

This change won't modify the behaviour of docker-cmd hook idempotency
since config IDs are never reused.

Change-Id: I29d07f7910258495804477d08de6040116527e8e
2017-05-23 09:54:09 +12:00
..
builder Implement idempotency behaviour 2017-05-23 09:54:09 +12:00
tests Implement idempotency behaviour 2017-05-23 09:54:09 +12:00
__init__.py Remove unimplemented 'show' command 2017-05-23 09:54:08 +12:00
cmd.py Remove unimplemented 'show' command 2017-05-23 09:54:08 +12:00
main.py Start to write docs 2017-04-06 15:15:59 +12:00
runner.py Split out container_names to its own method 2017-05-23 09:54:08 +12:00