multipass icon indicating copy to clipboard operation
multipass copied to clipboard

multipass does not work in a managed github runner

Open leshikus opened this issue 1 year ago • 4 comments

Describe the bug A simplest scenario fails in a github managed runner in ubuntu-latest.

To Reproduce

sudo snap install multipass
sudo snap info --all

the following command shows there is no socket sudo ls -l /var/snap/multipass/common/multipass_socket

Expected behavior I expect to use multipass in CI workflows on Github instead of a docker. For that it should work. BTW, grep -r 'snap install' .github in this repository shows your CI does not check this. Well, at least one could get some descriptive error message instead of one about the socket.

Logs https://github.com/leshikus/multipass/actions/runs/7168917867/job/19518127038

leshikus avatar Dec 11 '23 14:12 leshikus

Hi @leshikus!

Thank you for trying Multipass on a Github hosted runner. A Github hosted runner is a virtual machine in and off itself and unfortunately, Github doesn't allow nested virtual machines. There are many, many issues opened against Github to allow this, but there isn't anything we can do for this.

townsend2010 avatar Dec 11 '23 14:12 townsend2010

Regarding the error message, multipassd simply cannot start in such an environment and so the client cannot connect to it. If you were able to dig into the actual logs, I believe you would see why it's not working.

townsend2010 avatar Dec 11 '23 14:12 townsend2010

Hi Christopher, thanks for a quick answer. Regarding the error message. Here is how recommended log looks like. It does not mention that there are issues with multipassd. Two last lines are added by restart, and there are no issues in the log.

+ journalctl --unit 'snap.multipass*'
Dec 11 14:20:56 fv-az840-726 systemd[1]: Started snap.multipass.hook.install-e8e7b700-3012-4f9b-b15d-7d64a904dfea.scope.
Dec 11 14:20:57 fv-az840-726 systemd[1]: snap.multipass.hook.install-e8e7b700-3012-4f9b-b15d-7d64a904dfea.scope: Deactivated successfully.
Dec 11 14:20:57 fv-az840-726 systemd[1]: Started Service for snap application multipass.multipassd.
Dec 11 14:20:57 fv-az840-726 systemd[1]: Started snap.multipass.hook.configure-d37d282f-476c-41aa-b7e9-f102f63ee046.scope.
Dec 11 14:20:57 fv-az840-726 systemd[1]: snap.multipass.hook.configure-d37d282f-476c-41aa-b7e9-f102f63ee046.scope: Deactivated successfully.
Dec 11 14:20:58 fv-az840-726 systemd[1]: Stopping Service for snap application multipass.multipassd...
Dec 11 14:20:58 fv-az840-726 systemd[1]: snap.multipass.multipassd.service: Deactivated successfully.
Dec 11 14:20:58 fv-az840-726 systemd[1]: Stopped Service for snap application multipass.multipassd.
Dec 11 14:20:58 fv-az840-726 systemd[1]: Started Service for snap application multipass.multipassd.

I was looking for quite some time into syslog to find something. It even mentions that nested virtualization is enabled https://github.com/leshikus/multipass/actions/runs/7169647762/job/19520515345 Actually I was looking for some message because I was aware of some virtualization limitations and was not able to find this message. It seems for me the indication is far from being clear, though I don't doubt the development priorities.

leshikus avatar Dec 11 '23 15:12 leshikus

Hi @leshikus,

Hmm, it's strange there are no other multipass related log messages. It doesn't appear multipassd is dying, so I wonder if it's blocked somewhere in it's start up. To verify this, is it possible to dump out something like ps -aef | grep multipassd to see if it is indeed running?

Also, are you using a higher tier Github service such as Team or Cloud? This may explain how there may be nested virtualization since I believe those support it.

I'll reopen this for now until we have a better answer.

townsend2010 avatar Dec 11 '23 16:12 townsend2010