canonical / multipass

Multipass orchestrates virtual Ubuntu instances
https://multipass.run
GNU General Public License v3.0
7.96k stars 651 forks source link

Using `systemctl is-active` on an inactive service via `multipass exec` results in infinite loop #3771

Open kev-cao opened 3 weeks ago

kev-cao commented 3 weeks ago

Describe the bug I'm running systemctl is-active to check if a certain service is active on a multipass node, and if I run it through multipass ssh, it works fine and shows up as inactive once.

However, if I run it through multipass exec <node> -- /bin/bash -c "systemctl status <service>", it loops, infinitely printing out inactive.

This does not occur if the service is actually active.

To Reproduce How, and what happened?

  1. multipass launch --name test
  2. multipass exec test -- /bin/bash -c "systemctl is-active fake-service"
  3. Infinite loop occurs

The same occurs if you use systemctl status on an inactive service.

Expected behavior It should log out inactive once and stop outputting to the terminal.

Additional info

sharder996 commented 2 weeks ago

Hi @kev-cao, thanks for bringing this to our attention. I have verified and can reproduce consistently. We will try to prioritize finding a fix for this bug.