AndreCox / PIBaker

Create Custom Raspberry Pi Images Easily
GNU General Public License v3.0
39 stars 6 forks source link

Pi Emulator booting into emergency mode / Ansible timing out #1

Closed BoxingOctopus closed 1 year ago

BoxingOctopus commented 2 years ago

I'm having an issue where Ansible times out because the Emulator container isn't ready in time. Additionally, it seems like the emulator container is consistently booting into emergency mode and stalling out.

pibaker-ansible-playbook-1  |
pibaker-ansible-playbook-1  | PLAY [raspberries] *************************************************************
pibaker-ansible-playbook-1  |
pibaker-ansible-playbook-1  | TASK [Wait till RPI enters the running phase] **********************************
pibaker-pi-emulator-1       | [INFO] Starting the emulator ...
pibaker-ansible-playbook-1  | [WARNING]: Unhandled error in Python interpreter discovery for host
pibaker-ansible-playbook-1  | 172.16.238.10: Failed to connect to the host via ssh: Connection timed out
pibaker-ansible-playbook-1  | during banner exchange
pibaker-pi-emulator-1       |
pibaker-pi-emulator-1       | Welcome to Debian GNU/Linux 10 (buster)!
pibaker-pi-emulator-1       |
pibaker-pi-emulator-1       | [  OK  ] Listening on udev Control Socket.
pibaker-pi-emulator-1       | [  OK  ] Listening on Journal Audit Socket.
pibaker-pi-emulator-1       | [  OK  ] Listening on Syslog Socket.
pibaker-pi-emulator-1       | [  OK  ] Created slice User and Session Slice.
pibaker-pi-emulator-1       | [  OK  ] Created slice system-serial\x2dgetty.slice.
pibaker-pi-emulator-1       | [  OK  ] Created slice system-systemd\x2dfsck.slice.
pibaker-pi-emulator-1       | [  OK  ] Set up automount Arbitrary…s File System Automount Point.
pibaker-pi-emulator-1       | [  OK  ] Reached target Swap.
pibaker-pi-emulator-1       | [  OK  ] Listening on Journal Socket (/dev/log).
pibaker-pi-emulator-1       | [  OK  ] Listening on udev Kernel Socket.
pibaker-pi-emulator-1       | [  OK  ] Reached target Slices.
pibaker-pi-emulator-1       | [  OK  ] Listening on initctl Compatibility Named Pipe.
pibaker-pi-emulator-1       | [  OK  ] Listening on fsck to fsckd communication Socket.
pibaker-pi-emulator-1       | [  OK  ] Listening on Journal Socket.
pibaker-pi-emulator-1       |          Starting Restore / save the current clock...
pibaker-pi-emulator-1       |          Starting udev Coldplug all Devices...
pibaker-pi-emulator-1       |          Mounting POSIX Message Queue File System...
pibaker-pi-emulator-1       |          Starting Load Kernel Modules...
pibaker-pi-emulator-1       |          Starting Create list of re…odes for the current kernel...
pibaker-pi-emulator-1       |          Starting Journal Service...
pibaker-pi-emulator-1       | [  OK  ] Created slice system-getty.slice.
pibaker-pi-emulator-1       |          Mounting RPC Pipe File System...
pibaker-pi-emulator-1       | [  OK  ] Started Forward Password R…uests to Wall Directory Watch.
pibaker-pi-emulator-1       |          Mounting Kernel Debug File System...
pibaker-pi-emulator-1       |          Starting Set the console keyboard layout...
pibaker-pi-emulator-1       |          Starting Wait Until Kernel Time Synchronized...
pibaker-pi-emulator-1       | [  OK  ] Started Dispatch Password …ts to Console Directory Watch.
pibaker-pi-emulator-1       | [  OK  ] Reached target Paths.
pibaker-pi-emulator-1       | [  OK  ] Reached target Local Encrypted Volumes.
pibaker-pi-emulator-1       | [  OK  ] Started Restore / save the current clock.
pibaker-pi-emulator-1       | [  OK  ] Mounted POSIX Message Queue File System.
pibaker-pi-emulator-1       | [  OK  ] Started Load Kernel Modules.
pibaker-pi-emulator-1       | [  OK  ] Started Create list of req… nodes for the current kernel.
pibaker-pi-emulator-1       | [  OK  ] Mounted RPC Pipe File System.
pibaker-pi-emulator-1       | [  OK  ] Mounted Kernel Debug File System.
pibaker-pi-emulator-1       |          Starting Apply Kernel Variables...
pibaker-pi-emulator-1       |          Mounting Kernel Configuration File System...
pibaker-pi-emulator-1       |          Starting Remount Root and Kernel File Systems...
pibaker-pi-emulator-1       | [  OK  ] Started Journal Service.
pibaker-pi-emulator-1       | [  OK  ] Started Apply Kernel Variables.
pibaker-pi-emulator-1       | [  OK  ] Mounted Kernel Configuration File System.
pibaker-pi-emulator-1       | [ TIME ] Timed out waiting for device /dev/ttyAMA0.
pibaker-pi-emulator-1       | [DEPEND] Dependency failed for Serial Getty on ttyAMA0.
pibaker-pi-emulator-1       | [ TIME ] Timed out waiting for device /dev/serial1.
pibaker-pi-emulator-1       | [DEPEND] Dependency failed for Conf…ooth Modems connected by UART.
pibaker-pi-emulator-1       | [ TIME ] Timed out waiting for device /dev/mmcblk0p1.
pibaker-pi-emulator-1       | [DEPEND] Dependency failed for /boot.
pibaker-pi-emulator-1       | [DEPEND] Dependency failed for Local File Systems.
pibaker-pi-emulator-1       | [DEPEND] Dependency failed for File…ystem Check on /dev/mmcblk0p1.
pibaker-pi-emulator-1       |          Starting Preprocess NFS configuration...
pibaker-pi-emulator-1       |          Starting Set console font and keymap...
pibaker-pi-emulator-1       | [  OK  ] Stopped Forward Password R…uests to Wall Directory Watch.
pibaker-pi-emulator-1       | [  OK  ] Stopped Dispatch Password …ts to Console Directory Watch.
pibaker-pi-emulator-1       | [  OK  ] Reached target Timers.
pibaker-pi-emulator-1       | [  OK  ] Closed Syslog Socket.
pibaker-pi-emulator-1       | [  OK  ] Started Emergency Shell.
pibaker-pi-emulator-1       | [  OK  ] Reached target Emergency Mode.
pibaker-pi-emulator-1       | [  OK  ] Reached target Sockets.
pibaker-pi-emulator-1       | [  OK  ] Reached target Login Prompts.
pibaker-pi-emulator-1       | [  OK  ] Started Remount Root and Kernel File Systems.
pibaker-pi-emulator-1       | [  OK  ] Started Preprocess NFS configuration.
pibaker-pi-emulator-1       | [  OK  ] Started Set console font and keymap.
pibaker-pi-emulator-1       | You are in emergency mode. After logging in, type "journalctl -xb" to view
pibaker-pi-emulator-1       | system logs, "systemctl reboot" to reboot, "systemctl default" or "exit"
pibaker-pi-emulator-1       | to boot into default mode.
pibaker-pi-emulator-1       |
pibaker-pi-emulator-1       | Cannot open access to console, the root account is locked.
pibaker-pi-emulator-1       | See sulogin(8) man page for more details.
pibaker-pi-emulator-1       |
pibaker-pi-emulator-1       | Press Enter to continue.
AndreCox commented 2 years ago

Looking at your logs it appears that the raspberry pi emulator isn't fast enough to start up without it thinking something is wrong and timing out. I could probably fix this by making a custom raspberry pi starting image with safety features turned off.

BoxingOctopus commented 2 years ago

Okay, so I think this may be a compatibility issue between Docker Desktop for Mac (my original attempt was on an M1 Mac Mini) and Pi-CI. I spun up an Ubuntu VM running Docker and it seems to be working now.

AndreCox commented 1 year ago

Ok thanks, for this I will add a note to the documentation about this limitation. I will close this issue now but will revisit it if there is anything that I can do to modify the core code to work.