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

Multipass cannot connect to /run/multipass_socket in GitHub Actions ubuntu-latest VM #1075

Closed
sirredbeard opened this issue Sep 19, 2019 · 6 comments
Labels

Comments

@sirredbeard
Copy link

sirredbeard commented Sep 19, 2019

I am attempting to automate the building and publishing of a snap to the Snap store in the ubuntu-latest VM in GitHub Actions.

Snapcraft relies on multipass for building snaps. Invoking multipass fails on the ubuntu-latest VM on GitHub Actions with the following errors:

$ sudo multipass list
list failed: cannot connect to the multipass socket
Please ensure multipassd is running and '/run/multipass_socket' is accessible
$ snapcraft
Launching a VM.
launch failed: cannot connect to the multipass socket
Please ensure multipassd is running and '/run/multipass_socket' is accessible

I have attempted the following remediation:

  • Adding sudo chown root:root / to my workflow
  • Ensuring my VM user is in sudo group with sudo usermod -aG sudo $USER
  • Manually starting multipassd with sudo snap start multipass before invoked
  • Ensuring permissions are set properly the socket sudo chown $USER:$USER /run/multipass_socket but this fails without a sudo touch /run/multipass_socket because it can never find /run/multipass_socket

To duplicate:

  • Create a new GitHub repository on an account with GitHub Actions enabled.
  • Create a new workflow.
  • Copy and paste GitHub Actions workflow from here.
  • Run workflow.

Use case:

Ubuntu is the primary Linux distro on GitHub actions and comes with snapd pre-installed. Snaps are an excellent way to handle dependencies when building with GitHub Actions. It would be useful to be able to build snaps on the same platform. GitHub Actions support would be particularly useful for pushing new releases from GitHub to the Snap store.

Annotation 2019-09-19 101140

@townsend2010
Copy link
Contributor

Hi @sirredbeard,

It sounds to me multipassd is failing to start for some reason. Is there any way to look at journalctl and search through the errors to find why multipassd is failing? The quickest way would be to try to start multipass and then go to the end of the journal and look at the errors.

@sirredbeard
Copy link
Author

The solution to this problem is to use the Snapcraft Docker container instead of the raw Ubuntu VM on GitHub actions. Snapcraft, multipass, and everything work fine in that managed container.

@townsend2010
Copy link
Contributor

@sirredbeard,

Thanks for letting us know that you found a solution. We'll keep it in mind if someone else runs up against this issue in the future.

@LyzardKing
Copy link

sorry for posting in a closed issue, but what if the docker container is not good enough?
I need to build a core18 snap, but the docker image will not work properly:
The following snaps are required but not installed as snapcraft is running inside docker or podman container: core18.

@Saviq
Copy link
Collaborator

Saviq commented Oct 3, 2019

@LyzardKing that doesn't seem like a Multipass issue?

@TravisEz13
Copy link

It would be nice if this someone would work with the Azure Dev Ops team to get this working.

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

No branches or pull requests

5 participants