MAAS CLI should not require mac when creating virsh hosts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Won't Fix
|
Wishlist
|
Unassigned |
Bug Description
When adding a machine with a virsh power_type, maas should be able to lookup the mac address for the node itself, instead of being provided by the user at creation.
I believe the requirement was removed from https:/
however when trying to add a host from the CLI, maas errors because there is no mac:
$ maas root machines create hostname=node1 power_type=virsh architecture=
{"mac_addresses": ["This field is required."]}
This error was produced from the maas snap 2.8.2-8577-
The mac information can be easily gathered with the virsh command:
"virsh -c $BMC domiflist $VMNAME |head -n 3|tail -n 1|awk '{print $5}'"
summary: |
- MaaS CLI should not require mac when creating vrish hosts + MaaS CLI should not require mac when creating virsh hosts |
Changed in maas: | |
status: | New → Triaged |
summary: |
- MaaS CLI should not require mac when creating virsh hosts + MAAS CLI should not require mac when creating virsh hosts |
When a new IPMI machine without a MAC address boots MAAS detects the BMC with ipmitools in the booted ephemeral environment. That information is then sent to MAAS which maps it to an exiting machine. Once the mapping takes place network information is sent which is added to the mapped machine.
There is no way for MAAS to look up virsh information within the VM which is how it works with IPMI. Because of this a MAC address is required.
Marking this as wish list since we could interact with virsh before powering a machine is on but this isn't something MAAS currently has a code path for.