Skip to content

mcc: add ignition validation to render controller #529

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

Merged

Conversation

kikisdeliveryservice
Copy link
Contributor

@kikisdeliveryservice kikisdeliveryservice commented Mar 7, 2019

- What I did

  • Add check in render_controller.go to ensure that all machineconfigs to be merged in
    getRenderedMachineConfig() contain valid ignition configs.
  • Add unit test for getRenderedMachineConfig() to test ign validation
  • Add missing unit test for GetMachineConfigsForPool()
  • Rename confusing function names in controller which caused problems while working on this PR:
    generateMachineConfig() -> generateRenderedMachineConfig()
    generateMachineConfigs() -> generateTemplateMachineConfigs()

Closes: #502
Related-to: #505

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 7, 2019
@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 7, 2019
@kikisdeliveryservice kikisdeliveryservice requested review from cgwalters and removed request for ashcrow March 7, 2019 02:07
@kikisdeliveryservice kikisdeliveryservice changed the title WIP: add mc.ignconfig check to mcc WIP: mcc: add mc.ignconfig check Mar 7, 2019
@kikisdeliveryservice kikisdeliveryservice changed the title WIP: mcc: add mc.ignconfig check WIP: mcc: add mc.ignconfig validation Mar 7, 2019
@kikisdeliveryservice kikisdeliveryservice force-pushed the mcc-ign-check branch 2 times, most recently from 0da80a4 to a7a86b8 Compare March 14, 2019 23:53
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 15, 2019
@kikisdeliveryservice kikisdeliveryservice force-pushed the mcc-ign-check branch 4 times, most recently from eb3f60f to 9469cd6 Compare March 15, 2019 02:17
@kikisdeliveryservice kikisdeliveryservice changed the title WIP: mcc: add mc.ignconfig validation mcc: add ignition validation to render controller Mar 15, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 15, 2019
@runcom
Copy link
Member

runcom commented Mar 15, 2019

/retest

@kikisdeliveryservice
Copy link
Contributor Author

Throttling: Rate exceeded\n\tstatus code: 400, request id: fb0639d5-46fd-11e9-905f-b5bfca14856b"
/test e2e-aws

@kikisdeliveryservice
Copy link
Contributor Author

This is ready for review despite AWS's throttling.

@runcom
Copy link
Member

runcom commented Mar 15, 2019

/approve

great work!

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 15, 2019
pkg/controller had functions with confusing and unclear naming.
This commit changes:
generateMachineConfig() -> generateRenderedMachineConfig()
generateMachineConfigs() -> generateTemplateMachineConfigs()
Add check to render_controller.go to ensure that all machineconfigs merged
by getRenderedMachineConfig() contain valid ignition configs.

Closes: openshift#502
@kikisdeliveryservice
Copy link
Contributor Author

Updated. Ready for re-review @runcom @cgwalters

@runcom
Copy link
Member

runcom commented Mar 15, 2019

still lgtm

@cgwalters for the final lgtm

@cgwalters
Copy link
Member

/lgtm

Nice work!

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 15, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, kikisdeliveryservice, runcom

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 [cgwalters,kikisdeliveryservice,runcom]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 705a70b into openshift:master Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MCC should have MCs Ignition validation
5 participants