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

OCPBUGS-11437: MCO keeps the pull secret to .orig file once it replaced #3759

Merged

Conversation

inesqyx
Copy link
Contributor

@inesqyx inesqyx commented Jun 26, 2023

  • OCPBUGS11437
    The pull secret is preserved in the path /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig. Whereas, the user needs it to be deleted when the pull secret is being deleted/ replaced.
  • What is the problem
    There is complaint about that the MCD is creating orig files to preserve files that should not be preserved. To be more specific, the orig preserving system should only preserve files that are originally on the disk, but are now preserving files that are written by Ignition. The root cause is that Ignition writes the files before the MCD takes the control as a result when MCD comes in, it sees all the files written before as files on disk, which is very wrong.
  • What I did
    Add more constraints for orig file generation: orig files should only be generated on files that 1) claimed by the rpm 2) exist in the usr/etc directory 3) exist before MCD takes control
  • How to verify it
    Ignition writes files in the /var directory. And now when cat into the orig folder for the MCD, there is no var folder, meaning that files written by Ignition are not preserved now. Specific example would be that catting into /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdori will now return no so such file

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 26, 2023
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 26, 2023
@openshift-ci-robot
Copy link
Contributor

@inesqyx: This pull request references Jira Issue OCPBUGS-11437, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

- What I did
Provide another workaround for OCPBUGS-11437
- How to verify it
WIP

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 26, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@inesqyx
Copy link
Contributor Author

inesqyx commented Jun 26, 2023

/test all

@openshift-ci-robot
Copy link
Contributor

@inesqyx: This pull request references Jira Issue OCPBUGS-11437, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

- What I did
A specific solution that targeted towards the reporter's problem, instead of a system-wise approach: ask the createOrig func to specifically create a noorig file for file path with suffix - config.json (pull secret)

- How to verify it
catting into /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdori will now return no so such file.

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.

@inesqyx
Copy link
Contributor Author

inesqyx commented Jun 27, 2023

/retest-required

@openshift-ci-robot
Copy link
Contributor

@inesqyx: This pull request references Jira Issue OCPBUGS-11437, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

- What I did
A specific solution that targeted towards the reporter's problem, instead of a system-wise approach: ask the createOrig func to specifically create no backup file for file path with suffix - config.json (pull secret)

- How to verify it
catting into /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig will now return no so such file.

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.

@inesqyx inesqyx changed the title [DNM] OCPBUGS-11437: MCO keeps the pull secret to .orig file once it replaced - another workaround OCPBUGS-11437: MCO keeps the pull secret to .orig file once it replaced Jun 27, 2023
@inesqyx inesqyx marked this pull request as ready for review June 27, 2023 18:43
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 27, 2023
@openshift-ci-robot
Copy link
Contributor

@inesqyx: This pull request references Jira Issue OCPBUGS-11437, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

- What I did
A specific solution that targeted towards the reporter's problem, instead of a system-wise approach: ask the createOrig func to specifically create no backup file for file path with suffix - config.json (pull secret)

- How to verify it

  • catting into /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig will now return no so such file.
  • confirmed that it is preserving the exact same amount of files as before, just not the pull secret

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.

@openshift-ci-robot
Copy link
Contributor

@inesqyx: This pull request references Jira Issue OCPBUGS-11437, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

- What I did
A specific solution targeted towards undesired preservation on pull secret: ask the createOrig func to specifically create no backup file for file path with suffix - config.json (pull secret)

- How to verify it

  • catting into /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig will now return no so such file.
  • confirmed that it is preserving the exact same amount of files as before, just not the pull secret

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.

@sergiordlr
Copy link

sergiordlr commented Jun 28, 2023

Verified using IPI on OSP

  1. Verify that the file /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig does not exist
oc debug node/sregidor-nps-zgw74-worker-0-9cc8x -- chroot /host cat /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig
Starting pod/sregidor-nps-zgw74-worker-0-9cc8x-debug-n2zmb ...
To use host binaries, run `chroot /host`
cat: /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig: No such file or directory
  1. Create a MC that deploys a file and remove the MC
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: worker
  name: test-machine-config
spec:
  config:
    ignition:
      version: 3.1.0
    storage:
      files:
      - contents:
          source: data:text/plain;charset=utf-8;base64,dGVzdA==
        filesystem: root
        mode: 420
        path: /etc/test-file.test

The file is created and removed normally. We can read the delete-stale logs when removing the file

I0628 11:44:27.559549    2249 update.go:1250] Deleting stale data
I0628 11:44:27.559664    2249 update.go:1313] Removed stale file "/etc/test-file.test"
  1. Create a MC that deploy the /var/lib/kubelet/config.json and remove it
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: worker
  name: test-machine-config
spec:
  config:
    ignition:
      version: 3.1.0
    storage:
      files:
      - contents:
          source: data:text/plain;charset=utf-8;base64,e30=
        filesystem: root
        mode: 0600
        path: /var/lib/kubelet/config.json

When we deploy the MC the file /var/lib/kubelet/config.json has this content: {}

When we remove the MC the file /var/lib/kubelet/config.json has the content defined in the pull-secret.

  1. Configure an empty pull-secret: {}

After configuring the emtpy pull-secret the file /var/lib/kubelet/config.json does not exist

]$ oc debug node/sregidor-nps-zgw74-worker-0-9cc8x -- chroot /host cat /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig
Starting pod/sregidor-nps-zgw74-worker-0-9cc8x-debug-slf4r ...
To use host binaries, run `chroot /host`
cat: /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig: No such file or directory
  1. Upgrade from 4.13

Before the upgrade, the file exists and contains the right content:

$ oc get clusterversion
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.13.0-0.nightly-2023-06-20-224158   True        False         15m     Cluster version is 4.13.0-0.nightly-2023-06-20-224158
$ oc debug node/sregidor-up2-7n9q7-worker-0-jbskz -- chroot /host cat /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig | head -c 10
Starting pod/sregidor-up2-7n9q7-worker-0-jbskz-debug-vc8n6 ...
To use host binaries, run `chroot /host`
{"auths":{
Removing debug pod ...

After the upgrade, the file still exists

 oc debug node/sregidor-up2-7n9q7-worker-0-jbskz -- chroot /host head -c 10 /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig
Starting pod/sregidor-up2-7n9q7-worker-0-jbskz-debug-qh7wf ...
To use host binaries, run `chroot /host`
{"auths":{
Removing debug pod ...

Even if we re-configure the pull-secret, and we set an empty pull-secret, the file is not removed.

  1. Configure a MC using a file that exists in the machines inside /etc/ and has "config.json" suffix.

Look for that file:

Debug a worker node:

sh-5.1# find . -iname "*config.json" 2> /dev/null |grep -v storage
./run/openshift-sdn/cniserver/config.json
./sysroot/ostree/deploy/rhcos/var/lib/kubelet/config.json
./usr/etc/tpm2-tss/fapi-config.json
./var/lib/kubelet/config.json
./var/lib/kubelet/pods/b482e398-27f6-4dac-b8c0-6715c0010f99/volumes/kubernetes.io~secret/installation-pull-secrets/config.json
./var/lib/kubelet/pods/b482e398-27f6-4dac-b8c0-6715c0010f99/volumes/kubernetes.io~secret/installation-pull-secrets/..2023_06_28_13_26_35.4113272500/config.json
./etc/tpm2-tss/fapi-config.json
sh-5.1# cat ./etc/tpm2-tss/fapi-config.json
{
     "profile_name": "P_ECCP256SHA256",
     "profile_dir": "/etc/tpm2-tss/fapi-profiles/",
     "user_dir": "~/.local/share/tpm2-tss/user/keystore",
     "system_dir": "/var/lib/tpm2-tss/system/keystore",
     "tcti": "",
     "system_pcrs" : [],
     "log_dir" : "/run/tpm2-tss/eventlog/"
}

We will use /etc/tpm2-tss/fapi-config.json. We create a MC to replace the file in the machine

apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: worker
  name: test-fapi-config
spec:
  config:
    ignition:
      version: 3.1.0
    storage:
      files:
      - contents:
          source: data:text/plain;charset=utf-8;base64,ewoKCgoKCiAgICAgInByb2ZpbGVfbmFtZSI6ICJQX0VDQ1AyNTZTSEEyNTYiLAogICAgICJwcm9maWxlX2RpciI6ICIvZXRjL3RwbTItdHNzL2ZhcGktcHJvZmlsZXMvIiwKICAgICAidXNlcl9kaXIiOiAifi8ubG9jYWwvc2hhcmUvdHBtMi10c3MvdXNlci9rZXlzdG9yZSIsCiAgICAgInN5c3RlbV9kaXIiOiAiL3Zhci9saWIvdHBtMi10c3Mvc3lzdGVtL2tleXN0b3JlIiwKICAgICAidGN0aSI6ICIiLAogICAgICJzeXN0ZW1fcGNycyIgOiBbXSwKICAgICAibG9nX2RpciIgOiAiL3J1bi90cG0yLXRzcy9ldmVudGxvZy8iCn0KCg==
        filesystem: root
        mode: 0644
        path: /etc/tpm2-tss/fapi-config.json

The the configuration is applied without problems.

We see that there is no "orig" file created for this file:

sh-5.1# cat ./etc/tpm2-tss/fapi-config.json
{





     "profile_name": "P_ECCP256SHA256",
     "profile_dir": "/etc/tpm2-tss/fapi-profiles/",
     "user_dir": "~/.local/share/tpm2-tss/user/keystore",
     "system_dir": "/var/lib/tpm2-tss/system/keystore",
     "tcti": "",
     "system_pcrs" : [],
     "log_dir" : "/run/tpm2-tss/eventlog/"
}

sh-5.1# find . -iname "*orig" 2> /dev/null |grep fapi
sh-5.1# exit

When we remove the MC, the file is deleted. We can see these lines in the daemon logs

I0628 13:57:44.872194    2388 update.go:1250] Deleting stale data
I0628 13:57:44.872282    2388 update.go:1313] Removed stale file "/etc/tpm2-tss/fapi-config.json"

And the original file is lost:

sh-5.1# cat /etc/tpm2-tss/fapi-config.json 
cat: /etc/tpm2-tss/fapi-config.json: No such file or directory

My main concerns after the verification steps are:

  • When we upgrade a cluster to a version with this fix, the file /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig is still present in the cluster, and is not removed.

  • When we try to reconfigure any file that is present in the cluster and has the suffix "config.json", the file's original content is not tracked and can be eventually deleted. In the current verification steps we used "/etc/tpm2-tss/fapi-config.json", but since the OS versions will be evolving, in the future it can happen that more files like this one are affected. Maybe the current fapi-config file is not important, but it is possible that the ones in the future are.

Before adding the qe-appoved label I would like to make sure that those behaviors are expected/OK.

Thank you very much!

Copy link
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

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

Thanks Ines! The general approach makes sense to me, some comments:

When we upgrade a cluster to a version with this fix, the file /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig is still present in the cluster, and is not removed.

Agree with Sergio. I think eventually we want to remove the orig approach. We could make it such that we delete the orig file entirely for the pull secret even on upgrades as noted by Sergio's test process. I don't think it must be part of this PR though, so it depends on what you want to do @inesqyx

Also minor nit: if you can update the commit message to also have some of the context in your PR message, that would be good as well!

@@ -60,6 +61,12 @@ func createOrigFile(fromPath, fpath string) error {
return writeFileAtomicallyWithDefaults(noOrigFileStampName(fpath), nil)
}

// https://issues.redhat.com/browse/OCPBUGS-11437
Copy link
Contributor

Choose a reason for hiding this comment

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

When commenting a bug like this, it means that the code that follows is intended as a workaround, and we would want to remove the code at a later time.

I think that makes sense here, since we eventually want to fix the "orig file" implementation, either separately or eventually as part of layering. Maybe it would be good to mention that here? i.e. this code can be eventually superceded by a proper fix to the underlying problem

@@ -60,6 +61,12 @@ func createOrigFile(fromPath, fpath string) error {
return writeFileAtomicallyWithDefaults(noOrigFileStampName(fpath), nil)
}

// https://issues.redhat.com/browse/OCPBUGS-11437
// MCO keeps the pull secret to .orig file once it replaced
if strings.HasSuffix(fpath, "config.json") {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think like Sergio mentions, this probably should check specifically for the pull secret path and not just any config.json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, @sergiordlr and @yuqi-zhang for pointing this out. I have made the changes to more carefully point at the desired path, and yet to be tested.

@sergiordlr
Copy link

I set the jira status to "assigned" again, please, set it back to "post" when the PR is ready for verification again.

@inesqyx
Copy link
Contributor Author

inesqyx commented Jun 29, 2023

/retest-required

1 similar comment
@inesqyx
Copy link
Contributor Author

inesqyx commented Jun 29, 2023

/retest-required

@cgwalters
Copy link
Member

I think we can more categorically exclude everything in /var from the .orig treatment btw, as a big part of the idea here is that /var starts out empty on ostree systems.

That would avoid hardcoding anything relating to the pull secret.

@openshift-ci-robot
Copy link
Contributor

@inesqyx: This pull request references Jira Issue OCPBUGS-11437, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

  • OCPBUGS11437
    The pull secret is preserved in the path /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig. Whereas, the user needs it to be deleted when the pull secret is being deleted/ replaced.
  • What is the problem
    There is complaint about that the MCD is creating orig files to preserve files that should not be preserved. To be more specific, the orig preserving system should only preserve files that are originally on the disk, but are now preserving files that are written by Ignition. The root cause is that Ignition writes the files before the MCD takes the control as a result when MCD comes in, it sees all the files written before as files on disk, which is very wrong.
  • What I did
    Add more constraints for orig file generation: orig files should only be generated on files that 1) claimed by the rpm 2) exist in the usr/etc directory 3) exist before MCD takes control
  • How to verify it
    Ignition writes files in the /var directory. And now when cat into the orig folder for the MCD, there is no var folder, meaning that files written by Ignition are not preserved now. Specific example would be that catting into /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdori will now return no so such file

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.

@inesqyx inesqyx force-pushed the OCPBUGS11437-workaround2 branch 2 times, most recently from f28b928 to 7e615b5 Compare July 5, 2023 15:07
@inesqyx
Copy link
Contributor Author

inesqyx commented Jul 7, 2023

/retest-required

@inesqyx
Copy link
Contributor Author

inesqyx commented Jul 7, 2023

/retest-required

@inesqyx
Copy link
Contributor Author

inesqyx commented Aug 29, 2023

/retest-required

1 similar comment
@inesqyx
Copy link
Contributor Author

inesqyx commented Aug 29, 2023

/retest-required

@inesqyx
Copy link
Contributor Author

inesqyx commented Aug 29, 2023

/test unit

Copy link
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

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

some nits on logs and comments, otherwise lgtm!

@@ -45,12 +46,80 @@ func noOrigFileStampName(fpath string) string {
return filepath.Join(noOrigParentDir(), fpath+".mcdnoorig")
}

func isFileOwnedByRPMPkg(fpath string) (bool, bool, error) {
// The first bool returned indicated whether the underlying OS is Mac
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: for clarity purposes, maybe something like:

The first bool returns false if rpm exists, and true otherwise (indicating other Linux distros or Mac). We would like to skip orig file creation and preservation

}
} else if isMac {
// Run on Mac
klog.Infof("Running on Mac,skip orig file preservation.")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: same as above, I think rephrase to "rpm binary not found", and change the references from Mac to "rpmNotFound" or similar, I think that's more clear in case someone gets this error on a non-fedora/rhel machine for some reason

}
} else if isMac {
// Run on Mac
klog.Infof("Running on Mac,skip file restoration.")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: same as above

assert.Nil(t, errr)
assert.Nil(t, errr)
// fileNotOwnedMsg := "not owned"
// if strings.Contains(string(out), fileNotOwnedMsg) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: remove unused code

assert.Nil(t, err)
// Check whether the given path is owned by an rpm pkg
cmd := exec.Command(path, "-qf", path)
_, errr := cmd.CombinedOutput()
Copy link
Contributor

Choose a reason for hiding this comment

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

just curious, why is this errr? Why not just _, err = cmd.CombinedOutput()

@rioliu-rh
Copy link

@inesqyx @yuqi-zhang any update on this PR? we have a automation PR depends on this one. https://github.com/openshift/openshift-tests-private/pull/11128
/cc @sergiordlr

@inesqyx
Copy link
Contributor Author

inesqyx commented Sep 6, 2023

@inesqyx @yuqi-zhang any update on this PR? we have a automation PR depends on this one. openshift/openshift-tests-private#11128 /cc @sergiordlr

Hey, Rio! I am back from the PTO and sorry for the late reply. I will have the changes in place and make it through in a day or so. Should be quick. Thanks for the reminder!

@inesqyx
Copy link
Contributor Author

inesqyx commented Sep 6, 2023

/retest-required

…are claimed by the rpm; delete all incorrectly preserved orig files and create noorigs for them
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 6, 2023

@inesqyx: 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/okd-scos-e2e-aws-ovn 1cebf67 link false /test okd-scos-e2e-aws-ovn

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/test-infra repository. I understand the commands that are listed here.

Copy link
Contributor

@yuqi-zhang yuqi-zhang 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 for the fixes! @rioliu-rh would you say this is a critical fix then? Merging to master (4.14) is currently blocked unless it can be considered a critical fix

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 6, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 6, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inesqyx, yuqi-zhang

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:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 6, 2023
@inesqyx
Copy link
Contributor Author

inesqyx commented Sep 7, 2023

/retest-required

@openshift-bot
Copy link
Contributor

/jira refresh

The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target different OCP), recalculating validity.

@openshift-ci-robot openshift-ci-robot added jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. and removed jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Sep 8, 2023
@openshift-ci-robot
Copy link
Contributor

@openshift-bot: This pull request references Jira Issue OCPBUGS-11437, which is invalid:

  • expected the bug to target the "4.15.0" version, but it targets "4.14.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

The requirements for Jira bugs have changed (Jira issues linked to PRs on main branch need to target different OCP), recalculating validity.

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.

@inesqyx
Copy link
Contributor Author

inesqyx commented Sep 10, 2023

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 10, 2023
@openshift-ci-robot
Copy link
Contributor

@inesqyx: This pull request references Jira Issue OCPBUGS-11437, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @rioliu-rh

In response to this:

/jira refresh

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.

@openshift-merge-robot openshift-merge-robot merged commit f7333c4 into openshift:master Sep 18, 2023
@openshift-ci-robot
Copy link
Contributor

@inesqyx: Jira Issue OCPBUGS-11437: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-11437 has been moved to the MODIFIED state.

In response to this:

  • OCPBUGS11437
    The pull secret is preserved in the path /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdorig. Whereas, the user needs it to be deleted when the pull secret is being deleted/ replaced.
  • What is the problem
    There is complaint about that the MCD is creating orig files to preserve files that should not be preserved. To be more specific, the orig preserving system should only preserve files that are originally on the disk, but are now preserving files that are written by Ignition. The root cause is that Ignition writes the files before the MCD takes the control as a result when MCD comes in, it sees all the files written before as files on disk, which is very wrong.
  • What I did
    Add more constraints for orig file generation: orig files should only be generated on files that 1) claimed by the rpm 2) exist in the usr/etc directory 3) exist before MCD takes control
  • How to verify it
    Ignition writes files in the /var directory. And now when cat into the orig folder for the MCD, there is no var folder, meaning that files written by Ignition are not preserved now. Specific example would be that catting into /etc/machine-config-daemon/orig/var/lib/kubelet/config.json.mcdori will now return no so such file

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.

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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants