-
Notifications
You must be signed in to change notification settings - Fork 349
DAOS-18972 control: addr_format YAML key for fabric IP family (server + clients) #18484
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -448,15 +448,31 @@ func (srv *server) setupGrpc() error { | |
| return err | ||
| } | ||
|
|
||
| // Address family is a property of this system's fabric, so it must travel | ||
| // to attaching clients alongside the provider. Surface the operator's | ||
| // addr_format choice as a D_ADDR_FORMAT entry in the per-provider client | ||
| // hint env, which the client applies before crt_init (see | ||
| // dc_mgmt_net_cfg_init). A client/agent attached to several systems gets | ||
| // each system's family from that system's own hint. Empty addr_format | ||
| // leaves the hint untouched, preserving the historical default. | ||
| addrFormats := srv.cfg.Fabric.GetAddrFormats() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this change require any other dependent changes to offer functionality? what is the order of landing for all dependencies and related changes? |
||
|
|
||
| clientNetHints := make([]*mgmtpb.ClientNetHint, 0, len(providers)) | ||
| for i, p := range providers { | ||
| envVars := srv.cfg.ClientEnvVars | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this looks like an odd place to update ClientEnvVars, could you have a look at existing precedent for updating this within the config processing and validation workflow. there may be a more appropriate place to update this value. |
||
| if i < len(addrFormats) && addrFormats[i] != "" { | ||
| // Copy rather than append in place to avoid aliasing the shared | ||
| // ClientEnvVars slice across providers. | ||
| envVars = append(append([]string{}, envVars...), "D_ADDR_FORMAT="+addrFormats[i]) | ||
| } | ||
|
|
||
| clientNetHints = append(clientNetHints, &mgmtpb.ClientNetHint{ | ||
| Provider: p, | ||
| CrtTimeout: srv.cfg.Fabric.CrtTimeout, | ||
| NetDevClass: uint32(srv.netDevClass[i]), | ||
| SrvSrxSet: srxSetting, | ||
| ProviderIdx: uint32(i), | ||
| EnvVars: srv.cfg.ClientEnvVars, | ||
| EnvVars: envVars, | ||
| }) | ||
| } | ||
| srv.mgmtSvc.clientNetworkHint = clientNetHints | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any validation testing against improper inputs, could we have some of that please?