-
Notifications
You must be signed in to change notification settings - Fork 192
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
MGMT-17618: NMStateConfig interfaces presence should be validated #6305
Conversation
@ori-amizur: This pull request references MGMT-17618 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
/test? |
@ori-amizur: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/test edge-e2e-metal-assisted-static-ip-suite |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6305 +/- ##
==========================================
- Coverage 68.29% 68.04% -0.25%
==========================================
Files 241 244 +3
Lines 35863 37024 +1161
==========================================
+ Hits 24491 25193 +702
- Misses 9212 9560 +348
- Partials 2160 2271 +111
|
/test edge-e2e-metal-assisted-static-ip-suite |
1 similar comment
/test edge-e2e-metal-assisted-static-ip-suite |
/test edge-e2e-metal-assisted-static-ip-suite |
/cc @carbonin |
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'm a bit worried that parsing out the nmconnection file is a bit fragile.
I was imagining that we just ensure there is something in the HostStaticNetworkConfig.MacInterfaceMap
. Is there a use case for that being empty?
We are already doing it here: assisted-service/pkg/staticnetworkconfig/generator.go Lines 139 to 165 in 904ee71
I don't think there is use case for being empty - but this is a stronger validation. It validates that for every ethernet interface there is a corresponding mac-mapping. So typos and ignored interfaces can be detected. |
Fair enough. Are you sure that this isn't going to cause issues for bonds/vlans? Do we have a test anywhere for this? |
It should be tested - like any other change.
We have a test for bond. We don't have a test for vlan yet.
They all look similar. They all have a connection section with |
/test edge-e2e-metal-assisted-static-ip-suite |
/retest-required |
In case there is static networking configuration without mac-interface mapping, it is created but the configuration is not applied. This change validates that for every ethernet interface there is a corresponding mac-interface mapping when the static network configuration is set during infa-env registration or during infra-env update.
/test edge-e2e-metal-assisted-static-ip-suite |
@ori-amizur: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
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.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ori-amizur, paul-maidment The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
In case there is static networking configuration without mac-interface mapping, it is created but the configuration is not applied.
This change validates that for every ethernet interface there is a corresponding mac-interface mapping when the static network configuration is set during infa-env registration or during infra-env update.
List all the issues related to this PR
What environments does this code impact?
How was this code tested?
Checklist
docs
, README, etc)Reviewers Checklist
/cc @gamli75