MAAS_PATH env variable missing from snap env, causes maas not to be able to connect to virsh
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Triaged
|
High
|
Unassigned | ||
3.5 |
Triaged
|
High
|
Unassigned | ||
snapd |
New
|
Undecided
|
Unassigned |
Bug Description
I get this traceback
```
# maas.power on virsh --power-address qemu+ssh:
main function encountered error
Traceback (most recent call last):
File "/snap/
self.
File "/snap/
self.
File "/snap/
current.result = callback( # type: ignore[misc]
File "/snap/
current_
--- <exception caught here> ---
File "/snap/
result = current_
File "/snap/
return g.throw(self.type, self.value, self.tb)
File "/snap/
await driver.on(None, context)
File "/snap/
result = current_
File "/snap/
return g.throw(self.type, self.value, self.tb)
File "/snap/
yield power_func(
File "/snap/
result = current_
File "/snap/
raise VirshError("Failed to login to virsh console.")
provisioningser
```
At first I though it might be similar to https:/
Adding more debugging statements to the virsh.py file via a custom ro mount, I was able to see the context object and see the command it was running
```
args: ['/snap/
buffer (last 100 chars): b''
before (last 100 chars): b't execute binary /usr/lib/
```
It can not find `/usr/lib/
There is a get path function which tried to read the env var `MAAS_PATH` to use as the base of the path
setting `MAAS_PATH=
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 3.6.0 |
Changed in maas: | |
milestone: | 3.6.0 → 3.6.x |
I should add this is maas `3.5.1- 16317-g. 409891638` revision `36889` on jammy LTS