Community discussions

MikroTik App
 
frankedwards
just joined
Topic Author
Posts: 3
Joined: Fri Dec 03, 2021 3:49 am

7.4rc2 container does not start after reboot

Sat Jul 16, 2022 11:16 am

It appears after upgrading to 7.4rc2 that containers do not start following a reboot.

Issue Report
1. Version number: 7.4rc2
2. Router Model: hAP ac³
3. Steps to reproduce the issue:
* Add the configuration and example container image as per the Container documentation (https://help.mikrotik.com/docs/display/ROS/Container)
[admin@MikroTik] > /container print
 0 name="32e88d3b-d744-4e02-96bd-b77d8d46a93d" tag="pihole/pihole:latest" os="linux" arch="arm" 
   interface=veth1 envlist="pihole_envs" root-dir=disk1/pihole mounts=etc_pihole,dnsmasq_pihole 
   dns="" status=stopped 

* Container can be started:
[admin@MikroTik] > /container start 0
[admin@MikroTik] > /container print
 0 name="32e88d3b-d744-4e02-96bd-b77d8d46a93d" tag="pihole/pihole:latest" os="linux" arch="arm" 
   interface=veth1 envlist="pihole_envs" root-dir=disk1/pihole mounts=etc_pihole,dnsmasq_pihole 
   dns="" status=running 
* Stop the container and reboot
[admin@MikroTik] > /container stop 0
[admin@MikroTik] > /system reboot
Reboot, yes? [y/N]: 
y
system will reboot shortly
* Attempt to start the container following reboot:
[admin@MikroTik] > /container start 0
[admin@MikroTik] > /container print
 0 name="32e88d3b-d744-4e02-96bd-b77d8d46a93d" tag="pihole/pihole:latest" os="linux" arch="arm" 
   interface=veth1 envlist="pihole_envs" mounts=etc_pihole,dnsmasq_pihole dns="" status=stopped
4. Configuration export
[admin@MikroTik] > /export hide-sensitive
# jul/16/2022 18:07:49 by RouterOS 7.4rc2
# software id = JI5E-5JQW
#
# model = RBD53iG-5HacD2HnD
# serial number = E7290E36E46D
/interface bridge
add admin-mac=2C:C8:1B:FA:ED:3F auto-mac=no comment=defconf name=bridge
add name=cam
add name=dockers
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX disabled=no distance=\
    indoors frequency=auto installation=indoor mode=ap-bridge ssid=MikroTik-FAED43 wireless-protocol=\
    802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-XXXX disabled=no distance=\
    indoors frequency=auto installation=indoor mode=ap-bridge ssid=MikroTik-FAED44 wireless-protocol=\
    802.11
/interface veth
add address=172.17.0.2/16 gateway=172.17.0.1 name=veth1
/container mounts
add dst=/etc/pihole name=etc_pihole src=/disk1/etc
add dst=/etc/dnsmasq.d name=dnsmasq_pihole src=/disk1/etc-dnsmasq.d
/disk
set usb1 disabled=no
set usb1-part1 disabled=no name=disk1
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp interface=bridge name=defconf
/system logging action
add name=dlog target=memory
/zerotier
set zt1 comment="ZeroTier Central controller - https://my.zerotier.com/" disabled=yes disabled=yes \
    name=zt1 port=9993
/container
add envlist=pihole_envs interface=veth1 mounts=etc_pihole,dnsmasq_pihole
/container config
set registry-url=https://registry-1.docker.io
/container envs
add key=TZ name=pihole_envs value=Europe/Riga
add key=WEBPASSWORD name=pihole_envs value=mysecurepassword
add key=DNSMASQ_USER name=pihole_envs value=root
/interface bridge port
add bridge=bridge comment=defconf ingress-filtering=no interface=ether3
add bridge=bridge comment=defconf ingress-filtering=no interface=ether4
add bridge=bridge comment=defconf ingress-filtering=no interface=ether5
add bridge=bridge comment=defconf ingress-filtering=no interface=wlan1
add bridge=bridge comment=defconf ingress-filtering=no interface=wlan2
add bridge=dockers interface=veth1
add bridge=bridge interface=ether2
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ipv6 settings
set disable-ipv6=yes max-neighbor-entries=8192
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/interface ovpn-server server
set auth=sha1,md5
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0
add address=172.17.0.1/16 interface=dockers network=172.17.0.0
/ip dhcp-client
add comment=defconf interface=ether1
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment="defconf: accept established,related,untracked" \
    connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=\
    established,related hw-offload=yes
add action=accept chain=forward comment="defconf: accept established,related, untracked" \
    connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=\
    !dstnat connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface=\
    ether1 out-interface-list=WAN
add action=masquerade chain=srcnat out-interface=ether1 src-address=172.17.0.0/16
/system clock
set time-zone-name=Australia/Brisbane
/system leds
set 0 interface=wlan1 leds=led1,led2,led3,led4,led5 type=wireless-signal-strength
set 1 leds=poe-led type=poe-out
/system logging
add topics=container
/system package update
set channel=testing
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
5. Any additional information that would help
No logging is shown when attempting to restart the container.
Logs on reboot:
 18:03:39 container,info,debug could not use root-dir: disk1/pihole, ignoring
 18:03:39 container,info,debug could not use tmpdir: disk1/pull, ignoring
 ...
 18:03:48 bridge,info "dockers" mac address changed to 42:BC:40:CF:81:10
 
rplant
Member Candidate
Member Candidate
Posts: 282
Joined: Fri Sep 29, 2017 11:42 am

Re: 7.4rc2 container does not start after reboot

Sun Jul 17, 2022 8:30 am

Hi,
Perhaps those boot up log messages are meaningful.
Maybe disk1 becomes available after the container initialization.
(Which fails because disk1 is not yet available)

Can you perhaps put the container, and mounts into flash rather than disk1 and see if it works through a reboot then.
 
frankedwards
just joined
Topic Author
Posts: 3
Joined: Fri Dec 03, 2021 3:49 am

Re: 7.4rc2 container does not start after reboot

Sun Jul 17, 2022 11:15 am

Hi

Thanks. Looks like a lack of space prevents the container being installed to flash:
18:05:30 container,info,debug importing remote image: pihole/pihole, tag: latest
18:05:35 container,info,debug getting layer sha256:eeb117569618df53320eb28d32b7a1d87792bda3362017123fa1025b55db44c3
18:05:45 container,info,debug layer sha256:eeb117569618df53320eb28d32b7a1d87792bda3362017123fa1025b55db44c3 downloaded
18:05:51 container,info,debug no space to extract layer
18:05:51 container,info,debug was unable to import, container f9bec265-91c1-4506-854a-93680c2dc8f0
Container status:
admin@MikroTik] > /container print
 0 name="f9bec265-91c1-4506-854a-93680c2dc8f0" tag="pihole/pihole:latest" os="linux" arch="arm" 
   interface=veth1 envlist="pihole_envs" root-dir=pihole mounts=etc_pihole,dnsmasq_pihole dns="" 
   status=error 
Regards

Frank
---
 
cklee234
newbie
Posts: 44
Joined: Tue Sep 29, 2020 6:49 am

Re: 7.4rc2 container does not start after reboot

Mon Jul 18, 2022 4:12 am

I use netwatch to monitor the container up and running after I confirm the container configuration works and it runs well
 
rplant
Member Candidate
Member Candidate
Posts: 282
Joined: Fri Sep 29, 2017 11:42 am

Re: 7.4rc2 container does not start after reboot

Tue Jul 19, 2022 12:12 pm

Hapac3,
I made a small container that does fit into the flash, and it is restartable on reboot.
it isn't running after reboot, but just needs a /container start 0 command.
(Note: I had to create the docker directory before it would create the iperf container in it)

Mikrotik maybe needs to delay container initialization till a bit later.
Also at present you cannot recreate the config from the export as it loses the file=iperf.tar section.
In this instance I also put this into the comment, as a reminder.

/container
add cmd="iperf3 -s" dns="" envlist=iperf file=iperf.tar \
hostname=iperf interface=veth1 logging=yes mounts="" root-dir=docker/iperf \
comment="file=iperf.tar"
 
frankedwards
just joined
Topic Author
Posts: 3
Joined: Fri Dec 03, 2021 3:49 am

Re: 7.4rc2 container does not start after reboot  [SOLVED]

Thu Jul 28, 2022 5:56 am

Hi

Thanks for your assistance. It looks like the issue is resolved for me in 7.5beta4.

Regards

Frank

Who is online

Users browsing this forum: No registered users and 19 guests