Skip to content
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

Fix machine config update in sriovnetworkpoolconfig_controller #381

Merged

Conversation

wizhaoredhat
Copy link
Contributor

@wizhaoredhat wizhaoredhat commented Nov 28, 2022

These fixes only apply to Openshift clusters with the machine config operator.

The controller was not detecting changes to the machine config files. Firstly if the existing MachineConfig's ignition JSON differs from the rendered MachineConfig's ignition JSON then we should update the MachineConfig. Then we should update the MachineConfig with the rendered MachineConfig. This logic had an incorrect implementation priorly.

@github-actions
Copy link

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@wizhaoredhat wizhaoredhat marked this pull request as draft November 28, 2022 20:26
@wizhaoredhat
Copy link
Contributor Author

wizhaoredhat commented Nov 28, 2022

Investigating that foundMC.Spec.Config.Raw is never equal to mc.Spec.Config.Raw. Even though there are no changes to the machine config files. It is most likely metadata. Posting this PR (in draft state) such that developers with experience with the Machine Config API can take a look.

EDIT: Found the issue was that the Raw JSON would rearrange some fields. We have to unmarshal the JSON and then compare.

@wizhaoredhat wizhaoredhat mentioned this pull request Nov 28, 2022
@coveralls
Copy link

coveralls commented Nov 28, 2022

Pull Request Test Coverage Report for Build 3577759018

  • 11 of 13 (84.62%) changed or added relevant lines in 1 file are covered.
  • 11 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.007%) to 25.143%

Changes Missing Coverage Covered Lines Changed/Added Lines %
controllers/sriovnetworkpoolconfig_controller.go 11 13 84.62%
Files with Coverage Reduction New Missed Lines %
api/v1/helper.go 3 40.6%
controllers/sriovibnetwork_controller.go 4 65.35%
controllers/sriovnetwork_controller.go 4 63.0%
Totals Coverage Status
Change from base Build 3515309545: -0.007%
Covered Lines: 1888
Relevant Lines: 7509

💛 - Coveralls

These fixes only apply to Openshift clusters with the machine config
operator.

The controller was not detecting changes to the machine config
files. Firstly if the existing MachineConfig's ignition JSON differs
from the rendered MachineConfig's ignition JSON then we should update
the MachineConfig. Then we should update the MachineConfig with the
rendered MachineConfig. This logic had an incorrect implementation
priorly.
@github-actions
Copy link

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@wizhaoredhat wizhaoredhat changed the title WIP: Fix machine config update in sriovnetworkpoolconfig_controller Fix machine config update in sriovnetworkpoolconfig_controller Nov 29, 2022
@wizhaoredhat wizhaoredhat marked this pull request as ready for review November 29, 2022 21:02
@wizhaoredhat
Copy link
Contributor Author

/cc @bn222 @pliurh

@wizhaoredhat
Copy link
Contributor Author

/cc @SchSeba

@github-actions github-actions bot requested a review from SchSeba December 5, 2022 21:00
@bn222
Copy link
Collaborator

bn222 commented Dec 6, 2022

/lgtm

@github-actions github-actions bot added the lgtm label Dec 6, 2022
@pliurh pliurh merged commit c173e87 into k8snetworkplumbingwg:master Dec 6, 2022
@wizhaoredhat wizhaoredhat deleted the fix_machine_config_updating branch March 14, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants