Debian: Delete datanetwork request shows Auditlogging exception in sysinv-api.log
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
João Victor Portal |
Bug Description
Brief Description
-----------------
Debian: Delete datanetwork request shows Auditlogging exception in "sysinv-api.log".
Severity
--------
Minor.
Steps to Reproduce
------------------
1)login to horizon ui and create a data network
2)verify that a POST request is logged to /var/log/
sysinv 2022-05-25 16:04:22.766 78038 INFO sysinv.
3)now modify the datanetwork and verify that patch request is logged to /var/log/
sysinv 2022-05-25 16:04:30.901 78038 INFO sysinv.
sysinv 2022-05-25 16:04:39.479 78038 INFO sysinv.
4)Now try deleting the datanetwork and an exception is shown in the /var/log/
sysinv 2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
2022-05-25 16:04:54.242 78038 ERROR sysinv.
Expected Behavior
------------------
POST,PATCH,DELETE request should be logged without any errors
Actual Behavior
----------------
DELETE request throws exception in the /var/log/
Reproducibility
---------------
100% reproducible.
System Configuration
-------
AIO-SX.
Branch/Pull Time/Commit
-------
N/A.
Last Pass
---------
N/A.
Timestamp/Logs
--------------
See section "Steps to Reproduce".
Test Activity
-------------
Feature Testing.
Workaround
----------
N/A.
Changed in starlingx: | |
status: | New → In Progress |
Changed in starlingx: | |
importance: | Undecided → Low |
assignee: | nobody → João Victor Portal (jvictorp) |
tags: | added: stx.7.0 stx.config stx.debian |
Reviewed: https:/ /review. opendev. org/c/starlingx /config/ +/848781 /opendev. org/starlingx/ config/ commit/ 8033aae4478712b c37bfdd0848e8e6 0df104f720
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 8033aae4478712b c37bfdd0848e8e6 0df104f720
Author: Joao Victor Portal <email address hidden>
Date: Tue Jul 5 17:34:00 2022 -0300
Ignore JSON decode error in request log.
For DELETE requests with no request body or "Content-Length" field, the rest_state. request, 'json')" would be request. json" would be an empty string. rest_state. request, 'json')" request. json" are throwing JSON decode exceptions in
expected return value for "hasattr(
False and for "rest_state.
Instead, what occurs is that both "hasattr(
and "rest_state.
this case. This change adds tolerance for this exception. This is done
because it is not know all the possible request conditions that may
cause this exception to be thrown.
Test Plan:
PASS: Successfully deploy an AIO-SX using a Debian image with this sysinv- api.log" no
commit present and, using horizon interface, create and delete a data
network, checking that in log file "/var/log/
exception was thrown in the delete request.
Closes-Bug: 1980842 790fa8011674a01 3bcd141a61e
Signed-off-by: Joao Victor Portal <email address hidden>
Change-Id: Ib9f72f3b2d4d60