cloudviz / agentless-system-crawler

A tool to crawl systems like crawlers for the web
Apache License 2.0
117 stars 44 forks source link

Package `docker-engine` install fails for Dockefile.test #379

Open canturkisci opened 6 years ago

canturkisci commented 6 years ago

Description

During package installation, docker-engine installation fails.

How to Reproduce

Log Output

root@da0c782d74ed:/# apt-get update &&     echo "y" | apt-get install python     python-dev     python-pip     build-essential     docker-engine     dpkg     dpkg-dev     qemu-kvm   && pip install --upgrade pip   && pip install mock
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package docker-engine is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'docker-engine' has no installation candidate

I am not sure if this matters. I suspect some of the tests might fail because of this.

sahilsuneja1 commented 6 years ago

Could not recreate this, docker engine installation works fine. I'm assuming you performed the earlier steps:

apt-get update && echo "y" | apt-get install apt-transport-https

apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" > /etc/apt/sources.list.d/docker.list
canturkisci commented 6 years ago

Hmm.. I dont think so. All i did was:

sudo apt  install docker.io
sudo service docker start

sudo make test

Can you please point me to the above instructions and i can redo. I bet this is it, and this might also help with the 12 failed tests..

sahilsuneja1 commented 6 years ago

The steps are in Dockerfile.test and .travis.yml. In the past I've faced issues when directly installing the doker.io package from apt. In all our docs and setups, we install the docker-engine or the docker-ce package, which is what docker recommends: https://docs.docker.com/install/linux/docker-ce/ubuntu/#prerequisites

canturkisci commented 6 years ago

I need more clarity. If they are in Dockerfile.test, make test should take care of these. Travis.yml i dont look or touch as that is for CI.

sahilsuneja1 commented 6 years ago

With the following edit, make test will take care of these, but tests should still fail coz of docker-in-docker: https://github.com/cloudviz/agentless-system-crawler/issues/380#issuecomment-434391444

-- && pip install --upgrade pip
++ && pip install -I pip==9.0.1
canturkisci commented 6 years ago

@sahilsuneja1 interesting... I did your change in Dockerfile.test:

&& pip install -I pip==9.0.1 \

And all tests passed now with sudo make test:

344 passed in 760.46 seconds

I am running in an 18.04 VM.

sahilsuneja1 commented 6 years ago

Woah, I'm really surprised! make test does not work for me. Can you please copy paste your docker info from your VM and agentless-system-crawler-test container? I think the docker in your container is using the vfs storage driver, while for me it defaults to aufs.