YunoHost / package_check

Shell script which check package actions: install, remove, upgrade, backup, restore…
GNU General Public License v3.0
21 stars 26 forks source link

LXC build fails: could not resolve http.debian.net #20

Closed dehuct closed 7 years ago

dehuct commented 7 years ago

Hi,

I was trying to follow the instructions here to test an existing yunohost app an a freshly installed internetcube:

https://github.com/YunoHost/package_check#deploying-test-script

Error Description

When I try to build the LXC I get an "could not resolve http.debian.net" error:

./package_check/sub_scripts/lxc_build.sh 
[sudo] password for user: 
> Update et install lxc lxctl
> Suppression du conteneur existant.
> Création d'une machine debian jessie 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
> Démarrage de la machine
> Update et install aptitude sudo git
Err http://http.debian.net jessie InRelease

Err http://http.debian.net jessie Release.gpg
  Could not resolve 'http.debian.net'
Reading package lists... Done
W: Failed to fetch http://http.debian.net/debian/dists/jessie/InRelease  

W: Failed to fetch http://http.debian.net/debian/dists/jessie/Release.gpg  Could not resolve 'http.debian.net'

W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree... Done
openssh-server is already the newest version.
The following extra packages will be installed:
  aptitude-common aptitude-doc-en ca-certificates git-man less libboost-iostreams1.55.0 libclass-accessor-perl libcurl3-gnutls libcwidget3 liberror-perl
  libexpat1 libffi6 libgmp10 libgnutls-deb0-28 libhogweed2 libidn11 libio-string-perl libldap-2.4-2 libnettle4 libp11-kit0 libparse-debianchangelog-perl
  libpopt0 librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libsigc++-2.0-0c2a libsqlite3-0 libssh2-1 libsub-name-perl libtasn1-6 libtimedate-perl
  libxapian22 openssl patch rsync
Suggested packages:
  tasksel debtags apt-xapian-index gettext-base git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs
  git-mediawiki git-svn libcwidget-dev gnutls-bin libhtml-parser-perl libhtml-template-perl libxml-simple-perl libsasl2-modules-otp libsasl2-modules-ldap
  libsasl2-modules-sql libsasl2-modules-gssapi-mit libsasl2-modules-gssapi-heimdal xapian-tools ed diffutils-doc
  libtasn1-6 libtimedate-perl libxapian22 openssl patch rsync ssh sudo
0 upgraded, 40 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.1 MB of archives.
After this operation, 45.1 MB of additional disk space will be used.
Err http://http.debian.net/debian/ jessie/main libboost-iostreams1.55.0 armhf 1.55.0+dfsg-3
  Could not resolve 'http.debian.net'

...
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
> Installation des paquets standard et ssh-server
lxc_container: No such file or directory - failed to exec 'aptitude'
> 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 found: line 1 type RSA
# Host 10.1.4.2 found: line 2 type ECDSA
# Host 10.1.4.2 found: line 3 type ED25519
/home/ydev/.ssh/known_hosts updated.
Original contents retained as /home/ydev/.ssh/known_hosts.old
# 10.1.4.2 SSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u3
# 10.1.4.2 SSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u3
# 10.1.4.2 SSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u3
Connection to 10.1.4.2 closed.
> Installation de Yunohost...
sh: 1: cd: can't cd to /tmp/install_script
sh: 1: sudo: not found
Connection to 10.1.4.2 closed.
> Post install Yunohost
sh: 1: sudo: not found
Connection to 10.1.4.2 closed.
> Ajout du sous domaine de test
sh: 1: sudo: not found
Connection to 10.1.4.2 closed.
> Ajout de l'utilisateur de test
sh: 1: sudo: not found
Connection to 10.1.4.2 closed.

> Vérification de l'état de Yunohost
sh: 1: sudo: not found
Connection to 10.1.4.2 closed.
> Arrêt de la machine virtualisée
> Suppression des règles de parefeu
> Création d'un snapshot

Environement

maniackcrudelis commented 7 years ago

Something weird happened with the resolv.conf of the container. Set the option dnsforce to 1 in the config file and rebuild the container fix this error.