-
Notifications
You must be signed in to change notification settings - Fork 1
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
CASMTRIAGE-7093 #406
Merged
Merged
CASMTRIAGE-7093 #406
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since wicked-0.6.76 bond0 apparently needs to start with `auto` to ensure it's up when child devices are upped.
I am tired of needing to press a hot-key to format generated `data.json` files. Just format it to begin with. The JSON is formatted anyway after we run `csi patch ca` on a live system.
This adds the ability to define a "parent device" to `networking.IPV4Network`, `networking.IPV4Subnet`, and `initialize.NCNNetwork` structs. Allowing one to define which network interface owns the given network. `networking.IPV4Subnet` has a new polymorphic function for generating an interface name (`GenInterfaceName()`). When working with a network type, such as a VLAN, where an underlying Ethernet device is required, the `networking.IPV4Subnet.InterfaceName` will contain the subnet's resulting interface. E.g. `IPV4Subnet{ParentInterface: bond0, NetName: FOO}` would return `IPV4Subnet.InterfaceName="bond0.foo0"`. `sls.GenDefaultHMN` and `sls.GenDefaultNMN` were removed, now their returned defaults are stored in variables like the other networks. Each `Default` network in `sls` was updated to leverage the new `ParentDevice` if applicable. Lastly this adds a `.Gateway` key to the `initialize.NCNNetwork`, this will be useful for some simplification in a few upcoming commits. Remove `bond0` hardcode in `ifcfg` Leverage the new `ParentInterfaceName` value and remove all hardcoded `bond0`.
The `initialize.MakeBaseCampfromNCNs()` function was modified to remove a nested for-loop along with several hardcodes for parent devices. The loop for constructing the `ncnIPAM` dictionary now leverages the each NCN's `NCNNetwork` struct, as well as the struct's new `ParentInterfaceName` and `Gateway` values. These new values no longer require us to loop through the larger, arbitrary `shastaNetworks` slice.
This reduces the DNSMasq templates to a few reusable templates, making use of the new `.InterfaceName` attribute in `networking.IPV4Subnet`.
This was moved out of a draft today in order to ping everyone for reviews. |
spillerc-hpe
approved these changes
Jul 11, 2024
4 tasks
rustydb
added a commit
that referenced
this pull request
Jul 16, 2024
PR #406 consolidated our DNSMasq templates but neglected to preserve the `packages.local` CNAME critical for our cloud-init deployment.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary and Scope
Issue Type
The main purpose of this PR is resolving the ifcfg file generation for CASMTRIAGE-7093.
Several other updates were factored in that allow CSI to have parity with the BASH scripts in Cray-HPE/metal-init#80
Extras:
data.json
every time, before it was only pretty-printed aftercsi patch ca
was invoked.networking.IPV4Network
,networking.IPV4Subnet
, andinitialize.NCNNetwork
structsinitialize.NCNNetwork.Gateway
valuedata.json
generationPrerequisites
Idempotency
Risks and Mitigations