Skip to content

Update existing MC in createMcFromFile() #453

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
merged 1 commit into from
Sep 3, 2024

Conversation

gkurz
Copy link
Member

@gkurz gkurz commented Sep 3, 2024

- Description of the problem which is fixed/What is the use case

Upgrade of OSC should set the same configuration of CRI-O and kata for peer pods as a first time deployment, i.e. don't keep previous MachineConfig objects the content of which might be obsolete.

Fixes: KATA-3295

- What I did

Force the update of existing MachineConfig objects.

- How to verify it

  • Install OSC 1.6.0
  • Create a KataConfig for peer pods
  • Wait for the KataConfig to settle
  • Upgrade OSC to 1.7.0
  • The /etc/crio/crio.conf.d/50-kata-remote file on kata enabled nodes should be exactly :
[crio.runtime.runtimes.kata-remote]
  runtime_path = "/usr/bin/containerd-shim-kata-v2"
  runtime_type = "vm"
  runtime_root = "/run/vc"
  runtime_config_path = "/opt/kata/configuration-remote.toml"
  privileged_without_host_devices = true
  runtime_pull_image = true
  allowed_annotations = [
	"io.kubernetes.cri-o.Devices",
  ]

The content of MachineConfig objects created by the operator isn't
an invariant. For example, the MachineConfig that installs the
CRI-O configuration for peer pods changed recently to use the
regular shim v2 binary instead of the `-tp` one (see daa16fe).

The operator should update such MachineConfig objects created by
a previous deployment. Note that `client.Update()` requires the
object to have a valid resource version to succeed.

Fixes: KATA-3295

Signed-off-by: Greg Kurz <[email protected]>
@openshift-ci openshift-ci bot requested review from bpradipt and snir911 September 3, 2024 13:12
Copy link
Contributor

@pmores pmores left a comment

Choose a reason for hiding this comment

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

lgtm thanks @gkurz !

Copy link
Contributor

@bpradipt bpradipt left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 3, 2024
@gkurz gkurz merged commit 1482a55 into openshift:devel Sep 3, 2024
2 of 4 checks passed
Copy link

openshift-ci bot commented Sep 3, 2024

@gkurz: The following test 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/check 5d7509f link false /test check

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants