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

lando rebuild fails with The container does not exist #1352

Closed
nicrodgers opened this Issue Jan 15, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@nicrodgers
Copy link

nicrodgers commented Jan 15, 2019

Tell us about your setup
What is your lando version and operating system?
v3.0.0-beta.47 on MacOS X

Tell us about your .lando.yml

Paste in the contents of your .lando.yml this is SUPER HELPFUL for us.

name: govwalesd8
recipe: drupal8
proxy:
  appserver:
    - govwalesd8.lndo.site
  solr:
    - admin.solr.lndo.site:8983
  btc:
    - admin.btc.lndo.site:8983
  mailhog:
    - mail.govwalesd8.lndo.site
config:
  webroot: web
  php: '7.1'
  database: mysql:5.5
  xdebug: true
  drush: path:/app/vendor/bin/drush
  conf:
    php: lando-config/php.ini
services:
  solr:
    type: solr:6.6
    core: govwalesd8
    config:
      conf: solrconf
  btc:
      type: solr:6.6
      core: terms
      config:
        conf: btcconf
  btcdb:
    type: postgres:10.1
    creds:
      user: postgres
      password: password
      database: btc
  cache:
    mem: 128
    type: memcached:1.4
  mailhog:
    type: mailhog
    hogfrom:
    - appserver
tooling:
  behat:
    service: appserver
    cmd:
    - "/app/vendor/bin/behat"
    - "--config=/app/tests/behat/behat.yml"
events:
  post-db-import:
    - appserver: cd /app/web; /app/vendor/bin/drush cr
  post-rebuild:
    - appserver: chmod 600 /app/key/private.key
    - appserver: chmod 600 /app/key/public.key

Tell us about the command you were running
lando rebuild always fails for us:

Nics-iMac-2:web nic$ lando rebuild
? Are you sure you want to rebuild? Yes
Killing govwalesd8_appserver_1 ... done
Killing govwalesd8_mailhog_1   ... done
Killing govwalesd8_solr_1      ... done
Killing govwalesd8_database_1  ... done
Killing govwalesd8_cache_1     ... done
Removing govwalesd8_appserver_1 ... done
Removing govwalesd8_mailhog_1   ... done
Removing govwalesd8_solr_1      ... done
Removing govwalesd8_database_1  ... done
Removing govwalesd8_cache_1     ... done
Pulling appserver ... done
Pulling database  ... done
Pulling solr      ... done
Pulling btc       ... done
Pulling btcdb     ... done
Pulling cache     ... done
Pulling mailhog   ... done
appserver uses an image, skipping
database uses an image, skipping
solr uses an image, skipping
btc uses an image, skipping
btcdb uses an image, skipping
cache uses an image, skipping
mailhog uses an image, skipping
error: Error: The container govwalesd8_appserver_1 does not exist!
Nics-iMac-2:web nic$ 

If I then do lando start, it effectively does the rebuild because it removed the images in the first part of the rebuild command before it failed, but it doesn't trigger the post-rebuild event, so we'd like to get lando rebuild working fully.

Rerun the command that produced your error in verbose mode. Note that verbose mode is run like this lando command -- -vvv. Paste in the error and the ~100 lines that proceeded it.

Example:

