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

Running systemd in CentOS 8 Stream container reports failed systemd-hostnamed.service

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

    • None
    • Moderate
    • rhel-plumbers
    • ssg_core_services
    • 5
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None
    • 57,005

      Description of problem:

      When running systemd in a container based on CentOS 8 Stream, the systemd-hostnamed.service is reported failed.

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

      systemd-239-76.el8.x86_64

      How reproducible:

      Deterministic.

      Steps to Reproduce:
      1. podman run --name centos-8-stream --rm -ti quay.io/centos/centos:stream8 /usr/sbin/init
      2. From another terminal
      podman exec centos-8-stream systemctl status systemd-hostnamed.service

      Actual results:

      systemd 239 (239-76.el8) running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=legacy)
      Detected virtualization container-other.
      Detected architecture x86-64.

      Welcome to CentOS Stream 8!

      Set hostname to <a73b28b84f63>.
      Initializing machine ID from container UUID.
      [ OK ] Listening on initctl Compatibility Named Pipe.
      [ OK ] Listening on Journal Socket.
      [ OK ] Reached target Local File Systems.
      -.slice: Failed to set memory.min: Operation not permitted
      -.slice: Failed to set memory.low: Operation not permitted
      -.slice: Failed to set memory.high: Operation not permitted
      -.slice: Failed to set memory.max: Operation not permitted
      -.slice: Failed to set memory.swap.max: Operation not permitted
      -.slice: Failed to set pids.max: Operation not permitted
      Starting Rebuild Dynamic Linker Cache...
      [ OK ] Started Forward Password Requests to Wall Directory Watch.
      [ OK ] Reached target Remote File Systems.
      [ OK ] Started Dispatch Password Requests to Console Directory Watch.
      [ OK ] Reached target Paths.
      [ OK ] Reached target Slices.
      [ OK ] Reached target Local Encrypted Volumes.
      Starting Read and set NIS domainname from /etc/sysconfig/network...
      Starting Rebuild Journal Catalog...
      Starting Create System Users...
      Starting Rebuild Hardware Database...
      [ OK ] Listening on Journal Socket (/dev/log).
      Starting Journal Service...
      [ OK ] Reached target Swap.
      [ OK ] Listening on Process Core Dump Socket.
      [ OK ] Started Rebuild Dynamic Linker Cache.
      [ OK ] Started Read and set NIS domainname from /etc/sysconfig/network.
      [ OK ] Started Rebuild Journal Catalog.
      [ OK ] Started Create System Users.
      [ OK ] Started Rebuild Hardware Database.
      Starting Update is Completed...
      [ OK ] Started Update is Completed.
      [ OK ] Started Journal Service.
      Starting Flush Journal to Persistent Storage...
      [ OK ] Started Flush Journal to Persistent Storage.
      Starting Create Volatile Files and Directories...
      [ OK ] Started Create Volatile Files and Directories.
      Starting Update UTMP about System Boot/Shutdown...
      [ OK ] Started Update UTMP about System Boot/Shutdown.
      [ OK ] Reached target System Initialization.
      [ OK ] Started Daily Cleanup of Temporary Directories.
      [ OK ] Listening on D-Bus System Message Bus Socket.
      [ OK ] Reached target Sockets.
      [ OK ] Started dnf makecache --timer.
      [ OK ] Reached target Timers.
      [ OK ] Reached target Basic System.
      [ OK ] Started D-Bus System Message Bus.
      Starting Network Manager...
      Starting Restore /run/initramfs on shutdown...
      [ OK ] Started Restore /run/initramfs on shutdown.
      [ OK ] Started Network Manager.
      [ OK ] Reached target Network.
      Starting Permit User Sessions...
      Starting Network Manager Wait Online...
      Starting Hostname Service...
      [FAILED] Failed to start Hostname Service.
      See 'systemctl status systemd-hostnamed.service' for details.
      [ OK ] Started Permit User Sessions.
      [ OK ] Reached target Multi-User System.
      Starting Update UTMP about System Runlevel Changes...
      [ OK ] Started Update UTMP about System Runlevel Changes.
      [ OK ] Started Network Manager Wait Online.
      Starting Network Manager Script Dispatcher Service...
      [ OK ] Reached target Network is Online.
      [ OK ] Started Network Manager Script Dispatcher Service.

      ● systemd-hostnamed.service - Hostname Service
      Loaded: loaded (/usr/lib/systemd/system/systemd-hostnamed.service; static; vendor preset: disabled)
      Active: failed (Result: exit-code) since Wed 2023-07-19 07:18:49 UTC; 32s ago
      Docs: man:systemd-hostnamed.service(8)
      man:hostname(5)
      man:machine-info(5)
      https://www.freedesktop.org/wiki/Software/systemd/hostnamed
      Process: 34 ExecStart=/usr/lib/systemd/systemd-hostnamed (code=exited, status=225/NETWORK)
      Main PID: 34 (code=exited, status=225/NETWORK)

      Jul 19 07:18:49 a73b28b84f63 systemd[1]: Starting Hostname Service...
      Jul 19 07:18:49 a73b28b84f63 systemd[34]: systemd-hostnamed.service: Failed to set up network namespacing: Operation not permitted
      Jul 19 07:18:49 a73b28b84f63 systemd[34]: systemd-hostnamed.service: Failed at step NETWORK spawning /usr/lib/systemd/systemd-hostnamed: Operation not permitted
      Jul 19 07:18:49 a73b28b84f63 systemd[1]: systemd-hostnamed.service: Main process exited, code=exited, status=225/NETWORK
      Jul 19 07:18:49 a73b28b84f63 systemd[1]: systemd-hostnamed.service: Failed with result 'exit-code'.
      Jul 19 07:18:49 a73b28b84f63 systemd[1]: Failed to start Hostname Service.

      Expected results:

      Nothing failing out of box.

      Additional info:

      On CentOS Stream 9 container with systems installed, the service reports

      ○ systemd-hostnamed.service - Hostname Service
      Loaded: loaded (/usr/lib/systemd/system/systemd-hostnamed.service; static)
      Drop-In: /usr/lib/systemd/system/systemd-hostnamed.service.d
      └─disable-privatedevices.conf
      Active: inactive (dead)
      Docs: man:systemd-hostnamed.service(8)
      man:hostname(5)
      man:machine-info(5)
      man:org.freedesktop.resolve1(5)

      With registry.access.redhat.com/ubi8-init the service reports

      ● systemd-hostnamed.service - Hostname Service
      Loaded: loaded (/usr/lib/systemd/system/systemd-hostnamed.service; static; vendor preset: disabled)
      Active: inactive (dead)
      Docs: man:systemd-hostnamed.service(8)
      man:hostname(5)
      man:machine-info(5)
      https://www.freedesktop.org/wiki/Software/systemd/hostnamed

              systemd-maint systemd maint mailing list
              rhn-engineering-jpazdziora Jan Pazdziora (Inactive)
              systemd maint mailing list systemd maint mailing list
              Frantisek Sumsal Frantisek Sumsal
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: