Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-97443

Image mode: dir /var/named for bind is not created in image mode

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • rhel-10.2
    • rhel-9.6, rhel-10.0
    • bind
    • bind-9.18.33-11.el10
    • No
    • Moderate
    • rhel-net-perf
    • 0
    • False
    • False
    • Hide

      None

      Show
      None
    • Yes
    • None
    • Requested
    • None
    • Bug Fix
    • Hide
      Cause: /var/named contained files not present in other directories: named.ca, named.localhost, named.loopback, named.empty
      Consequence: when bind were used in image mode image, it could not recreate files missing in /var/named. The service failed to start, because it requires those files.
      Fix: Those files were moved into /usr/share/named directory and named.ca into /etc/named.ca file. In original place are instead only symlinks leading to their new location. If files or /var/named directory is missing, it will be created by systemd-tmpfiles on boot.
      Result: Original installations should not be affected and image mode usage of bind becomes possible.
      Show
      Cause: /var/named contained files not present in other directories: named.ca, named.localhost, named.loopback, named.empty Consequence: when bind were used in image mode image, it could not recreate files missing in /var/named. The service failed to start, because it requires those files. Fix: Those files were moved into /usr/share/named directory and named.ca into /etc/named.ca file. In original place are instead only symlinks leading to their new location. If files or /var/named directory is missing, it will be created by systemd-tmpfiles on boot. Result: Original installations should not be affected and image mode usage of bind becomes possible.
    • Proposed
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      Installing bind package on a machine already deployed in image-mode.

      dir /var/named is not present

      Please provide the package NVR for which the bug is seen:

      bind-9.18.33-3.el10.x86_64

      How reproducible is this bug?:

      always

      Steps to reproduce

      1. Run machine in IM
        tmt run provision -h virtual --image http://images.osci.redhat.com/RHEL-10.1-image-mode-x86_64.qcow2 login
      2. Create Containerfile and build it
        bash-5.2# cat Containerfile 
        FROM images.paas.redhat.com/testingfarm/rhel-bootc:10.1
        RUN dnf -y install bind && dnf -y clean all
        bash-5.2# podman build -t localhost/test .
        bash-5.2# bootc switch --transport containers-storage localhost/test
        bash-5.1# reboot

                 $ tmt run --last login

             3. bash-5.2# rpm -q bind
                 bind-9.18.33-3.el10.x86_64
                 bash-5.2# rpm -V bind
                 .....
                 missing     /var/named
                 missing     /var/named/data
                 missing     /var/named/dynamic
                 missing   c /var/named/named.ca
                 missing   c /var/named/named.empty
                 missing   c /var/named/named.localhost
                 missing   c /var/named/named.loopback
                 missing     /var/named/slaves

      Expected results

      All dirs and files in /var/ are created.

              pemensik@redhat.com Petr Mensik
              rh-ee-mbezokon Miluse Bezo Konecna
              Petr Mensik Petr Mensik
              Petr Sklenar Petr Sklenar
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: