-
Notifications
You must be signed in to change notification settings - Fork 4
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
[FEATURE] Keep track of hostnames within SMD #43
Comments
This is meant as a temporary solution until hostnames are figured out in SMD. See: OpenCHAMI/smd#43
Another idea is to use Go templates that are executed on the Component data structure. For example, the string If we left the template execution up to SMD, the same template could be set for many Components and the hostname would become static, since the result of the execution would become the hostname. If we instead stored the template itself in the field, anything fetching the hostname would have to calculate the template, which may not be desired. Thus, it may be preferred to have SMD execute the template when the Component is created within it. CoreDHCP, within the coresmd plugin, since it fetches the Components from SMD when checking if a node exists, could trivially read this The RedfishEndpoint structure has The difficulty I see with this modification is that SMD still imports hms-base and so we would have to either fork that repo and edit the imports or move the functionality from that module elsewhere inside the OpenCHAMI organization. |
This is meant as a temporary solution until hostnames are figured out in SMD. See: OpenCHAMI/smd#43
I'm not in favor of making substantive changes to SMD and its database unless we're working closely with team from HPE. We should consider non-SMD places to store and manage naming information. |
If we don't store hostname information in SMD, the next logical place to store it would be within CoreDHCP; however, I'm apprehensive about introducing persistent state to CoreDHCP since the coresmd plugin was meant to use SMD as its source of truth. A use case that LANL has is being able to distinguish special types of nodes within a cluster in addition to the regular compute nodes, e.g. login and I/O nodes, and have each's hostname reflect that. coresmd v0.0.3-rc1 adds the ability to specify a cluster prefix ( We are already storing persistent state in SMD and BSS, and it has been expressed that SMD is supposed to be the main source of truth. Plus, The RedfishEndpoint structure in SMD is already storing hostname data (which would be used if there wasn't a possibility of having more than one node component per BMC), so it doesn't seem like a far stretch to have this for Components as well. From an administrator perspective, it seems worth it long-term to have this functionality if it requires working with HPE. If we are going to have to store hostname state somewhere, it seems more straightforward (and in alignment with SMD being the source of truth) to add it to an existing DB (SMD) that already has hostname fields for other structures than to try to add it elsewhere. |
Agreed that another place to store state is not ideal. I've raised the issue on slack and asked for HPE reps to join Github so we can have discussions here. I think our options are:
|
Perhaps there should be agreement on the OpenCHAMI naming requirements ahead of finalizing where names/aliases should be stored as the requirements may impact choices. I’ve seen customers who prefer and request any one of the following:
Is it enough to allow a single customizable hostname in addition to Xnames and Node IDs, or should an indeterminate number of names/aliases be allowed? My personal take is that there should be an unlimited number of aliases. If there are several aliases for a primary name, how does a GET call know which hostname to return in the result? Always returning primary names when the caller is using an alias seems questionable. Perhaps each alias should be associated with a named alias group so callers can request that results be expressed with a particular class of name via a query parameter?
I’m a fan of this. I’ve both used and seen very similar methods used to generate hostnames from auto-discovered nodes. |
Related to OpenCHAMI/roadmap#10
Is your feature request related to a problem? Please describe.
Currently, only Node IDs and Xnames are used to identify nodes in SMD. OpenCHAMI's DHCP solution coresmd currently sets node hostnames via Node IDs, using the hard-coded
nid
as a prefix (e.g.nid001
). However, some sites use named clusters and it would be useful to be able to customize the hostname to match the cluster name. For example, given a cluster namedfoobar
, the first compute node could be namedfb01
.It would seem that customizable hostname would also be quite useful in general.
Describe the solution you'd like
Add one or more fields to the Component structure in SMD relating to the hostname. How this is implemented is worth discussion.
One option could be having a
ClusterPrefix
field that could contain text to prefix the NID. E.g. forClusterPrefix=fb
for thefoobar
cluster above for node ID 1, the hostname could befb001
.Another option could be specifying
Hostname
field that could support a format string. For example,Hostname="fb%03n"
would make node 1 have the hostnamefb001
(%03n
could mean node ID (%n
) with 3 leading zeros).Describe alternatives you've considered
All of the ideas I had are above, but other better ones are welcome.
Additional context
Any other variables to be considered for hostname?
The text was updated successfully, but these errors were encountered: