metal-stack / metal-hammer

metal-hammer is used to boot bare metal servers with ipxe and the metal-stack kernel
GNU Affero General Public License v3.0
42 stars 6 forks source link

Pass partition id during machine register #142

Closed majst01 closed 1 week ago

majst01 commented 1 month ago

References

Closes #issue.

Additional Description

The partition ID is now passed from the pixie-core and sent to metal-api during registration. This reduces the load on the metal-api

Release Notes

None

majst01 commented 1 week ago

This works in our test environment:

{"time":"2024-11-12T10:11:00.497136754Z","level":"INFO","msg":"register","machineID":"00000000-0000-0000-0000-ac1f6b7aeb76","request":{"uuid":"00000000-0000-0000-0000-ac1f6b7aeb76","hardware":{"memory":103079215104,"disks":[{"name":"/dev/nvme0n1","size":800166076416},{"name":"/dev/nvme1n1","size":800166076416},{"name":"/dev/sda","size":63350767616
}],"nics":[{"mac":"ac:1f:6b:94:ca:70","name":"eth0"},{"mac":"ac:1f:6b:94:ca:71","name":"eth1"},{"mac":"ac:1f:6b:94:ca:72","name":"eth2"},{"mac":"ac:1f:6b:94:ca:73","name":"eth3"},{"mac":"ac:1f:6b:7a:eb:76","name":"eth4","neighbors":[{"mac":"b8:6a:97:74:00:3d","name":"swp1s2","hostname":"fra-equ01-r01leaf01","identifier":"b8:6a:97:74:00:3d"}]},{"ma
c":"ac:1f:6b:7a:eb:77","name":"eth5","neighbors":[{"mac":"Eth1/3(Port1)","name":"Ethernet2","hostname":"fra-equ01-r01leaf02-1","identifier":"Eth1/3(Port1)"}]},{"mac":"00:00:00:00:00:00","name":"lo"}],"cpus":[{"vendor":"GenuineIntel","model":"Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz","cores":8,"threads":16},{"vendor":"GenuineIntel","model":"Intel
(R) Xeon(R) Silver 4110 CPU @ 2.10GHz","cores":8,"threads":16}]},"bios":{"version":"3.4","vendor":"American Megatrends Inc.","date":"11/03/2020"},"ipmi":{"address":"10.1.1.130:623","mac":"ac:1f:6b:32:f0:94","user":"metal","password":"3dZz5iN8sR","interface":"lanplus","fru":{"chassis_part_number":"CSE-217BHQ+-R2K22BP2","chassis_part_serial":"C217BA
H31AG0535","board_mfg":"Supermicro","board_mfg_serial":"","board_part_number":"X11DPT-B","product_manufacturer":"Supermicro","product_part_number":"SYS-2029BT-HNTR","product_serial":"A328789X9108135C"},"bmc_version":"1.73"},"metal_hammer_version":"427f3b7","partition_id":"fra-equ01"}}                                                                
{"time":"2024-11-12T10:11:00.5642938Z","level":"INFO","msg":"machine registered","machineID":"00000000-0000-0000-0000-ac1f6b7aeb76","response":{"uuid":"00000000-0000-0000-0000-ac1f6b7aeb76","size":"c1-xlarge-x86","partition_id":"fra-equ01"}}  

Would have failed if no partition would have been passed.