Conversation
|
some high level thoughts from me:
|
7ff94c5 to
ca75e9f
Compare
ca75e9f to
3b1ebda
Compare
|
How do we handle a situation where an IP is specified in a expected machines table but the BMC actually DHCPs to NICo (and we assign it some other IP)? |
chet
left a comment
There was a problem hiding this comment.
Hey @mrgalaxy-source! Let's hold off on this for a sec. Between the external BMC IP support and another feature request that came in for doing static DHCP reservations for managed networks (both of which apparently are high priority), I spent the day putting together underlying plumbing together for both.
...and I think the plumbing going to change the approach of this a bit -- it should be a lot more straightforward in a sense -- at least that's the goal of the plumbing.
I definitely do apologize for the overlap, because I know you put work into it, and I love seeing stuff like this coming in.
I'll get back to you shortly. I think you're tied up in a another project anyway, so I don't think you're blocked on me.
Have a good weekend. 🙏
|
Hey @mrgalaxy-source! Check out #817 -- this should be effectively all you need to pattern match for expected machine support, with the addition of also supporting And again, sorry for squashing over this, but we had both #644 and #790 pop up, and it reached a point where this was going to be a deeper change to more generically support a few different use cases. |
3b1ebda to
ce0b4bc
Compare
This PR makes a number of changes that allow a developer to point BMM at an "arbitrary" BMC (not the tenant, just the BMC right now) of a host or compute node in isolation that has a static IP address or has already been booted with a DHCP address not controlled by BMM. This allows us to test the BMM discovery and ingestion process without needing to have a working DHCP Relay or PXE-configuration. We can then look at all the discovered inventory information of the BMC and do things like power control while exploring the forge command line and API to learn about how things work. This also requires the following settings to work: allow_zero_dpu_hosts = true Also, comment out the machine-a-tron out in the configmap: bmc_proxy = "https://machine-a-tron-bmc-mock.forge-system.svc.cluster.local:1266" Once that's done, you can deploy a static-ip-managed endpoint like this: forge-admin-cli expected-machine add \ --bmc-mac-address 4C:BB:47:25:BA:C7 \ --chassis-serial-number 1234567890 \ --bmc-username <your-username> \ --bmc-password <your-password> \ --bmc-ip-address x.x.x.x Core Feature Implementation: • ✅ Added ip_address field to ExpectedMachine and ExpectedPowerShelf • ✅ Created database migrations for both expected_machines.ip_address and machine_interfaces.is_static_ip • ✅ Added IpTypeStaticBmcIp enum variant to classify static BMC IPs • ✅ Updated IP finder logic to check both BmcIp and MachineAddresses finders • ✅ Web UI displays "Static BMC IP" label • ✅ CLI supports --ip-address flag for add/patch operations • ✅ Proper IP validation rejects malformed addresses Test Infrastructure: • ✅ Created NodePort service for stable postgres access • ✅ Implemented WITH (FORCE) for database cleanup • ✅ Fixed connection pooling and template database isolation • ✅ Created self-contained run-tests-k8s.sh script Test Coverage (6 comprehensive tests): 1. Add ExpectedMachine with static IP 2. Update to add static IP to existing machine 3. Update to change static IP 4. Reject invalid IP addresses 5. IP finder correctly classifies static BMC IPs 6. Site Explorer handles power shelf static IPs Signed-off-by: Michael Galaxy <mrgalaxy@nvidia.com> fix: use unique migration version for machine_health_history_rename refactor: align expected machine static BMC with main preallocate flow - Wire add/update/batch handlers to preallocate_machine_interface / update_preallocated_machine_interface like switches/power shelves - Classify IpTypeStaticBmcIp via AllocationType::Static or static-assignments segment - Extend machine_interface_address find_by_address with allocation_type - Remove explore_machines_from_static_ip config (interfaces come from handlers) - JSON import accepts legacy ip_address key via serde alias
5d43432 to
c4aa1a5
Compare
This PR makes a number of changes that allow a developer to point BMM at an "arbitrary" BMC (not the tenant, just the BMC right now) of a host or compute node in isolation that has a static IP address or has already been booted with a DHCP address not controlled by BMM. This allows us to test the BMM discovery and ingestion process for BMCs without needing to have a working DHCP Relay or PXE-configuration.
We can then look at all the discovered inventory information of the BMC and do things like power control while exploring the forge command line and API to learn about how things work.
This also requires the following settings to work:
Also, comment out the machine-a-tron out in the configmap:
bmc_proxy = "https://machine-a-tron-bmc-mock.forge-system.svc.cluster.local:1266"
Once that's done, you can deploy a static-ip-managed endpoint like this:
Core Feature Implementation:
• ✅ Added ip_address field to ExpectedMachine and ExpectedPowerShelf
• ✅ Created database migrations for both expected_machines.ip_address and machine_interfaces.is_static_ip
• ✅ Added IpTypeStaticBmcIp enum variant to classify static BMC IPs
• ✅ Updated IP finder logic to check both BmcIp and MachineAddresses finders
• ✅ Web UI displays "Static BMC IP" label
• ✅ CLI supports --ip-address flag for add/patch operations
• ✅ Proper IP validation rejects malformed addresses
Test Infrastructure:
• ✅ Created NodePort service for stable postgres access
• ✅ Implemented WITH (FORCE) for database cleanup
• ✅ Fixed connection pooling and template database isolation
Test Coverage (6 comprehensive tests):
1. Add ExpectedMachine with static IP
2. Update to add static IP to existing machine
3. Update to change static IP
4. Reject invalid IP addresses
5. IP finder correctly classifies static BMC IPs
6. Site Explorer handles power shelf static IPs