EasyEngine / EasyEngine/easyengine

The docker install doesn't roll back after cancelled install

Aperta
#1,400 4 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
PHP
Stelle
2.2k
Fork
424
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

This is related to this thread:
https://community.easyengine.io/t/brand-new-ec2-instance-fails-installing-v4/12372

I thought there's a random problem but I replicated it and finally can report a bug.

Here's the use-case. When you copy and paste the command from the website it contains end of the line character and submits the command, which is user error but I'd say quite common one. So try this:

1) Create a brand new instance
2) Copy and paste the download comand from EE website:
`wget -qO ee rt.cx/ee4 && sudo bash ee
`
3) Copy and paste website creation command from EE homepage:
`sudo ee site create example.com --type=wp
`

Now at this stage, it will install example.com but you don't want that URL because you wanted to change URL but the end of the line at the end commits the command, so you quickly press CTRL+C and change the URL to your own one. However, from now on EE is broken and can't be used unless uninstalled completely because docker hasn't rolled back after ctrl+c.

From then on you get this:
`ubuntu@ip-172-31-11-87:/opt/easyengine$ sudo ee site create website.com --type=wp
Error: There was some error in starting services_global-nginx-proxy_1 container. Please check logs.
`
And the logs:
```[03-03-2019 20:26:12] ee.INFO: ::::::::::::::::::::::::ee invoked::::::::::::::::::::::::
[03-03-2019 20:26:12] ee.DEBUG: -----------------------
[03-03-2019 20:26:12] ee.DEBUG: COMMAND: docker ps > /dev/null
[03-03-2019 20:26:12] ee.DEBUG: RETURN CODE: 0
[03-03-2019 20:26:12] ee.DEBUG: -----------------------
[03-03-2019 20:26:12] ee.DEBUG: -----------------------
[03-03-2019 20:26:12] ee.DEBUG: COMMAND: command -v docker-compose > /dev/null
[03-03-2019 20:26:12] ee.DEBUG: RETURN CODE: 0
[03-03-2019 20:26:12] ee.DEBUG: -----------------------
[03-03-2019 20:26:12] ee.DEBUG: Using default global config: /opt/easyengine/config/config.yml
[03-03-2019 20:26:12] ee.DEBUG: No project config found
[03-03-2019 20:26:12] ee.DEBUG: argv: /usr/local/bin/ee site create website.com --type=wp
[03-03-2019 20:26:12] ee.DEBUG: Running command: site
[03-03-2019 20:26:12] ee.DEBUG: COMMAND: which docker
[03-03-2019 20:26:12] ee.DEBUG: RETURN CODE: 0
[03-03-2019 20:26:12] ee.DEBUG: -----------------------
[03-03-2019 20:26:12] ee.DEBUG: COMMAND: docker inspect -f '{{.State.Running}}' services_global-nginx-proxy_1
[03-03-2019 20:26:13] ee.DEBUG: STDOUT:
[03-03-2019 20:26:13] ee.DEBUG: STDERR: Error: No such object: services_global-nginx-proxy_1
[03-03-2019 20:26:13] ee.DEBUG: RETURN CODE: 1
[03-03-2019 20:26:13] ee.DEBUG: -----------------------
[03-03-2019 20:26:13] ee.DEBUG: -----------------------
[03-03-2019 20:26:13] ee.DEBUG: COMMAND: docker network inspect ee-global-backend-network
[03-03-2019 20:26:13] ee.DEBUG: STDOUT: [ { "Name": "ee-global-backend-network", "Id": "8d5d7e1b671d50889aa4a3dffe11118587d984bea3aeb89aced5035ca9d043eb", "Created": "2019-03-03T19:57:49.457591081Z", "Scope": "local", "Driver": "bridge", "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": {}, "Config": [ { "Subnet": "172.18.0.0/16", "Gateway": "172.18.0.1" } ] }, "Internal": false, "Attachable": false, "Ingress": false, "ConfigFrom": { "Network": "" }, "ConfigOnly": false, "Containers": {}, "Options": {}, "Labels": { "org.label-schema.vendor": "EasyEngine" } } ]
[03-03-2019 20:26:13] ee.DEBUG: RETURN CODE: 0
[03-03-2019 20:26:13] ee.DEBUG: -----------------------
[03-03-2019 20:26:13] ee.DEBUG: -----------------------
[03-03-2019 20:26:13] ee.DEBUG: COMMAND: docker network inspect ee-global-frontend-network
[03-03-2019 20:26:13] ee.DEBUG: STDOUT: [ { "Name": "ee-global-frontend-network", "Id": "06619a56d91995c4b10c0542db5a32dd67fecf3ababd3874dfb95cec54f4d7cb", "Created": "2019-03-03T19:57:49.577470065Z", "Scope": "local", "Driver": "bridge", "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": {}, "Config": [ { "Subnet": "172.19.0.0/16", "Gateway": "172.19.0.1" } ] }, "Internal": false, "Attachable": false, "Ingress": false, "ConfigFrom": { "Network": "" }, "ConfigOnly": false, "Containers": {}, "Options": {}, "Labels": { "org.label-schema.vendor": "EasyEngine" } } ]
[03-03-2019 20:26:13] ee.DEBUG: RETURN CODE: 0
[03-03-2019 20:26:13] ee.DEBUG: -----------------------
[03-03-2019 20:26:13] ee.DEBUG: -----------------------
[03-03-2019 20:26:13] ee.DEBUG: COMMAND: docker-compose up -d global-nginx-proxy
[03-03-2019 20:26:13] ee.DEBUG: STDERR: Volume global-nginx-proxy_vhostd declared as external, but could not be found. Please create the volume manually using `docker volume create --name=global-nginx-proxy_vhostd` and try again.
[03-03-2019 20:26:13] ee.DEBUG: RETURN CODE: 1
[03-03-2019 20:26:13] ee.DEBUG: -----------------------
[03-03-2019 20:26:13] ee.ERROR: There was some error in starting services_global-nginx-proxy_1 container. Please check logs.
```
The quick solution is to kill the instance and start again.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia riproducendo il comando di installazione del sito web seguito da `sudo ee site create example.com --type=wp`, quindi annullalo con Ctrl+C e ispeziona lo stato di Docker e il comportamento di pulizia registrato. Il lavoro è completato quando l’annullamento dell’installazione lascia Docker utilizzabile, così che un successivo `ee site create` abbia successo senza ricreare l’istanza; non vengono indicati file o test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
docker, docker-compose, php
Ambito
cli, devops, infrastructure
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.