But where is she then?
Last night, everything was fine, she took us to the bedroom and then…
pi@Gladys:~ $ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6cb19b851498 containrrr/watchtower:armhf-latest "/watchtower --clean…" 3 weeks ago Up 14 minutes 8080/tcp watchtower
709ddb530bac eclipse-mosquitto:2 "/docker-entrypoint.…" 4 weeks ago Up 14 minutes eclipse-mosquitto
pi@Gladys:~ $
Any ideas?
I swear we didn’t argue and she was well treated!
pi@Gladys:~ $ docker logs gladys
Error: No such container: gladys
pi@Gladys:~ $ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6cb19b851498 containrrr/watchtower:armhf-latest "/watchtower --clean…" 3 weeks ago Up 4 hours 8080/tcp watchtower
709ddb530bac eclipse-mosquitto:2 "/docker-entrypoint.…" 4 weeks ago Up 4 hours eclipse-mosquitto
pi@Gladys:~ $
Nothing at all, I promise! She just went off to other horizons. I understand, the weather here is terrible
Installed on a RPi 4 with 4GB of RAM, 32GB class A1 microSD from the image from the site in December '20.
She executed her last scene last night, then, after she turned off the bedside lamps, I noticed that the connection with Gladys’ MQTT was lost (blinking indicator on the plug), but I didn’t worry because it had already happened. But in fact, given the 16 degrees in the house in the morning, the conclusion was quickly made! She left us forever.
That said, it seems that the DB folder is still there. So, how to do it right?
I was planning to switch to an SSD soon, but I shouldn’t have waited…
I managed to do it with the Docker command!
And Gladys, or her clone, is back!
Thanks!
Edit: apparently, crash at 23:54 according to the images from the cams in the cache. But what happened? Corrupted SD card?
Honestly, it clearly looks like an SD card corruption (Either that, or you took advantage of the reopening of bars yesterday and forgot what you did on your way home )
In any case, given your setup and my experience with Docker, I have never seen a container disappear in production (and I work with companies where there are containers galore )
So in my opinion, it could be a cascading bug:
The SD card has some bad sectors
Docker realizes that there is data in a bad state more coherent, and destroys the container..
Indeed, switching to an SSD will bring you more stability in the long term
time="2021-05-13T10:13:56Z" level=info msg="Stopping /gladys (24aa5c068c67) with SIGTERM"
time="2021-05-13T10:14:07Z" level=info msg="Creating /gladys"
time="2021-05-13T10:14:08Z" level=info msg="Removing image 6666a80d7b68"
time="2021-05-16T20:38:18Z" level=info msg="Waiting for running update to be finished..."
time="2021-05-16T20:39:27Z" level=info msg="Watchtower 1.3.0
Using no notifications
Checking all containers (except explicitly disabled with label)
Scheduling first run: 2021-05-17 20:39:27 +0000 UTC
Note that the first check will be performed in 23 hours, 59 minutes, 59 seconds"
time="2021-05-20T05:22:40Z" level=info msg="Watchtower 1.3.0
Using no notifications
Checking all containers (except explicitly disabled with label)
Scheduling first run: 2021-05-21 05:22:40 +0000 UTC
Note that the first check will be performed in 23 hours, 59 minutes, 59 seconds"
pi@Gladys:~ $```
However, there is nothing between the 17th and the 20th...
Hi @pierre-gilles, this is a bit off-topic, but I would be interested to know how Docker containers run in production, whether the images are retrieved from official repositories or not, what technology the Docker containers run on, etc.
I will soon have to think about setting up a small development infrastructure, this will give me some ideas to think about
For private clients (private box), I use private Docker registries (Docker Hub has an offer, GitHub also I think). Basically, you need to do a docker login before pulling your containers.
To launch your containers:
Either if you have a « static » infrastructure (that does not scale with demand) and you launch your containers in an environment that you have deployed (a set of VMs in the Cloud/bare metal). In this case, you can use docker-compose to launch your containers for example, or just scripts if the infrastructure is very simple. You put a load balancer in front of your containers to distribute the traffic.
Or you have an infrastructure that scales/unscalable according to demand, and in this case you need an orchestrator like Kubernetes, there are managed offers at AWS, Azure, Google, DigitalOcean and others.. After all, it’s great for projects with hyper high traffic, but 90% of projects can be deployed via simple scripts, with a load balancer in front and that’s it.
If you have other questions, do not hesitate (you can even create another topic, it’s a bit off-topic here ^^)