Community discussions

MikroTik App
 
mikezh
just joined
Topic Author
Posts: 2
Joined: Tue Apr 09, 2024 12:28 pm

RouterOS container deletion issue

Tue Apr 09, 2024 12:43 pm

I created three containers in RouterOS. When I stopped the third container and clicked the delete button, the container was not deleted. Instead, the other containers transitioned to a stopped state. After waiting for a while, all containers transitioned back to a running state. I had to delete all the containers one by one to remove the third container.
Additionally, I noticed that when deleting containers, RouterOS also deletes configuration files mounted under directories, which I don't want. I hope the official team can investigate this issue.
My device is RB5009, and the RouterOS version is 7.14.
Thanks.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5508
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: RouterOS container deletion issue

Tue Apr 09, 2024 3:11 pm

My guess (been there, done that):
you did not provide the correct location for your containers nor the correct location for the config files.
Some (or all ?) of it came together in one big place.

Show your config, please.
 
mikezh
just joined
Topic Author
Posts: 2
Joined: Tue Apr 09, 2024 12:28 pm

Re: RouterOS container deletion issue

Tue Apr 09, 2024 6:52 pm

My guess (been there, done that):
you did not provide the correct location for your containers nor the correct location for the config files.
Some (or all ?) of it came together in one big place.

Show your config, please.
The container configurations are as follows:
/container mounts
add dst=/root/.config/aaa name=aaa_config src=/usb1/docker/volumes/aaa
add dst=/root name=bbb_config src=/usb1/docker/volumes/bbb
add dst=/data name=ccc_config src=/usb1/docker/volumes/ccc
/container
add entrypoint="sh /root/.config/aaa/start.sh" interface=veth2 mounts=aaa_config root-dir=/usb1/docker/rootdir/aaa start-on-boot=yes
add interface=veth3 mounts=bbb_config root-dir=/usb1/docker/rootdir/bbb start-on-boot=yes workdir=/app
add interface=veth4 mounts=ccc_config root-dir=/usb1/docker/rootdir/ccc start-on-boot=yes
/container config
set layer-dir=usb1/docker/overlayfs registry-url=https://registry-1.docker.io tmpdir=usb1/docker/pull
each of the three containers is allocated its own root directory and mounted folder. When the "aaa" container is eventually deleted, all files in its mounted directory /usb1/docker/volumes/aaa are lost, and a residual ".rm.aaa" folder appears in its root directory folder.
Another issue is that the "ccc" container cannot be directly deleted; it seems that all three containers need to be deleted in sequence, otherwise, the phenomenon described in the topic occurs, causing mutual interference.
Could you please assist in analyzing this matter? Thank you.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3568
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: RouterOS container deletion issue

Wed Apr 10, 2024 5:58 am

Try using root-dir= without the starting "/".

e.g. root-dir=usb1/docker/rootdir/aaa

For mounts, those should be okay, but the root-dir has always been pickier on the path. Or at least that's my guess.

Who is online

Users browsing this forum: No registered users and 1 guest