appserver uses an image, skipping
database uses an image, skipping
solr uses an image, skipping
btc uses an image, skipping
btcdb uses an image, skipping
cache uses an image, skipping
mailhog uses an image, skipping
verbose: Spawn exited with code: 0
verbose: Emitting event post-engine-build
debug: Event post-engine-build has 0 listeners
verbose: Emitting event post-rebuild
debug: Event post-rebuild has 1 listeners
debug: Trying to retrieve from file cache with key engineup
debug: File cache miss with key engineup
debug: About to run 0=/Applications/Docker.app/Contents/Resources/bin/docker, 1=info
verbose: Running exec /Applications/Docker.app/Contents/Resources/bin/docker,info
debug: With env TERM=xterm-256color, SHELL=/bin/bash, TMPDIR=/var/folders/ly/4r5_6jhx1t37ybtnw4krqck00000gn/T/, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.qKWGFu25sT/Render, __INTELLIJ_COMMAND_HISTFILE__=/Users/nic/Library/Preferences/PhpStorm2018.3/terminal/history/history-, USER=nic, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.320iuadFaL/Listeners, __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x2, PATH=/opt/local/bin:/opt/local/sbin:/Users/nic/.composer/vendor/bin:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS:/www/govwalesd8/node_modules/.bin:/Applications/DevDesktopWG201702/tools, TERMINAL_EMULATOR=JetBrains-JediTerm, PWD=/Volumes/www/govwalesd8/web, PROJECT_DIR=/www/govwalesd8, XPC_FLAGS=0x0, XPC_SERVICE_NAME=0, SHLVL=1, HOME=/Users/nic, LOGNAME=nic, LC_CTYPE=en_GB.UTF-8, DISPLAY=/private/tmp/com.apple.launchd.TE8Wohn70v/org.macosforge.xquartz:0, _=/usr/local/bin/lando, LANDO_ENGINE_CONF=/Users/nic/.lando, LANDO_ENGINE_ID=501, LANDO_ENGINE_GID=20, LANDO_ENGINE_HOME=/Users/nic, LANDO_ENGINE_IP=127.0.0.1, LANDO_ENGINE_REMOTE_IP=host.docker.internal, LANDO_ENGINE_SCRIPTS_DIR=/Users/nic/.lando/engine/scripts, LANDO=ON, LANDO_CONFIG_DIR=$LANDO_ENGINE_CONF, LANDO_DOMAIN=lndo.site, LANDO_APP_NAME=govwalesd8, LANDO_APP_ROOT=/Volumes/www/govwalesd8, LANDO_APP_ROOT_BIND=/Volumes/www/govwalesd8, LANDO_HOST_OS=darwin, LANDO_HOST_UID=501, LANDO_HOST_GID=20, LANDO_HOST_IP=host.docker.internal, LANDO_WEBROOT_USER=www-data, LANDO_WEBROOT_GROUP=www-data, LANDO_WEBROOT_UID=33, LANDO_WEBROOT_GID=33, PKG_EXECPATH=/usr/local/bin/lando
debug: Engine is up.
debug: Cached true with key engineup for {"persist":false,"ttl":5}
verbose: Emitting event pre-engine-run
debug: Event pre-engine-run has 0 listeners
error: Error: Error: The container govwalesd8_appserver_1 does not exist!
    at /snapshot/lando/build/cli/lib/promise.js:0:0
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
    at rec (/snapshot/lando/build/cli/lib/promise.js:0:0)
    at /snapshot/lando/build/cli/lib/promise.js:0:0
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)
From previous event:
    at /snapshot/lando/build/cli/lib/promise.js:0:0
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
debug: Logging metrics data {"devMode":false,"nodeVersion":"v8.9.0","mode":"cli","os":{"type":"Darwin","platform":"darwin","release":"16.7.0","arch":"x64"},"product":"lando","version":"3.0.0-beta.47","app":"10f61df1bfa5fd4835eaa5b159020fd36e510ad1","type":"drupal8","services":["php:7.1","mysql:5.5","solr:6.6","solr:6.6","postgres:10.1","memcached:1.4","mailhog"],"action":"error","created":"2019-01-15T11:48:40.590Z","message":"Error: The container govwalesd8_appserver_1 does not exist!","stack":"Error: Error: The container govwalesd8_appserver_1 does not exist!\n    at /snapshot/lando/build/cli/lib/promise.js:0:0\n    at runCallback (timers.js:789:20)\n    at tryOnImmediate (timers.js:751:5)\n    at processImmediate [as _immediateCallback] (timers.js:722:5)\nFrom previous event:\n    at rec (/snapshot/lando/build/cli/lib/promise.js:0:0)\n    at /snapshot/lando/build/cli/lib/promise.js:0:0\n    at ontimeout (timers.js:475:11)\n    at tryOnTimeout (timers.js:310:5)\n    at Timer.listOnTimeout (timers.js:270:5)\nFrom previous event:\n    at /snapshot/lando/build/cli/lib/promise.js:0:0\n    at runCallback (timers.js:789:20)\n    at tryOnImmediate (timers.js:751:5)\n    at processImmediate [as _immediateCallback] (timers.js:722:5)"}

@pirog pirog added this to the 3.0.0-rc.2 milestone Jan 28, 2019

@pirog pirog self-assigned this Jan 28, 2019

@pirog

This comment has been minimized.

Copy link
Member

pirog commented Jan 28, 2019

@nicrodgers this is the "expected behavior" (eg the rebuild event happens before the start one) but this seems like a bad order so going to change this so the rebuild happens after the start event.

this should ensure containers are up and ready to go

pirog added a commit that referenced this issue Jan 29, 2019

@pirog

This comment has been minimized.

Copy link
Member

pirog commented Jan 29, 2019

ok this will be fixed in RC2

@pirog pirog closed this Jan 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment