juju_machine_agent_name can return an invalid machine name.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Caner Derici |
Bug Description
The `juju_machine_
Here is the bash function which grabs the machine name:
```
juju_machine_
local machine=$(find /var/lib/
echo $machine
}
```
Here is an edge case where the script grabs an invalid machine name:
```
ubuntu@
machinelearning
```
Here is the same `find` command but echoing the full path of the directories it matched:
```
ubuntu@
/var/lib/
/var/lib/
```
This was found on an LXD container on an environment running juju-agent version 2.9.18.
I believe that modifying the `juju_machine_
Changed in juju: | |
assignee: | nobody → Caner Derici (cderici) |
Changed in juju: | |
status: | Triaged → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
This should be a very simple fix, and I agree that we shouldn't be recursing into any sub directories.