Skip to content

Conversation

@openshift-cherrypick-robot

This is an automated cherry-pick of #1022

/assign rphillips

@openshift-ci-robot
Copy link
Contributor

@openshift-cherrypick-robot: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

Details

In response to this:

[release-4.1] pkg/controller/kubelet-config: fix owener reference

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 openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 20, 2019
@rphillips
Copy link
Contributor

/retitle [release-4.1] Bug 1743160: pkg/controller/kubelet-config: fix owener reference

@openshift-ci-robot openshift-ci-robot changed the title [release-4.1] pkg/controller/kubelet-config: fix owener reference [release-4.1] Bug 1743160: pkg/controller/kubelet-config: fix owener reference Aug 20, 2019
@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Aug 20, 2019
@openshift-ci-robot
Copy link
Contributor

@openshift-cherrypick-robot: This pull request references Bugzilla bug 1743160, which is invalid:

  • expected the bug to target the "4.1.z" release, but it targets "4.2.0" instead

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

Details

In response to this:

[release-4.1] Bug 1743160: pkg/controller/kubelet-config: fix owener reference

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.

@rphillips
Copy link
Contributor

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Aug 20, 2019
@openshift-ci-robot
Copy link
Contributor

@rphillips: This pull request references Bugzilla bug 1743160, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

/bugzilla 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.

@rphillips
Copy link
Contributor

/cc @runcom @sjenning

@mrunalp
Copy link
Member

mrunalp commented Aug 20, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 20, 2019
@runcom
Copy link
Member

runcom commented Aug 20, 2019

/approve

cc @derekwaynecarr

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrunalp, openshift-cherrypick-robot, runcom

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-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 20, 2019
@eparis
Copy link
Member

eparis commented Aug 20, 2019

The BZ should 'depend on' and 4.2 bz and that 4.2 bz needs to be VERIFIED by QE.
probably need to clone the BZ, fix the 'blocks' / 'depends on' relationship between the 2 bugs. Fix the target release on the 2 bugs. Fix the title in #1022 to point to the 4.2 bug. Wait for QE to VERIFY the 4.2 bug.

@rphillips
Copy link
Contributor

/retitle [release-4.1] Bug 1743771: pkg/controller/kubelet-config: fix owener reference

@openshift-ci-robot openshift-ci-robot changed the title [release-4.1] Bug 1743160: pkg/controller/kubelet-config: fix owener reference [release-4.1] Bug 1743771: pkg/controller/kubelet-config: fix owener reference Aug 20, 2019
@rphillips
Copy link
Contributor

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot removed the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 20, 2019
@openshift-ci-robot
Copy link
Contributor

@rphillips: This pull request references Bugzilla bug 1743771, which is invalid:

  • expected dependent Bugzilla bug 1743160 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), but it is MODIFIED instead

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

Details

In response to this:

/bugzilla 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-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Aug 20, 2019
@openshift openshift deleted a comment from openshift-ci-robot Aug 20, 2019
@runcom
Copy link
Member

runcom commented Aug 22, 2019

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Aug 22, 2019
@openshift-ci-robot
Copy link
Contributor

@runcom: This pull request references Bugzilla bug 1743771, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

/bugzilla 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.

@eparis eparis added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Aug 24, 2019
@openshift-merge-robot openshift-merge-robot merged commit e17ddba into openshift:release-4.1 Aug 24, 2019
@openshift-ci-robot
Copy link
Contributor

@openshift-cherrypick-robot: All pull requests linked via external trackers have merged. Bugzilla bug 1743771 has been moved to the MODIFIED state.

Details

In response to this:

[release-4.1] Bug 1743771: pkg/controller/kubelet-config: fix owener reference

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.

wking added a commit to wking/machine-config-operator that referenced this pull request Jul 5, 2022
When da5184f (Move Ignition file generation to controller/common,
fix Compression, 2022-04-29, openshift#3128) created the NewIgnFileBytes*
helpers, the call-sites which had previously explicitly set file modes
began leaving them unset.  Updating from 4.10 to 4.11 and picking up
da5184f, clusters which include ContainerRuntimeConfig (or possibly
KubeletConfig) which flow through the NewIgnFileBytes* helpers would
have rendered MachineConfig entries with null/unset mode values.

While this is not a problem for Ignition v3 clients, where there is an
explicit 0644 default:

  $ git clone --depth 1 --branch main https://github.com/coreos/ignition.git
  $ cd ignition
  $ git --no-pager log --oneline -1
  7652b83 (grafted, HEAD -> main, origin/main, origin/HEAD) Merge pull request openshift#1409 from bgilbert/notes
  $ git --no-pager grep '_mode_.*file' docs
  docs/configuration-v3_0.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420). Setuid/setgid/sticky bits are not supported. If not specified, the permission mode for files defaults to 0644 or the existing file's permissions if `overwrite` is false, `contents.source` is unspecified, and a file already exists at the path.
  docs/configuration-v3_1.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420). Setuid/setgid/sticky bits are not supported. If not specified, the permission mode for files defaults to 0644 or the existing file's permissions if `overwrite` is false, `contents.source` is unspecified, and a file already exists at the path.
  docs/configuration-v3_2.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420). Setuid/setgid/sticky bits are not supported. If not specified, the permission mode for files defaults to 0644 or the existing file's permissions if `overwrite` is false, `contents.source` is unspecified, and a file already exists at the path.
  docs/configuration-v3_3.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420). Setuid/setgid/sticky bits are not supported. If not specified, the permission mode for files defaults to 0644 or the existing file's permissions if `overwrite` is false, `contents.source` is unspecified, and a file already exists at the path.
  docs/configuration-v3_4_experimental.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420). Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644 or the existing file's permissions if `overwrite` is false, `contents.source` is unspecified, and a file already exists at the path.

it is a problem for Ignition v2 clients, where there is no such default:

  $ git clone --depth 1 --branch spec2x https://github.com/coreos/ignition.git
  $ cd ignition
  $ git --no-pager log --oneline -1
  4db553d (grafted, HEAD -> spec2x, origin/spec2x) Merge pull request openshift#1067 from bgilbert/spec2y
  $ git --no-pager grep '_mode_.*file' doc
  doc/configuration-v2_0.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420).
  doc/configuration-v2_1.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420).
  doc/configuration-v2_2.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420).
  doc/configuration-v2_3.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420).
  doc/configuration-v2_4.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420).
  doc/configuration-v2_5-experimental.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420).

There is also no in-cluster component responsible for updating boot
image configuration, or even complaining about stale boot image
configuration, in Machines or MachineSets.  This causes problems when
4.10 clusters with older boot images (at least older than 4.6 [1], I
haven't pinned down a specific version):

1. Cluster updates to 4.11.
2. Incoming machine-config operator renders fresh MachineConfig from
   any ContainerRuntimeConfig or KubeletConfig.
3. Those rendered MachineConfig contain null/unset modes.
4. A new Machine is created with the old Ignition v2 boot image.
5. The boot image Ignition lays down a file with mode 0, because
   Ignition v2 does not define a default mode.
6. The boot image pivots into the modern machine-os-content image.
7. The incoming (modern) machine-config daemon notices the mode 0
   file, compares it with its Ignition-v3-like 0644 default mode, and
   complains with [2]:

     unexpected on-disk state validating against rendered-worker-44f2c74623e4d3bbe9557a9e82102c01: mode mismatch for file: "/etc/crio/crio.conf.d/01-ctrcfg-pidsLimit"; expected: -rw-r--r--/420/0644; received: ----------/0/0

Folks should probably update to more modern boot images, but this
commit restores the explicit mode to avoid breaking on this
mode-mismatch issue for folks who are still running Ignition v2 boot
images.

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=2102004#c28
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=2102004#c0
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/machine-config-operator that referenced this pull request Jul 6, 2022
When da5184f (Move Ignition file generation to controller/common,
fix Compression, 2022-04-29, openshift#3128) created the NewIgnFileBytes*
helpers, the call-sites which had previously explicitly set file modes
began leaving them unset.  Updating from 4.10 to 4.11 and picking up
da5184f, clusters which include ContainerRuntimeConfig (or possibly
KubeletConfig) which flow through the NewIgnFileBytes* helpers would
have rendered MachineConfig entries with null/unset mode values.

While this is not a problem for Ignition v3 clients, where there is an
explicit 0644 default:

  $ git clone --depth 1 --branch main https://github.com/coreos/ignition.git
  $ cd ignition
  $ git --no-pager log --oneline -1
  7652b83 (grafted, HEAD -> main, origin/main, origin/HEAD) Merge pull request openshift#1409 from bgilbert/notes
  $ git --no-pager grep '_mode_.*file' docs
  docs/configuration-v3_0.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420). Setuid/setgid/sticky bits are not supported. If not specified, the permission mode for files defaults to 0644 or the existing file's permissions if `overwrite` is false, `contents.source` is unspecified, and a file already exists at the path.
  docs/configuration-v3_1.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420). Setuid/setgid/sticky bits are not supported. If not specified, the permission mode for files defaults to 0644 or the existing file's permissions if `overwrite` is false, `contents.source` is unspecified, and a file already exists at the path.
  docs/configuration-v3_2.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420). Setuid/setgid/sticky bits are not supported. If not specified, the permission mode for files defaults to 0644 or the existing file's permissions if `overwrite` is false, `contents.source` is unspecified, and a file already exists at the path.
  docs/configuration-v3_3.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420). Setuid/setgid/sticky bits are not supported. If not specified, the permission mode for files defaults to 0644 or the existing file's permissions if `overwrite` is false, `contents.source` is unspecified, and a file already exists at the path.
  docs/configuration-v3_4_experimental.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420). Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644 or the existing file's permissions if `overwrite` is false, `contents.source` is unspecified, and a file already exists at the path.

it is a problem for Ignition v2 clients, where there is no such default:

  $ git clone --depth 1 --branch spec2x https://github.com/coreos/ignition.git
  $ cd ignition
  $ git --no-pager log --oneline -1
  4db553d (grafted, HEAD -> spec2x, origin/spec2x) Merge pull request openshift#1067 from bgilbert/spec2y
  $ git --no-pager grep '_mode_.*file' doc
  doc/configuration-v2_0.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420).
  doc/configuration-v2_1.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420).
  doc/configuration-v2_2.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420).
  doc/configuration-v2_3.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420).
  doc/configuration-v2_4.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420).
  doc/configuration-v2_5-experimental.md:    * **_mode_** (integer): the file's permission mode. Note that the mode must be properly specified as a **decimal** value (i.e. 0644 -> 420).

There is also no in-cluster component responsible for updating boot
image configuration, or even complaining about stale boot image
configuration, in Machines or MachineSets.  This causes problems when
4.10 clusters with older boot images (at least older than 4.6 [1], I
haven't pinned down a specific version):

1. Cluster updates to 4.11.
2. Incoming machine-config operator renders fresh MachineConfig from
   any ContainerRuntimeConfig or KubeletConfig.
3. Those rendered MachineConfig contain null/unset modes.
4. A new Machine is created with the old Ignition v2 boot image.
5. The boot image Ignition lays down a file with mode 0, because
   Ignition v2 does not define a default mode.
6. The boot image pivots into the modern machine-os-content image.
7. The incoming (modern) machine-config daemon notices the mode 0
   file, compares it with its Ignition-v3-like 0644 default mode, and
   complains with [2]:

     unexpected on-disk state validating against rendered-worker-44f2c74623e4d3bbe9557a9e82102c01: mode mismatch for file: "/etc/crio/crio.conf.d/01-ctrcfg-pidsLimit"; expected: -rw-r--r--/420/0644; received: ----------/0/0

Folks should probably update to more modern boot images, but this
commit restores the explicit mode to avoid breaking on this
mode-mismatch issue for folks who are still running Ignition v2 boot
images.

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=2102004#c28
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=2102004#c0
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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants