Skip to content

pkg/daemon: check config changes to confirm we can apply them - #14

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
sdemos:reconcilable
Sep 10, 2018
Merged

openshift-merge-robot merged 1 commit into
openshift:masterfrom
sdemos:reconcilable

Conversation

@sdemos

@sdemos sdemos commented Aug 17, 2018 •

Copy link
Copy Markdown
Contributor

the daemon can't apply all config changes, only a well-defined subset of
them. specifically, it can only apply changes to files, directories,
links, and systemd units in ignition configs. if anything else changes,
we set the status of the node to degraded so that the cluster can deal
with us appropriately.

I use deepEqual from the reflect package for a few reasons -

  • == can't compare slices, and the ignition struct hierarchy has a lot of slices
  • == compares the pointers and not the values they are pointing to

we could instead just rip the whole thing apart and do all that manually but
it's a lot messier and more prone to mistakes, and deepEqual actually has
the exact semantics we need.

cc @ashcrow

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 17, 2018
@sdemos

sdemos commented Aug 17, 2018

Copy link
Copy Markdown
Contributor Author

/cc @ashcrow

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@sdemos: GitHub didn't allow me to request PR reviews from the following users: ashcrow.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/cc @ashcrow

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/test-infra repository.

@sdemos sdemos changed the title pkg/daemon: check config changes to confirm we can apply them [WIP] pkg/daemon: check config changes to confirm we can apply them Aug 17, 2018
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 17, 2018
@ashcrow

ashcrow commented Aug 20, 2018 •

Copy link
Copy Markdown
Member

That's an evil robot. I'm absolutely in that org and am an approver for parts of this repo :-)

Comment thread pkg/daemon/update.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be an log message that occurs here? I haven't looked in all calling functions but I could see confusion if the versions don't match, the admin/user doesn't know how to inspect the versions directly, and is told the old and new configs are not reconcilable.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question for following similar areas.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, logging the specific thing that went wrong is definitely a good idea.

@smarterclayton

Copy link
Copy Markdown
Contributor

/refresh

@stevekuznetsov

Copy link
Copy Markdown

/uncc @ashcrow

@stevekuznetsov

Copy link
Copy Markdown

/cc @ashcrow

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@stevekuznetsov: GitHub didn't allow me to request PR reviews from the following users: ashcrow.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/cc @ashcrow

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/test-infra repository.

@stevekuznetsov

Copy link
Copy Markdown

/uncc @ashcrow

@stevekuznetsov

Copy link
Copy Markdown

/assign

@stevekuznetsov

Copy link
Copy Markdown

/unassign

@stevekuznetsov

Copy link
Copy Markdown

/cc

@stevekuznetsov

Copy link
Copy Markdown

/uncc

@openshift-ci-robot
openshift-ci-robot removed the request for review from stevekuznetsov August 21, 2018 17:25
@stevekuznetsov

Copy link
Copy Markdown

/shrug

@openshift-ci-robot openshift-ci-robot added the ¯\_(ツ)_/¯ ¯\\\_(ツ)_/¯ label Aug 21, 2018
@stevekuznetsov

Copy link
Copy Markdown

Something is borked with assigning you @ashcrow ...

@ashcrow

ashcrow commented Aug 21, 2018 •

Copy link
Copy Markdown
Member

I think @sdemos has been getting the same issue as well :-/ FWIW I'm both in the openshift org as well as in the proper owners file. Maybe we are missing from a team?

@stevekuznetsov

Copy link
Copy Markdown

/cc @ashcrow

@stevekuznetsov

Copy link
Copy Markdown

Yeah it looks like you guys did not add the larger RedHat team as a collaborator so you guys individually were not actually collaborators on the repo

Comment thread pkg/daemon/update.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for using this style of comments. This is wonderful 🌈 ❤️.

@ashcrow

ashcrow commented Aug 22, 2018

Copy link
Copy Markdown
Member

@stevekuznetsov Thanks for taking a look and following up. We really appreciate it!

@ashcrow

ashcrow commented Aug 31, 2018

Copy link
Copy Markdown
Member

This should probably wait and rebase on #26

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 4, 2018
@sdemos
sdemos force-pushed the reconcilable branch 2 times, most recently from 39a873e to 1d4b22f Compare September 6, 2018 18:36
@ashcrow

ashcrow commented Sep 10, 2018

Copy link
Copy Markdown
Member

@sdemos anything else need to happen with this PR?

@sdemos

sdemos commented Sep 10, 2018

Copy link
Copy Markdown
Contributor Author

@ashcrow I've been having trouble actually getting it tested on openshift, which is why I hadn't removed the wip tag. it's complete though.

@sdemos sdemos changed the title [WIP] pkg/daemon: check config changes to confirm we can apply them pkg/daemon: check config changes to confirm we can apply them Sep 10, 2018
@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 Sep 10, 2018
the daemon can't apply all config changes, only a well-defined subset of
them. specifically, it can only apply changes to files, directories,
links, and systemd units in ignition configs. if anything else changes,
we set the status of the node to degraded so that the cluster can deal
with us appropriately.
@ashcrow

ashcrow commented Sep 10, 2018

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 10, 2018
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ashcrow, sdemos

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

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 37356e4 into openshift:master Sep 10, 2018
@sdemos
sdemos deleted the reconcilable branch September 10, 2018 19:38
osherdp pushed a commit to osherdp/machine-config-operator that referenced this pull request Apr 13, 2021
HarshwardhanPatil07 added a commit to HarshwardhanPatil07/machine-config-operator that referenced this pull request Apr 29, 2026
Address reviewer feedback:
- Convention openshift#14: skip tests on SNO/Compact when multiple nodes needed
- Generation rule for IsCompactOrSNOCluster skip at test body start
- Post-generation verification to ensure 1:1 spec step coverage
- Helper functions must be appended at end of file, not inserted between existing ones

Signed-off-by: HarshwardhanPatil07 <[email protected]>
ptalgulk01 pushed a commit to ptalgulk01/machine-config-operator that referenced this pull request May 15, 2026
pkg/daemon: check config changes to confirm we can apply them
ptalgulk01 pushed a commit to ptalgulk01/machine-config-operator that referenced this pull request May 15, 2026
Address reviewer feedback:
- Convention openshift#14: skip tests on SNO/Compact when multiple nodes needed
- Generation rule for IsCompactOrSNOCluster skip at test body start
- Post-generation verification to ensure 1:1 spec step coverage
- Helper functions must be appended at end of file, not inserted between existing ones

Signed-off-by: HarshwardhanPatil07 <[email protected]>
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/M Denotes a PR that changes 30-99 lines, ignoring generated files. ¯\_(ツ)_/¯ ¯\\\_(ツ)_/¯

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants