Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Populate DB to return info for DHCP service #9

Open
davidallendj opened this issue Feb 6, 2024 · 4 comments
Open

Populate DB to return info for DHCP service #9

davidallendj opened this issue Feb 6, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@davidallendj
Copy link
Collaborator

davidallendj commented Feb 6, 2024

To get our DHCP service running with OChami, Magellan needs to make POST requests the /Inventory/EthernetInterfaces SMD endpoint. This could be implemented via the parseRedfishPostData that was introduced to SMD to construct and populate postgres with the incoming data from Magellan.

When making a GET request to the same endpoint, the JSON return should look like this:

{
  "Description": "string",
  "MACAddress": "string",
  "IPAddresses": [
    {
      "IPAddress": "10.252.0.1",
      "Network": "HMN"
    }
  ],
  "ComponentID": "x0c0s1b0n0"
}

I will add more details later.

@davidallendj davidallendj added the enhancement New feature or request label Feb 6, 2024
@davidallendj davidallendj self-assigned this Feb 6, 2024
@njones-lanl
Copy link

For what it's worth, I think if /Inventory/RedfishEndpoints is able to have a MAC address field, that'd work too. It simplifies how I'd lay out dhcp records for both hosts and BMC endpoints.

I'd be able to point towards /Inventory/EthernetInterfaces, treat everything there as a resource that wants to PXE->iPXE chain, and give it a BSS script location to look to.

I'd then point towards /Inventory/RedfishEndpoints, and treat those as BMC endpoints that don't need to dynamically boot.

Questions:
Is my assumption around /Inventory/EthernetInterfaces always being stuff we want to boot, and /Inventory/RedfishEndpoints valid? If not, what should I point to for something that's a BMC controller, vs a node we want to boot more interactively?

Is /Inventory/RedfishEndpoints pleasant to populate with MAC addresses for our targeted systems? If not, what's our solution there?

@alexlovelltroy
Copy link
Member

We can't assume that every Ethernet interface listed will be bootable. Many nodes end up with multiple dedicated NICs for various networks. We must also be able to address situations where the BMC MAC isn't known.

@njones-lanl
Copy link

We can handle unknown BMC MACs with a dhcp pool if that's an acceptable solution.

Is there a specific field/construct you'd suggest pointing at for the following for separating out Ethernet Interfaces as I crawl the endpoint:
An interface should get a DHCP entry
An interface should point to BSS during boot (which implies a PXE file, and a IPXE file pointing to BSS)

@njones-lanl
Copy link

Actually after looking through the full EthernetInterfaces content that we have populated now, I think I can use Type for now for this, which may alleviate some of the pressure. (although I suspect Magellan probably wants to have some hand in generating that on a large scale system.

davidallendj added a commit that referenced this issue May 7, 2024
Update Dockerfile and `magellan.sh` script to run in container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants