BMC: Audit_interval was not validated for under 10 seconds

Bug #1853513 reported by Anujeyan Manokeran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Won't Fix
Low
Eric MacDonald

Bug Description

Brief Description
-----------------

 Audit_interval was not validated for under 10 seconds by sysinv. Below Audit_interval was provision with 0 seconds. Due to this Hwmond is reporting too frequent request. Below logs from hwmon.log .

2019-11-21T19:21:13.812 [102980.00564] controller-0 hwmond mon hwmonHttp.cpp (1030) hwmonHttp_server_handler:Error : HTTP Event error:400 ; cmd:PATCH url:/v1/isensorgroups/75b89e73-7cc2-4d01-a636-732ed7490b01 response:{ "status" : "fail","reason" : "Requested sensor audit interval is too frequent","action" : "Please use value larger than 10 secs."}
system host-sensor-modify 1 182ddfab-720c-42df-aaaf-3277d7291f2d audit_interval=0

system host-sensor-show 1 182ddfab-720c-42df-aaaf-3277d7291f2d
+-------------------------+--------------------------------------+
| Property | Value |
+-------------------------+--------------------------------------+
| actions_critical | alarm |
| actions_major | log |
| actions_minor | ignore |
| algorithm | debounce-1.v1 |
| audit_interval | 0 |
| capabilities | {} |
| created_at | 2019-11-19T17:32:43.781548+00:00 |
| datatype | discrete |
| path | |
| sensor_action_requested | |
| sensorname | 12V |
| sensortype | voltage |
| state | enabled |
| state_requested | None |
| status | ok |
| suppress | False |
| updated_at | 2019-11-21T18:52:55.850552+00:00 |
| uuid | 182ddfab-720c-42df-aaaf-3277d7291f2d |
+-------------------------+--------------------------------------+

b3f28fee199ae3b198c7a369360d96c] [Expiry: 2019-11-21 20:06:32]
2019-11-21T19:21:13.812 [102980.00563] controller-0 hwmond mon hwmonSensor.cpp (2041) group_modify : Warn : controller-0 invalid audit interval (0:0)
2019-11-21T19:21:13.812 [102980.00564] controller-0 hwmond mon hwmonHttp.cpp (1030) hwmonHttp_server_handler:Error : HTTP Event error:400 ; cmd:PATCH url:/v1/isensorgroups/75b89e73-7cc2-4d01-a636-732ed7490b01 response:{ "status" : "fail","reason" : "Requested sensor audit interval is too frequent","action" : "Please use value larger than 10 secs."}
~
search

Severity
--------
Major

Steps to Reproduce
------------------

1. Modify the audit_interval less than 10 seconds and verify error message not allowing less than 10 seconds.
system host-sensor-modify 1 182ddfab-720c-42df-aaaf-3277d7291f2d audit_interval=0

Expected Behavior
------------------
Validate any value less than 10 seconds for audit_interval is rejected.

Actual Behavior
----------------

As per description sysinve is not validating less than 10 seconds for audit_interval is accepted.

Reproducibility
---------------
Reproducible 100%

System Configuration
--------------------
Simplex
Lab-name:
SM-1

Branch/Pull Time/Commit
-----------------------
2019-11-18_20-00-00

Last Pass
---------

Timestamp/Logs
--------------
2019-11-21T18:52:54.000

Test Activity
-------------
Feature Testing

Tags: stx.metal
Revision history for this message
Anujeyan Manokeran (anujeyan) wrote :
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Low / not gating - related to semantic checking of user-provided input

tags: added: stx.metal
Changed in starlingx:
importance: Undecided → Low
status: New → Triaged
assignee: nobody → Eric MacDonald (rocksolidmtce)
Revision history for this message
Eric MacDonald (rocksolidmtce) wrote :

This is a system inventory issue that I'm quite willing to fix.

The CLI seems to permit changing the audit interval at the sensor level which is not supported. The audit interval is common to an entire sensor model and modifiable from any sensor group.

The fix is to remove the audit interval member at the sensor level or to change the CLI to not permit its modification and display at the sensor level.

Again, Audit interval applies to the entire sensor model and is displayed and modified at the sensor group level.

Revision history for this message
John Kung (john-kung) wrote :

No progress on this bug for more than 2 years. Candidate for closure.

If there is no update, this issue is targeted to be closed as 'Won't Fix' in 2 weeks.

Revision history for this message
Eric MacDonald (rocksolidmtce) wrote :

Fine by me. Close now if you like.

Jim Beacom (jbeacom)
Changed in starlingx:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.