openshift / assisted-service

Apache License 2.0
109 stars 209 forks source link

MGMT-18579 - Inject nmpolicy captures into the provided YAML and place it with INI file under the host-specific path #6695

Open linoyaslan opened 2 weeks ago

linoyaslan commented 2 weeks ago

The purpose of this PR is to change the current method of creating nmconnection files from the nmstate YAML provided by users. Currently, we rely on pre-generated nmconnection files and a complex script running on the node to replace temporary interface names with actual ones. These modifications aim to simplify the process by using nmpolicy and the nmstate service, offering a more straightforward approach to generating nmconnection files. For more detailed information, please refer to the documentation here - Doc

List all the issues related to this PR

What environments does this code impact?

How was this code tested?

Checklist

Reviewers Checklist

linoyaslan commented 2 weeks ago

/cc @danielerez @jhernand @carbonin @AlonaKaplan @ori-amizur

linoyaslan commented 1 week ago

/test all

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 58.52273% with 73 lines in your changes missing coverage. Please review.

Project coverage is 68.64%. Comparing base (f2f02f5) to head (fd251be). Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
internal/bminventory/inventory.go 19.56% 31 Missing and 6 partials :warning:
pkg/staticnetworkconfig/generator.go 74.73% 15 Missing and 9 partials :warning:
internal/ignition/discovery.go 80.76% 3 Missing and 2 partials :warning:
pkg/staticnetworkconfig/backward_compatibility.go 0.00% 5 Missing :warning:
internal/isoeditor/rhcos.go 50.00% 1 Missing and 1 partial :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/openshift/assisted-service/pull/6695/graphs/tree.svg?width=650&height=150&src=pr&token=YOR4NSSOXQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift)](https://app.codecov.io/gh/openshift/assisted-service/pull/6695?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift) ```diff @@ Coverage Diff @@ ## master #6695 +/- ## ========================================== - Coverage 68.67% 68.64% -0.04% ========================================== Files 246 247 +1 Lines 36951 37115 +164 ========================================== + Hits 25377 25476 +99 - Misses 9314 9364 +50 - Partials 2260 2275 +15 ``` | [Files with missing lines](https://app.codecov.io/gh/openshift/assisted-service/pull/6695?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift) | Coverage Δ | | |---|---|---| | [internal/isoeditor/rhcos.go](https://app.codecov.io/gh/openshift/assisted-service/pull/6695?src=pr&el=tree&filepath=internal%2Fisoeditor%2Frhcos.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift#diff-aW50ZXJuYWwvaXNvZWRpdG9yL3JoY29zLmdv) | `58.33% <50.00%> (-2.24%)` | :arrow_down: | | [internal/ignition/discovery.go](https://app.codecov.io/gh/openshift/assisted-service/pull/6695?src=pr&el=tree&filepath=internal%2Fignition%2Fdiscovery.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift#diff-aW50ZXJuYWwvaWduaXRpb24vZGlzY292ZXJ5Lmdv) | `73.80% <80.76%> (+0.44%)` | :arrow_up: | | [pkg/staticnetworkconfig/backward\_compatibility.go](https://app.codecov.io/gh/openshift/assisted-service/pull/6695?src=pr&el=tree&filepath=pkg%2Fstaticnetworkconfig%2Fbackward_compatibility.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift#diff-cGtnL3N0YXRpY25ldHdvcmtjb25maWcvYmFja3dhcmRfY29tcGF0aWJpbGl0eS5nbw==) | `0.00% <0.00%> (ø)` | | | [pkg/staticnetworkconfig/generator.go](https://app.codecov.io/gh/openshift/assisted-service/pull/6695?src=pr&el=tree&filepath=pkg%2Fstaticnetworkconfig%2Fgenerator.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift#diff-cGtnL3N0YXRpY25ldHdvcmtjb25maWcvZ2VuZXJhdG9yLmdv) | `71.28% <74.73%> (+2.62%)` | :arrow_up: | | [internal/bminventory/inventory.go](https://app.codecov.io/gh/openshift/assisted-service/pull/6695?src=pr&el=tree&filepath=internal%2Fbminventory%2Finventory.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift#diff-aW50ZXJuYWwvYm1pbnZlbnRvcnkvaW52ZW50b3J5Lmdv) | `70.78% <19.56%> (-0.52%)` | :arrow_down: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/openshift/assisted-service/pull/6695/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift)
linoyaslan commented 1 week ago

/test edge-lint

linoyaslan commented 1 week ago

/test all

linoyaslan commented 1 week ago

/test edge-unit-test

linoyaslan commented 4 days ago

/test e2e-metal-assisted-static-ip-suite

openshift-ci[bot] commented 4 days ago

@linoyaslan: The specified target(s) for /test were not found. The following commands are available to trigger required jobs:

The following commands are available to trigger optional jobs:

Use /test all to run the following jobs that were automatically triggered:

In response to [this](https://github.com/openshift/assisted-service/pull/6695#issuecomment-2336622383): >/test e2e-metal-assisted-static-ip-suite Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
linoyaslan commented 4 days ago

/test edge-e2e-metal-assisted-static-ip-suite

linoyaslan commented 4 days ago

/test edge-unit-test

linoyaslan commented 4 days ago

/test edge-lint

linoyaslan commented 4 days ago

/test edge-unit-test

linoyaslan commented 4 days ago

/test edge-e2e-metal-assisted-static-ip-suite

eifrach commented 3 days ago

/test edge-e2e-metal-assisted-static-ip-suite

linoyaslan commented 2 days ago

/test edge-subsystem-aws

linoyaslan commented 2 days ago

/test edge-verify-generated-code

linoyaslan commented 2 days ago

/test edge-verify-generated-code

linoyaslan commented 2 days ago

/test all

linoyaslan commented 2 days ago

/test all

linoyaslan commented 2 days ago

/test edge-e2e-metal-assisted-static-ip-suite

linoyaslan commented 2 days ago

/test edge-e2e-metal-assisted-static-ip-suite

eifrach commented 2 days ago

/test ?

openshift-ci[bot] commented 2 days ago

@eifrach: The following commands are available to trigger required jobs:

The following commands are available to trigger optional jobs:

Use /test all to run the following jobs that were automatically triggered:

In response to [this](https://github.com/openshift/assisted-service/pull/6695#issuecomment-2342785454): >/test ? Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
linoyaslan commented 1 day ago

/test all

linoyaslan commented 1 day ago

/test ?

linoyaslan commented 1 day ago

/test edge-e2e-metal-assisted-bond /test edge-e2e-metal-assisted-bond-4-12 //test edge-e2e-metal-assisted-bond-4-13 /test edge-e2e-metal-assisted-bond-4-14 /test edge-e2e-metal-assisted-bond-4-15 /test edge-e2e-metal-assisted-bond-4-16

/test edge-e2e-metal-assisted-static-ip-suite /test edge-e2e-metal-assisted-static-ip-suite-4-12 /test edge-e2e-metal-assisted-static-ip-suite-4-13 /test edge-e2e-metal-assisted-static-ip-suite-4-14 /test edge-e2e-metal-assisted-static-ip-suite-4-15 /test edge-e2e-metal-assisted-static-ip-suite-4-16

openshift-ci[bot] commented 1 day ago

@linoyaslan: The following commands are available to trigger required jobs:

The following commands are available to trigger optional jobs:

Use /test all to run the following jobs that were automatically triggered:

In response to [this](https://github.com/openshift/assisted-service/pull/6695#issuecomment-2343943945): >/test ? Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
linoyaslan commented 23 hours ago

/retest

linoyaslan commented 21 hours ago

/test edge-e2e-metal-assisted-static-ip-suite

linoyaslan commented 18 hours ago

/test ?

openshift-ci[bot] commented 18 hours ago

@linoyaslan: The following commands are available to trigger required jobs:

The following commands are available to trigger optional jobs:

Use /test all to run the following jobs that were automatically triggered:

In response to [this](https://github.com/openshift/assisted-service/pull/6695#issuecomment-2346559668): >/test ? Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
linoyaslan commented 18 hours ago

/test edge-e2e-metal-assisted-static-ip-suite /test edge-e2e-metal-assisted-bond

linoyaslan commented 18 hours ago

/hold

carbonin commented 15 hours ago

/test edge-e2e-metal-assisted-static-ip-suite

openshift-ci[bot] commented 15 hours ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: carbonin, linoyaslan

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: - ~~[OWNERS](https://github.com/openshift/assisted-service/blob/master/OWNERS)~~ [carbonin] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci[bot] commented 14 hours ago

@linoyaslan: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/edge-e2e-metal-assisted-static-ip-suite-4-15 5f0cd9da09d94953875ada27d39a19864efdac31 link false /test edge-e2e-metal-assisted-static-ip-suite-4-15
ci/prow/edge-e2e-metal-assisted-bond-4-15 5f0cd9da09d94953875ada27d39a19864efdac31 link false /test edge-e2e-metal-assisted-bond-4-15
ci/prow/edge-e2e-metal-assisted-static-ip-suite-4-16 5f0cd9da09d94953875ada27d39a19864efdac31 link false /test edge-e2e-metal-assisted-static-ip-suite-4-16
ci/prow/edge-e2e-metal-assisted-bond-4-16 5f0cd9da09d94953875ada27d39a19864efdac31 link false /test edge-e2e-metal-assisted-bond-4-16
ci/prow/edge-e2e-ai-operator-ztp fd251be46d47263e3211e24332badd3915ea9898 link true /test edge-e2e-ai-operator-ztp
ci/prow/e2e-agent-compact-ipv4 fd251be46d47263e3211e24332badd3915ea9898 link true /test e2e-agent-compact-ipv4
ci/prow/edge-e2e-metal-assisted fd251be46d47263e3211e24332badd3915ea9898 link true /test edge-e2e-metal-assisted
ci/prow/edge-e2e-metal-assisted-bond dec20eb577ccd50ab1c6689acb070ccfa461a8e4 link false /test edge-e2e-metal-assisted-bond
ci/prow/edge-e2e-metal-assisted-static-ip-suite fd251be46d47263e3211e24332badd3915ea9898 link false /test edge-e2e-metal-assisted-static-ip-suite

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).