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

smartd does not start if systemd uses DefaultLimitNOFILE = infinity

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Major Major
    • rhel-9.4
    • rhel-9.2.0
    • smartmontools
    • None
    • smartmontools-7.2-9.el9
    • None
    • Moderate
    • rhel-sst-cs-system-management
    • ssg_core_services
    • 21
    • 24
    • 5
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • No
    • None
    • All
    • None

      When you set DefaultLimitNOFILE = infinity (uint_max). The smartd service is not able to start b/c the above limit. This is bound to the closer of the FDs where we running trough the "sysconf(_SC_OPEN_MAX)"

      h3. What were you trying to do that didn't work?
      start smartd service:
      h3. Please provide the package NVR for which bug is seen:
      smartmontools-7.2-6.el9.x86_64
      h3. How reproducible:
      everytime
      
      h3. Steps to reproduce
      install smartmon tools
      set the DefaultLimitNOFILE = infinity in /etc/systemd/system.conf
      
      
      h3. Expected results
      smartd fails to start
      h3. Actual results
      smartd starts
      
      
      FIX:
      ~~~
      [root@fastvm-rhel-9-2-uefi-21 ~]# systemctl cat smartd.service 
      # /usr/lib/systemd/system/smartd.service
      [Unit]
      Description=Self Monitoring and Reporting Technology (SMART) Daemon
      Documentation=man:smartd(8) man:smartd.conf(5)
      ConditionVirtualization=no
      
      [Service]
      Type=notify
      LimitNOFILE=1024
      EnvironmentFile=-/etc/sysconfig/smartmontools
      ExecStart=/usr/sbin/smartd -n $smartd_opts
      ExecReload=/bin/kill -HUP $MAINPID
      
      [Install]
      WantedBy=multi-user.target
      ~~~
      Above will override the the systemd limits but maybe we do not need to iterate over all possible FDs in first place
      
      

              mhlavink Michal Hlavinka
              rhn-support-lherbolt Lukas Herbolt
              Michal Hlavinka Michal Hlavinka
              Evgeny Fedin Evgeny Fedin
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: