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

dnf-automatic does not send email when /usr is full

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-8.10
    • dnf
    • rhel-sst-cs-software-management
    • ssg_core_services
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

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

      When /usr is full, dnf-automatic does not run properly (as dnf exits prematurely), and no email is sent notifying the user about what happened.

      What is the impact of this issue to you?

      The user has no notification about what why dnf-automatic did not run.

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

      dnf-automatic-4.7.0-20.el8.noarch (the component list in Jira does not list a "dnf-automatic" component).

      How reproducible is this bug?:

      Every time

      Steps to reproduce

      1. Set up a RHEL system where /usr is a separate partition
      2. Ensure there is something for dnf to upgrade
      3. Ensure dnf-automatic is configured to send email, e.g.:
        # cat /etc/dnf/automatic.conf
        [commands]
        upgrade_type = default
        random_sleep = 0
        network_online_timeout = 60
        download_updates = yes
        apply_updates = yes
        [emitters]
        emit_via = stdio
        [email]
        email_from = root@localhost
        email_to = root@localhost
        email_host = localhost
        [command]
        [command_email]
        command_format = "mail -Ssendwait -s {subject} -r {email_from} {email_to}"
        stdin_format = "{body}"email_from = root@localhost
        email_to = root@localhost
        [base]
        debuglevel = 1
         
      1. Fill up /usr, e.g.:
      dd if=/dev/random of=/usr/filler
      1. systemctl start dnf-automatic

      Expected results

      An email (or the configured notification method) should be sent, detailing why dnf did not run.

      Actual results

      No notification about the problem is sent. The only relevant system logs in the journal are:

      Oct 09 04:18:35 r810-dnfauto systemd[1]: Starting dnf automatic...
      Oct 09 04:18:36 r810-dnfauto dnf-automatic[7237]: Updating Subscription Management repositories.
      Oct 09 04:18:45 r810-dnfauto dnf-automatic[7237]: Last metadata expiration check: 0:15:00 ago on Wed 09 Oct 2024 04:03:45 AM EDT.
      Oct 09 04:18:50 r810-dnfauto dnf-automatic[7237]: Running transaction check
      Oct 09 04:18:52 r810-dnfauto dnf-automatic[7237]: Transaction check succeeded.
      Oct 09 04:18:52 r810-dnfauto dnf-automatic[7237]: Running transaction test
      Oct 09 04:18:52 r810-dnfauto dnf-automatic[7237]: The downloaded packages were saved in cache until the next successful transaction.
      Oct 09 04:18:52 r810-dnfauto dnf-automatic[7237]: You can remove cached packages by executing 'dnf clean packages'.
      Oct 09 04:18:52 r810-dnfauto dnf-automatic[7237]: Error: Transaction test error:
      Oct 09 04:18:52 r810-dnfauto dnf-automatic[7237]:   installing package bash-4.4.20-5.el8.x86_64 needs 8MB on the /usr filesystem
      Oct 09 04:18:52 r810-dnfauto dnf-automatic[7237]: Error Summary
      Oct 09 04:18:52 r810-dnfauto dnf-automatic[7237]: -------------
      Oct 09 04:18:52 r810-dnfauto dnf-automatic[7237]: Disk Requirements:
      Oct 09 04:18:52 r810-dnfauto dnf-automatic[7237]:    At least 8MB more space needed on the /usr filesystem.
      Oct 09 04:18:52 r810-dnfauto systemd[1]: dnf-automatic.service: Main process exited, code=exited, status=1/FAILURE
      Oct 09 04:18:52 r810-dnfauto systemd[1]: dnf-automatic.service: Failed with result 'exit-code'.
      Oct 09 04:18:52 r810-dnfauto systemd[1]: Failed to start dnf automatic.

              packaging-team-maint packaging-team-maint
              rhn-support-jsantos Juan Santos
              packaging-team-maint packaging-team-maint
              Software Management QE Software Management QE
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: