podman-etcd: preserve containers for debugging
This change modifies the agent to keep stopped containers for log
inspection and debugging, with supporting changes to enable this
behavior.
- Conditionally reuse existing containers when configuration unchanged
- Move etcd inline configuration flags to external file to allow restarts without container recreation (mainly for the force-new-cluster flag)
- Archive previous container renaming it into *-previous, and its configuration files into /var/lib/etcd/config-previous.tar.gz archive. The tar.gz archive consists in:
- the pod manifest created by CEO, used to generated the Etc configuration file
- the Etcd configuration file
- the auth json file Only one copy is maintained to limit disk usage.
- Both configuration and backup files location is configurable with 2 new input arguments.
Signed-off-by: Carlo Lobrano <c.lobrano@gmail.com>