Bug #24093

Getting "disk is % full" warnings even for < 90%

Added by Daniel Lobato Garcia about 3 years ago. Updated about 3 years ago.

Target version:
Bugzilla link:
Fixed in Releases:
Found in Releases:


Copied from


When I log into foreman is see the red dot at the bell symbol. There is a notification “Proxies - 1 New Event -’s disk is 12% full. Since this proxy is running Pulp, it needs disk space to publish content views. Please ensure the disk does not get full.”

I don’t really see the point of this notification when there is still plenty of disk space available.

Expected outcome:

No notification, but only when disk space is maybe 90% full.

Foreman and Proxy versions:


Foreman and Proxy plugin versions:

Katello 3.6.0

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]

Associated revisions

Revision 6d90fb6e (diff)
Added by Daniel Lobato Garcia about 3 years ago

Fixes #24093 - Notification is sent only when disk > 90%

Here’s what happens for a proxy where the disk 12% full:

When the code runs, percentage 12% is < 90%.
The notification does not exist, therefore:

percentage[0..2].to_i < 90 && notification_already_exists?(proxy)
true && false
false # so it does not skip the loop

The next line tries to update old notifications. Since
there are no notifications at this point,
update_notifications(proxy).empty? is true.

Finally it creates the notification (at this point we
have a notification for proxy ‘’ full at 12%).

After that, the job is scheduled, and when it runs (12h later):

The percentage is less than 90, 12%, and the notification
already exists. At this point Foreman is happy and proceeds
to remove the notification.

percentage[0..2].to_i < 90 && notification_already_exists?(proxy) # evaluates to
true && true

For the next 12h, we don’t have the notification.
Now, 12h later… GOTO beginning of the post :wink:
Basically right before creating the notification I added a check
for > 90% full. The rest of the logic should be fine.


#1 Updated by The Foreman Bot about 3 years ago

  • Assignee set to Daniel Lobato Garcia
  • Status changed from New to Ready For Testing
  • Pull request added

#2 Updated by Andrew Kofink about 3 years ago

  • Legacy Backlogs Release (now unused) set to 338

#3 Updated by Anonymous about 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF