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

IBU x->y->z with no rhcos delta results in ostree corruption

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • None
    • 4.14, 4.15, 4.16
    • RHCOS
    • Low
    • No
    • 3
    • 251 - Core Packages, 252 - Core Packages, 253 - Core Packages, 254 - Core Packages, 255 - Core Packages, 256 - Core Packages
    • 6
    • False
    • Hide

      None

      Show
      None
    • Hide
      Previously, if a new deployment was done at the OSTree level on the host, which is identical to the current deployment but on a different stateroot, OSTree saw them as equal. This behavior prevented updating the bootloader when the `set-default` command was invoked, because OSTree did not recognize the two stateroots as a differentiating factor for deployments. With this release, OSTree logic is modified to consider the stateroots. As a result, this allows OSTree to properly set the default deployment to a new deployment that has different stateroots. (link:https://issues.redhat.com/browse/OCPBUGS-30276[*OCPBUGS-30276*])
      Show
      Previously, if a new deployment was done at the OSTree level on the host, which is identical to the current deployment but on a different stateroot, OSTree saw them as equal. This behavior prevented updating the bootloader when the `set-default` command was invoked, because OSTree did not recognize the two stateroots as a differentiating factor for deployments. With this release, OSTree logic is modified to consider the stateroots. As a result, this allows OSTree to properly set the default deployment to a new deployment that has different stateroots. (link: https://issues.redhat.com/browse/OCPBUGS-30276 [* OCPBUGS-30276 *])
    • Bug Fix
    • Done

      Description of problem:

          We previously ran into issues running an IBU from X to Y, where X and Y have the same rhcos base image (OCPBUGS-25951). A workaround was found to resolve the issue in this scenario. However, an additional issue has been found when running consecutive IBUs from X to Y and then Y to Z, where Y and Z have the same rhcos base image.
      
      In the Y to Z upgrade, the pull-local and deploy commands are successful, with the workaround in place from OCPBUGS-25951. However, once we run the ostree admin set-default command, we get the following error:
      
      loading sysroot: Parsing deployment /ostree/boot.1/rhcos_4.15.0_rc.8/827728895611cec1dd1d51a4e88e64d96a0dbf0fbcb8dbd0d85e5d9634691ff8/0 in stateroot rhcos_4.15.0_rc.8: readlinkat: No such file or directory
      
      The Y and Z deployments have the same base rhcos image, same kernel, and the same bootloader config options, but are in separate stateroots. The deployment_bootconfigs_equal function in ostree-sysroot-deploy.c, however, doesn't look at the stateroot, so it returns TRUE when comparing them. When the deployments are swapped by the set-default command, the bootserials are modified and new symlinks are created. But since deployment_bootconfigs_equal returns true, the ostree_sysroot_write_deployments_with_options function does not update the bootloader config. After this point, ostree is unable to parse the deployment references from the bootloader config files as they are stale.
      
      As a workaround, LCA has been updated to include an unused karg when running the deploy command (ibu=$VERSION). This ensures that the boot config options will be unique between deployments, so that set-default updates the bootloader config.
      
      

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

          

      How reproducible:

          

      Steps to Reproduce:

          1.
          2.
          3.
          

      Actual results:

          

      Expected results:

          

      Additional info:

          

            rhn-support-jmarrero Joseph Marrero Corchado
            dpenney1@redhat.com Don Penney
            Huijing Hei Huijing Hei
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: