Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-12919

The MCD has a non-functional pivot command that should be deprecated

    • Low
    • No
    • False
    • Hide

      None

      Show
      None

      This is a clone of issue OCPBUGS-7836. The following is the description of the original issue:

      Description of problem:

      The MCDaemon has a codepath for "pivot" used in older versions, and then as part of solutions articles to initiate a direct pivot to an ostree version, mostly used when things fail.
      
      As of 4.12 this codepath should no longer work due to us switching to new format OSImage, so we should fully deprecate it.
      
      This is likely where it fails:
      https://github.com/openshift/machine-config-operator/blob/ecc6bf3dc21eb33baf56692ba7d54f9a3b9be1d1/pkg/daemon/rpm-ostree.go#L248

      Version-Release number of selected component (if applicable):

      4.12+

      How reproducible:

      Not sure but should be 100%

      Steps to Reproduce:

      1. Follow https://access.redhat.com/solutions/5598401
      2.
      3.
      

      Actual results:

      fails

      Expected results:

      MCD telling you pivot is deprecated

      Additional info:

       

            [OCPBUGS-12919] The MCD has a non-functional pivot command that should be deprecated

            Michael Burke added a comment - Changes are live: https://docs.openshift.com/container-platform/4.12/nodes/nodes/nodes-nodes-machine-config-daemon-metrics.html#machine-config-daemon-metrics_machine-config-operator

            The PR was pre-merge verified and it has been merged too. We move the status to VERIFIED.

            Sergio Regidor de la Rosa added a comment - - edited The PR was pre-merge verified and it has been merged too. We move the status to VERIFIED.

            jerzhang@redhat.com djoshy Can you PTAL at my PR that leaves the alert and removes the `$ oc debug node/<node> – chroot /host journalctl -u pivot.service` command? The only reference to the pivot service that I see. Thanks in advance!!
            https://github.com/openshift/openshift-docs/pull/60289

            Michael Burke added a comment - jerzhang@redhat.com djoshy Can you PTAL at my PR that leaves the alert and removes the `$ oc debug node/<node> – chroot /host journalctl -u pivot.service` command? The only reference to the pivot service that I see. Thanks in advance!! https://github.com/openshift/openshift-docs/pull/60289

            Yu Qi Zhang added a comment -

            Thanks! I think the error/alert is still relevant, but pivot should no longer exist as a service or binary. i.e.
            `$ oc debug node/<node> – chroot /host journalctl -u pivot.service`
            I think this line is out of date, hmm, where is it coming from again? I don't think the MCO is setting this at least. Was it somewhere in the base OS definition or packages shipped by the CoreOS team?

             

            We should remove all references to pivot as a systemd unit or binary at the very least. It looks like we have a dropin for pivot.service in the MCO defined but no actual pivot service, so I wonder if that still exists at all

            Yu Qi Zhang added a comment - Thanks! I think the error/alert is still relevant, but pivot should no longer exist as a service or binary. i.e. `$ oc debug node/<node> – chroot /host journalctl -u pivot.service` I think this line is out of date, hmm, where is it coming from again? I don't think the MCO is setting this at least. Was it somewhere in the base OS definition or packages shipped by the CoreOS team?   We should remove all references to pivot as a systemd unit or binary at the very least. It looks like we have a dropin for pivot.service in the MCO defined but no actual pivot service, so I wonder if that still exists at all

            David Joshy added a comment -

            Hi mburke@redhat.com I believe the pivot metric/error is still relevant - it is used to indicate errors during rpm-ostree rebase. What we're doing in this bug, is to take away the "pivot" switch that customers would use to jump to a different OStree version; it no longer works in 4.12+ due to the image format change. Perhaps the error/metric could be renamed to something else so it isn't tied to the "old" way of doing it.

            Please correct me if I'm wrong here jerzhang@redhat.com

             

             

            David Joshy added a comment - Hi mburke@redhat.com I believe the pivot metric/error is still relevant - it is used to indicate errors during rpm-ostree rebase. What we're doing in this bug, is to take away the "pivot" switch that customers would use to jump to a different OStree version; it no longer works in 4.12+ due to the image format change. Perhaps the error/metric could be renamed to something else so it isn't tied to the "old" way of doing it. Please correct me if I'm wrong here jerzhang@redhat.com !     

            Should this metric be removed from the end-user docs? Is it related to the deprecated pivot codepath?

            |`mcd_pivot_err*`
            |`[]string{"err", "node", "pivot_target"}`
            |Logs errors encountered during pivot. *
            |Pivot errors might prevent OS upgrades from proceeding.
            For further investigation, run this command to access the node and see all its logs:
            `$ oc debug node/<node> -- chroot /host journalctl -u pivot.service`
            Alternatively, you can run this command to only see the logs from the `machine-config-daemon` container:
            `$ oc logs -f -n openshift-machine-config-operator machine-config-daemon-<hash> -c machine-config-daemon`
            

            I ran the command :

             oc debug node/ip-10-0-163-53.us-west-2.compute.internal -- chroot /host journalctl -u pivot.service
            Temporary namespace openshift-debug-qcb8z is created for debugging node...
            Starting pod/ip-10-0-163-53us-west-2computeinternal-debug ...
            To use host binaries, run `chroot /host`
            -- No entries --

             

            Michael Burke added a comment - Should this metric be removed from the end-user docs? Is it related to the deprecated pivot codepath? |`mcd_pivot_err*` |`[]string{ "err" , "node" , "pivot_target" }` |Logs errors encountered during pivot. * |Pivot errors might prevent OS upgrades from proceeding. For further investigation, run this command to access the node and see all its logs: `$ oc debug node/<node> -- chroot /host journalctl -u pivot.service` Alternatively, you can run this command to only see the logs from the `machine-config-daemon` container: `$ oc logs -f -n openshift-machine-config- operator machine-config-daemon-<hash> -c machine-config-daemon` I ran the command :  oc debug node/ip-10-0-163-53.us-west-2.compute.internal -- chroot /host journalctl -u pivot.service Temporary namespace openshift-debug-qcb8z is created for debugging node... Starting pod/ip-10-0-163-53us-west-2computeinternal-debug ... To use host binaries, run `chroot /host` -- No entries --  

            Sergio Regidor de la Rosa added a comment - Pre-merge verified in: https://github.com/openshift/machine-config-operator/pull/3690#issuecomment-1536511164

              team-mco Team MCO
              openshift-crt-jira-prow OpenShift Prow Bot
              Sergio Regidor de la Rosa Sergio Regidor de la Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: