lando / platformsh

The Official Platform.sh Lando Plugin
https://docs.lando.dev/platformsh
GNU General Public License v3.0
6 stars 4 forks source link

Lando container broken after running tooling command without starting lando first #59

Open aimfeld opened 3 years ago

aimfeld commented 3 years ago

Working with lando v3.1.4, docker 19.03.12, and the platformsh recipe on Linux Mint. I noticed that after running a custom lando tooling command without a running lando container, the container is unusable afterwards and needs to be rebuilt with lando rebuild.

We e.g. have a lando tooling task to run node commands. Inside .lando.yml:

tooling:
  node:
    service: surveylab
    description: "Run node tasks."

After running e.g. the following commands (shutdown containers and then show node version v14.15.4), ownerships also change from web:web to app:app, rendering the container unusable:

lando poweroff
lando node -v

The problem might be that lando is killing the container after running the command (which doesn't happen if the container was already running before the lando command: image

When running lando start afterwards (which takes a long time), the containers are not working anymore: image

rabauss commented 3 years ago

Yes, I can confirm that with the lamp recipe as well. Calling lando tooling while not started there should be a validation or the containers should not be killed after the tooling!

pirog commented 3 years ago

In order to ensure that tooling commands run as close to their "native" speed as possible we try to handoff to docker immediately. adding something as even as simple as validation will significantly increase this handoff time and cause ALL tooling commands to be delayed.

@rabauss i think your issue is different then the one by @aimfeld. im guessing in the latter case the problem is specific to platform.sh because of how we do user mapping there. ill see if i can replicate.