erikarvstedt / extra-container

Run declarative NixOS containers without full system rebuilds

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

container is borked; can't seem to get it back up?

niftynei opened this issue · comments

$ doas nix run . -- create --update-changed                                                                                                                                       [14/213]                                                                     
warning: Git tree '/etc/nixos' is dirty
                                                                                                      
Installing containers:                                                                                
base58                                                                                                
                                                   
$ doas nixos-container root-login base58                  
Could not get path to machine: No machine 'base58' known
unable to get container's main PID 

Doing some investigation:

$ systemctl status container@base58
○ container@base58.service - Container 'base58'
     Loaded: loaded (/etc/systemd-mutable/system/container@base58.service; static)
     Active: inactive (dead)

$ doas systemctl start container@base58
Job for container@base58.service failed because a timeout was exceeded.
See "systemctl status container@base58.service" and "journalctl -xeu container@base58.service" for details.

Edited: oh wait, looks like it's an issue with CLN startup failing?

Nov 26 21:32:05 citrine container base58[929995]: [  OK  ] Reached target Preparation for Network.
Nov 26 21:32:05 citrine container base58[929995]: [  OK  ] Reached target All Network Interfaces (deprecated).
Nov 26 21:32:05 citrine container base58[929995]:          Starting Networking Setup...
Nov 26 21:32:05 citrine container base58[929995]: [  OK  ] Started D-Bus System Message Bus.
Nov 26 21:32:05 citrine container base58[929995]: [  OK  ] Started User Login Management.
Nov 26 21:32:05 citrine container base58[929995]: [  OK  ] Finished Networking Setup.
Nov 26 21:32:05 citrine container base58[929995]:          Starting Extra networking commands....
Nov 26 21:32:05 citrine container base58[929995]: [  OK  ] Finished Extra networking commands..
Nov 26 21:32:05 citrine container base58[929995]: [  OK  ] Reached target Network.
Nov 26 21:32:05 citrine container base58[929995]: [  OK  ] Reached target Network is Online.
Nov 26 21:32:05 citrine container base58[929995]:          Starting bitcoind.service...
Nov 26 21:32:05 citrine container base58[929995]:          Starting Permit User Sessions...
Nov 26 21:32:05 citrine container base58[929995]: [  OK  ] Finished Permit User Sessions.
Nov 26 21:32:05 citrine container base58[929995]: [  OK  ] Started Console Getty.
Nov 26 21:32:05 citrine container base58[929995]: [  OK  ] Reached target Login Prompts.
Nov 26 21:32:10 citrine container base58[929995]: [  OK  ] Started bitcoind.service.
Nov 26 21:32:10 citrine container base58[929995]:          Starting clightning.service...
Nov 26 21:32:11 citrine container base58[929995]: 
Nov 26 21:32:11 citrine container base58[929995]: 
Nov 26 21:32:11 citrine container base58[929995]: <<< Welcome to NixOS 22.11pre-git (x86_64) - console >>>
Nov 26 21:32:11 citrine container base58[929995]: 
Nov 26 21:32:11 citrine container base58[929995]: 

Ok, maybe this is more a "how do i debug a failing service" 😆

Edit 2: fixed failing service and it works correctly now.

Better error/failure message on update-changed failure would help a lot!