Operations grimoire/Restart a Docker engine: Difference between revisions

From Nasqueron Agora
(Created page with "A lot of vital components belong to Docker. Ideally, we should have redundancy to avoid container lost. # Restart Docker engine # Restart containers, either manually, either...")
 
No edit summary
Line 1: Line 1:
A lot of vital components belong to Docker.
== Restart ==
A lot of vital components are managed by Docker.


Ideally, we should have redundancy to avoid container lost.
Ideally, we should have redundancy to avoid container lost.


# Restart Docker engine
# Restart Docker engine
# Restart containers, either manually, either with docker-containers systemd unit
# Restart containers, either manually, either with the docker-containers systemd unit
# Run [[Operations grimoire/production tests|production tests]]
# Run [[Operations grimoire/production tests|production tests]]
# Run


== Services needing manual tweaking after container restart ==
== Services needing manual tweaking after container restart ==

Revision as of 20:15, 21 July 2016

Restart

A lot of vital components are managed by Docker.

Ideally, we should have redundancy to avoid container lost.

  1. Restart Docker engine
  2. Restart containers, either manually, either with the docker-containers systemd unit
  3. Run production tests

Services needing manual tweaking after container restart

Phabricator instances

DevCentral needs:

  1. bin/phd status
  2. bin/phd stop <the PID of PhabricatorBot>
  3. sv restart phd
  4. chpst -u app bin/phd launch PhabricatorBot /opt/phabricator/conf/xessife.json

Other instances needs a sv restart phd.

Broker

Wearg needs to be manually reconnected to the broker:

  1. .tcl mq disconnect
  2. .tcl utimers and kill remaining timers if needed
  3. .tcl mq broker::connect
  4. .tcl broker::on_tick

That requires a owner access to Wearg (ping Dereckson).

Troubleshooting

When MySQL isn't reacheable

If the MySQL container (acquisitariat) IP changed, you need to tweak /etc/hosts in every depending container (Phabricator instances, cachet, pad, login) and ensure there is a <correct IP> mysql line.

When a container doesn't want to restart

Try first to see what happens with docker logs <container name>.

If that doesn't work, go to the services section of the grimoire and reprovision it.

Commit a backup Docker image based on the current content with with docker commit <name> <name>-bak. That will allow investigation.