So i tried to use it in a docker container. But it seems not to work. Maybe LXC isn’t useable in Docker?
I have a local proxmox server running. So i created a fresh debian buster LXC container.
Install doesn’t look good:
jens@ynh-package-check:~/package_check$ ./sub_scripts/lxc_build.sh
> Update et install lxc lxctl
> Install git, curl and lynx
> Création d'une machine debian buster minimaliste.
> Autoriser l'ip forwarding, pour router vers la machine virtuelle.
> Ajoute un brige réseau pour la machine virtualisée
> Active le bridge réseau
> Configuration réseau du conteneur
./sub_scripts/lxc_build.sh: line 119: lsb_release: command not found
./sub_scripts/lxc_build.sh: line 119: [: !=: unary operator expected
> Configuration réseau de la machine virtualisée
> Configure le parefeu
> Vérification du contenu du resolv.conf
nameserver 192.168.6.1
./sub_scripts/lxc_build.sh: line 145: lsb_release: command not found
./sub_scripts/lxc_build.sh: line 145: [: !=: unary operator expected
> Démarrage de la machine
> Test la configuration dns
>>> The dns isn't working (Current dns = 192.168.6.1)
>>>Force to use the default dns
>>> Try to use the dns address
>>> The dns isn't working (Current dns = )
>>>Force to use the dns from the config file
nameserver 192.168.6.1
>>> Try to use the dns address 192.168.6.1
>>> The dns isn't working (Current dns = 192.168.6.1)
>>>The dns is still broken, use FDN dns
nameserver 80.67.169.12
>>> Try to use the dns address 192.168.6.1
> Update et install aptitude sudo git
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
> Installation des paquets standard et ssh-server
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
> Renseigne /etc/hosts sur l'invité
> Ajoute l'user pchecker
> Autorise pchecker à utiliser sudo sans mot de passe
> Mise en place de la connexion ssh vers l'invité.
write (10.1.4.2): No route to host
write (10.1.4.2): No route to host
write (10.1.4.2): No route to host
ssh: connect to host 10.1.4.2 port 22: No route to host
ssh: connect to host 10.1.4.2 port 22: No route to host
> Installation de Yunohost...
ssh: connect to host 10.1.4.2 port 22: No route to host
> Disable apt-daily to prevent it from messing with apt/dpkg lock
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
> Post install Yunohost
ssh: connect to host 10.1.4.2 port 22: No route to host
ssh: connect to host 10.1.4.2 port 22: No route to host
ssh: connect to host 10.1.4.2 port 22: No route to host
> Ajout du sous domaine de test
ssh: connect to host 10.1.4.2 port 22: No route to host
> Ajout de l'utilisateur de test
ssh: connect to host 10.1.4.2 port 22: No route to host
> Vérification de l'état de Yunohost
ssh: connect to host 10.1.4.2 port 22: No route to host
> Arrêt de la machine virtualisée
> Suppression des règles de parefeu
> Création d'un snapshot
Maybe LXC in LXC doesn’t work, too?
I will try a installation in a proxmox debian buster VM (QEMU/KVM not LXC)…
jens@ynh-package-check:~$ ./package_check/sub_scripts/lxc_build.sh
> Update et install lxc lxctl
> Install git, curl and lynx
> Suppression du conteneur existant.
lxc-destroy: pchecker_lxc: tools/lxc_destroy.c: main: 271 Destroyed container pchecker_lxc
> Création d'une machine debian buster minimaliste.
> Autoriser l'ip forwarding, pour router vers la machine virtuelle.
> Ajoute un brige réseau pour la machine virtualisée
> Active le bridge réseau
> Configuration réseau du conteneur
> Configuration réseau de la machine virtualisée
> Configure le parefeu
> Vérification du contenu du resolv.conf
nameserver 192.168.6.1
> Démarrage de la machine
> Test la configuration dns
>>> The dns isn't working (Current dns = 192.168.6.1)
>>>Force to use the default dns
>>> Try to use the dns address
>>> The dns isn't working (Current dns = )
>>>Force to use the dns from the config file
nameserver 192.168.6.1
>>> Try to use the dns address 192.168.6.1
>>> The dns isn't working (Current dns = 192.168.6.1)
>>>The dns is still broken, use FDN dns
nameserver 80.67.169.12
>>> Try to use the dns address 192.168.6.1
> Update et install aptitude sudo git
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
> Installation des paquets standard et ssh-server
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
> Renseigne /etc/hosts sur l'invité
> Ajoute l'user pchecker
> Autorise pchecker à utiliser sudo sans mot de passe
> Mise en place de la connexion ssh vers l'invité.
Host 10.1.4.2 not found in /home/jens/.ssh/known_hosts
write (10.1.4.2): No route to host
write (10.1.4.2): No route to host
write (10.1.4.2): No route to host
ssh: connect to host 10.1.4.2 port 22: No route to host
ssh: connect to host 10.1.4.2 port 22: No route to host
> Installation de Yunohost...
ssh: connect to host 10.1.4.2 port 22: No route to host
> Disable apt-daily to prevent it from messing with apt/dpkg lock
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
> Post install Yunohost
ssh: connect to host 10.1.4.2 port 22: No route to host
ssh: connect to host 10.1.4.2 port 22: No route to host
ssh: connect to host 10.1.4.2 port 22: No route to host
> Ajout du sous domaine de test
ssh: connect to host 10.1.4.2 port 22: No route to host
> Ajout de l'utilisateur de test
ssh: connect to host 10.1.4.2 port 22: No route to host
> Vérification de l'état de Yunohost
ssh: connect to host 10.1.4.2 port 22: No route to host
> Arrêt de la machine virtualisée
> Suppression des règles de parefeu
> Création d'un snapshot
lxc-attach: pchecker_lxc: attach.c: lxc_attach: 1095 Failed to get init pid
sounds like the container did not properly start … Would need to dig in to understand why …
Though I’m personally working since a few days on a big rework of the entire package_check scripts, and among other things will now be based on lxd instead of lxc, which imho is much less tedious to configure (c.f. the current scripts managing the lxc that need to handle the entire network configuration by hand and test if the DNS is working etc…)
Alternatively you could just come to the app packaging chat room and ask for an access to the dev CI where you’ll be able to submit jobs (you just need to provide us with an SSH key)
Though of course one should be able to selfhost package_check …
Both should work (we do run some of our app CI inside a LXC - which then will do LXC-in-LXC). When running the CI in a LXC, you need to make sure that nesting is enabled on the LXC tho