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

SSH ControlMaster breaks group update in provision section #455

Open
dictcp opened this issue Dec 6, 2021 · 2 comments
Open

SSH ControlMaster breaks group update in provision section #455

dictcp opened this issue Dec 6, 2021 · 2 comments

Comments

@dictcp
Copy link

dictcp commented Dec 6, 2021

For a lima-vm config similar to the following one

provision:
  - mode: system
    script: |
      #!/bin/bash
      set -eux -o pipefail
      command -v docker >/dev/null 2>&1 && exit 0
      export DEBIAN_FRONTEND=noninteractive
      curl -fsSL https://get.docker.com | sh
  - mode: user
    script: |
      #!/bin/bash
      set -eux -o pipefail
      sudo usermod -G docker -a $(whoami)

The usage in ssh ops -o ControlMaster=auto will leads the ssh connection is being re-used, which is created before the provision script is executed (where the user group is updated)

Expected behaviour: the group update via provision section is effective

Actual behaviour: the group update is effective, unless a new ssh connection is created, OR VM is rebooted.

@afbjorklund
Copy link
Member

afbjorklund commented Dec 8, 2021

This seemed historically to always happen, when using Ansible to install Docker (it uses python-over-ssh to install things)

@chancez
Copy link
Contributor

chancez commented May 18, 2022

@dictcp FYI you can chmod 777 /var/run/docker.sock as a work around. #528 (comment)

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

3 participants