Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way of continuing/retrying when docker installation fails #5

Open
michiels opened this issue Aug 29, 2016 · 3 comments
Open

No way of continuing/retrying when docker installation fails #5

michiels opened this issue Aug 29, 2016 · 3 comments

Comments

@michiels
Copy link
Member

I just came across the situation that apparently installing Docker failed from the custom source because of a timeout. In that case there is no clear path to retrying or continuing the installation:

root@ubuntu-1gb-ams2-01:~# source /root/.bashrc && intercity-server install
What is the hostname? (e.g.: intercity.example.com)
michiel.intercity.io
Hostname is set to michiel.intercity.io
1. yes
2. no
Do you want to use LetsEncrypt for SSL?
IMPORTANT: The hostname should be public and reachable for the LetsEncrypt servers.
The SSL certificate can't be generated if LetsEncrypt can't reach the domain!
no
---- Installing docker
2016-08-29 15:46:32 URL:https://get.docker.com/ [15330/15330] -> "-" [1]
modprobe: FATAL: Module aufs not found in directory /lib/modules/4.4.0-34-generic
+ sh -c sleep 3; apt-get update
+ sh -c sleep 3; apt-get install -y -q linux-image-extra-4.4.0-34-generic linux-image-extra-virtual
+ sh -c apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
gpg: requesting key 2C52609D from hkp server ha.pool.sks-keyservers.net
gpg: key 2C52609D: public key "Docker Release Tool (releasedocker) <docker@docker.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
+ break
+ sh -c apt-key adv -k 58118E89F3A912897C070ADBF76221572C52609D >/dev/null
+ sh -c mkdir -p /etc/apt/sources.list.d
+ dpkg --print-architecture
+ sh -c echo deb \[arch=amd64\] https://apt.dockerproject.org/repo ubuntu-xenial main > /etc/apt/sources.list.d/docker.list
+ sh -c sleep 3; apt-get update; apt-get install -y -q docker-engine
W: Failed to fetch https://apt.dockerproject.org/repo/dists/ubuntu-xenial/InRelease  Connection timed out after 120001 milliseconds
W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Unable to locate package docker-engine
---- Downloading Intercity
Cloning into '/var/intercity'...
remote: Counting objects: 267, done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 267 (delta 10), reused 0 (delta 0), pack-reused 224
Receiving objects: 100% (267/267), 54.27 KiB | 0 bytes/s, done.
Resolving deltas: 100% (136/136), done.
Checking connectivity... done.
---- Configuring Intercity
---- Building Intercity
/var/intercity/launcher: line 132: --version: command not found
---- Starting Intercity
/var/intercity/launcher: line 132: --version: command not found
---- Done

One solution would be to recognize that Docker is not installed and let the user re-run apt-get update && apt-get install -q -y docker-engine.

Another option would be to be able to "force rerun" the installation with for example intercity-server install --force option.

@jvanbaarsen
Copy link
Contributor

@michiels Let's go with the option to check if docker is installed.

@michiels
Copy link
Member Author

@jvanbaarsen Sounds good. a re-run of install will also not work, probably because there's only checking for /var/intercity to exist or not. I am now running update, which does work. Is that basically the same?

@jvanbaarsen
Copy link
Contributor

@michiels Yeah sorta. Kinda depends if the bootstrap part worked. If that did not run, update will not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants