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

rpm-ostree doesnt enable kerne-debug-X.rpm installation

XMLWordPrintable

    • No
    • 1
    • Sprint 240 - Update&Remoting, Sprint 241 - Update&Remoting
    • 2
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • 8/22: task force issue, active w/ customer; KNIECO-7476

      Description of problem:

      I am trying to build an RHCOS layer for the following case #03497390 with a newer kernel version and debug mode enabled by using the following Containerfile:
      # Using a 4.12.21 image
      # export OCP_VERSION="4.12.21"
      # curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp/$OCP_VERSION/release.txt | grep -m1 'rhel-coreos-8' | awk -F ' ' '{print $2}'
      ARG rhel_coreos_release
      FROM ${rhel_coreos_release}
      RUN rpm-ostree cliwrap install-to-root /
      # Env
      ENV KERNEL_RPM="https://people.redhat.com/midu/.kernel-4.18.0-507.el8.x86_64/kernel-debug-4.18.0-507.el8.x86_64.rpm \
          https://people.redhat.com/midu/.kernel-4.18.0-507.el8.x86_64/kernel-debug-core-4.18.0-507.el8.x86_64.rpm \
          https://people.redhat.com/midu/.kernel-4.18.0-507.el8.x86_64/kernel-debug-modules-4.18.0-507.el8.x86_64.rpm \
          https://people.redhat.com/midu/.kernel-4.18.0-507.el8.x86_64/kernel-debug-modules-extra-4.18.0-507.el8.x86_64.rpm"
      # Install hotfix rpm
      RUN rpm-ostree override replace ${KERNEL_RPM} && \
          rpm-ostree cleanup -m && \
          cd /usr/lib/modules/4.18.0-507.el8.x86_64+debug/ && sed -i 's/\/boot\///g' .vmlinuz.hmac && \
          ostree container commit
      The issue encountered is the following:
      Use `rpm-ostree initramfs` to control client-side initramfs generation.
      rpm-ostree: Note: This system is image (rpm-ostree) based.
      rpm-ostree: Dropping privileges as `dracut` was executed with not "known safe" arguments.
      rpm-ostree: You may invoke the real `dracut` binary in `/usr/libexec/rpm-ostree/wrapped/dracut`.
      rpm-ostree: Continuing execution in 5 seconds.
      
      dracut: No permission to write to /boot.
      Found file: "var/lib/rpm-state/kernel/installing_core_4.18.0-507.el8.x86_64"
      error: Found content in var
      Error: error building at STEP "RUN rpm-ostree override replace ${KERNEL_RPM} &&     rpm-ostree cleanup -m &&     cd /usr/lib/modules/4.18.0-507.el8.x86_64+debug/ && sed -i 's/\/boot\///g' .vmlinuz.hmac &&     ostree container commit": error while running runtime: exit status 1
      while adapting the previous Containerfile to the following:
      # Using a 4.12.21 image
      # export OCP_VERSION="4.12.21"
      # curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp/$OCP_VERSION/release.txt | grep -m1 'rhel-coreos-8' | awk -F ' ' '{print $2}'
      ARG rhel_coreos_release
      FROM ${rhel_coreos_release}
      RUN rpm-ostree cliwrap install-to-root /
      # Env
      ENV KERNEL_RPM="https://people.redhat.com/midu/.kernel-4.18.0-507.el8.x86_64/kernel-debug-4.18.0-507.el8.x86_64.rpm \
          https://people.redhat.com/midu/.kernel-4.18.0-507.el8.x86_64/kernel-debug-core-4.18.0-507.el8.x86_64.rpm \
          https://people.redhat.com/midu/.kernel-4.18.0-507.el8.x86_64/kernel-debug-modules-4.18.0-507.el8.x86_64.rpm \
          https://people.redhat.com/midu/.kernel-4.18.0-507.el8.x86_64/kernel-debug-modules-extra-4.18.0-507.el8.x86_64.rpm"
      # Install hotfix rpm RUN rpm-ostree override replace ${KERNEL_RPM} && \
          rpm-ostree cleanup -m && rm -rf /var/* && \
          cd /usr/lib/modules/4.18.0-507.el8.x86_64+debug/ && sed -i 's/\/boot\///g' .vmlinuz.hmac && \
          ostree container commit
      
      the image its builed succesfully BUT once the layer its being applied to the OCP the new kernel its not loaded:
      [core@master0 ~]$ oc get mc | grep -i side
      master-side-kernel                          20m
      
      [core@master0 ~]$ uname -r
      4.18.0-372.58.1.el8_6.x86_64

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

      4.12.21

      How reproducible:

      100%

      Steps to Reproduce:

      1.
      2.
      3.
      

      Actual results:

       

      Expected results:

      I would expect to be able to load the debug kernel as the default kernel.

      Additional info:

       

              rhn-support-jmarrero Joseph Marrero Corchado
              midu@redhat.com Mihai IDU
              Michael Nguyen Michael Nguyen
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: