Bug 1878930 - [RFE] Provide warning event if MAC Address Pool free and available addresses are below threshold
Summary: [RFE] Provide warning event if MAC Address Pool free and available addresses ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.4.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ovirt-4.5.0
: 4.5.0
Assignee: eraviv
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-14 23:55 UTC by Germano Veit Michel
Modified: 2022-05-26 16:22 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-4.5.0
Doc Type: Enhancement
Doc Text:
Feature: Provide warning event if number of available MAC addresses in pool are below threshold. The threshold is configurable via engine-config. An event will be created per pool on engine start, and if the threshold is reached when consuming addresses from the pool. Reason: Make it easier for the admin user to plan ahead. Result: Admin will not be faced with an empty pool when creating VNICs on VMs.
Clone Of:
Environment:
Last Closed: 2022-05-26 16:22:27 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-engine pull 60 0 None open core: Warn on low remaining mac addresses in pool 2022-02-08 12:53:59 UTC
Red Hat Product Errata RHSA-2022:4711 0 None None None 2022-05-26 16:22:43 UTC

Description Germano Veit Michel 2020-09-14 23:55:08 UTC
Description of problem:

Currently the user suddenly hits a wall once the MAC Address Pool runs out of addresses, and vNICs fail to add.

~~~
    Cannot add Interface. Not enough MAC addresses left in MAC Address Pool.
~~~

It is not a good experience, because the is no previous warning, the problem appears suddenly when the pool is exhausted (too late).


Please implement some Warning Event, similar to already existing CPU/Network/Memory thresholds that warns the user via event in audit log that a MAC Pool available addresses left are below a certain threshold. For example:

~~~
   MAC Pool xxx utilization has exceeded the defined threshold [95%]
~~~

Or the other way around:

~~~
   MAC Pool xxx available addresses is below the defined threshold [5%]
~~~

The Threshold could be adjustable by engine-config, like the engine already has for other ones:

# engine-config -a | grep -i threshold
...
LogPhysicalMemoryThresholdInMB: 1024 version: general
LogMaxPhysicalMemoryUsedThresholdInPercentage: 95 version: general
LogMaxCpuUsedThresholdInPercentage: 95 version: general
LogMaxNetworkUsedThresholdInPercentage: 95 version: general
...

The check could be done in a timed interval, or on every allocation of MAC from pool (rate limited).


Note the engine already has something similar when it is restarted, although this doesn't seem to check addresses actually available, just free MACs on the pool itself:

2020-09-15 09:43:43,411+10 INFO  [org.ovirt.engine.core.bll.network.macpool.MacPoolPerCluster] (ServerService Thread Pool -- 49) [] Mac pool 58ca604b-017d-0374-0220-00000000014e has 65535 available free macs

We should have something similar that runs regularly and triggers a WARN at a configurable threshold.

Comment 1 Dominik Holler 2020-09-18 10:41:43 UTC
Germano, would be also the warning on a small absolute number of free MAC addresses helpful?
(I guess the implementation would be to check for a number free MAC address of a mac pool if they are unused globally, which would come at the cost of db usage.
To keep the count of db queries low, we should warn only late. And to avoid a unreadable threshold like 99.5% of the MAC pool, maybe something like 100 free MAC addresses would be more intuitive for the user.)

Comment 2 Germano Veit Michel 2020-09-20 22:15:51 UTC
(In reply to Dominik Holler from comment #1)
> Germano, would be also the warning on a small absolute number of free MAC
> addresses helpful?
> (I guess the implementation would be to check for a number free MAC address
> of a mac pool if they are unused globally, which would come at the cost of
> db usage.
> To keep the count of db queries low, we should warn only late. And to avoid
> a unreadable threshold like 99.5% of the MAC pool, maybe something like 100
> free MAC addresses would be more intuitive for the user.)

Makes sense to me. The only thing is if the user has small MAC pools it could
produce many warnings with a hard number. So if the '100' is configurable I think
this is a good solution.

Comment 6 Michael Burman 2022-03-22 09:02:29 UTC
Verified on - rhvm-4.5.0-0.237.el8ev.noarch

Comment 11 errata-xmlrpc 2022-05-26 16:22:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: RHV Manager (ovirt-engine) [ovirt-4.5.0] security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:4711


Note You need to log in before you can comment on or make changes to this bug.