Skip to content

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

@sirredbeard

Description

@sirredbeard

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions