Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acknowledge fault using ucsmsdk #231

Closed
licohe opened this issue Jul 25, 2023 · 5 comments
Closed

Acknowledge fault using ucsmsdk #231

licohe opened this issue Jul 25, 2023 · 5 comments

Comments

@licohe
Copy link

licohe commented Jul 25, 2023

Hello,

Trying to figure out how to acknowledge fault using ucsmsdk.

Here is an example of what I tried:

filter_str = '(id, "7987950")'
sp = handle.query_classid(class_id="FaultInst", filter_str=filter_str)[0]
sp.ack = 'yes'
handle.set_mo(sp)
handle.commit()

Here is an output of the fault object before setting ack=yes:
`Managed Object : FaultInst

class_id :FaultInst
ack :no
cause :health-minor
change_set :
child_action :None
code :F1705
created :2023-03-12T00:52:26.895
descr :RAS Event (10) : Please check the Health tab for more details
dn :sys/chassis-5/blade-2/mgmt/health/fault-F1705
highest_severity :minor
id :7987950
last_transition :2023-03-12T00:52:26.895
lc :
occur :1
orig_severity :minor
prev_severity :minor
rn :fault-F1705
rule :mgmt-health-status-health-minor-issue
sacl :None
severity :minor
status :None
tags :
type :management`

Here is an output of the fault object after setting ack=yes:
`Managed Object : FaultInst

class_id :FaultInst
ack :yes
cause :health-minor
change_set :
child_action :None
code :F1705
created :2023-03-12T00:52:26.895
descr :RAS Event (10) : Please check the Health tab for more details
dn :sys/chassis-5/blade-2/mgmt/health/fault-F1705
highest_severity :minor
id :7987950
last_transition :2023-03-12T00:52:26.895
lc :
occur :1
orig_severity :minor
prev_severity :minor
rn :fault-F1705
rule :mgmt-health-status-health-minor-issue
sacl :None
severity :minor
status :modified
tags :
type :management`

I don't receive any response or error but the alert is not getting acknowledged on UCS.
Python 3.10.5
ucsmsdk 0.9.14
UCS 4.2(1m)

Thanks,

@dsoper2
Copy link
Contributor

dsoper2 commented Aug 7, 2023

What does a Copy XML of the fault show in UCSM:

image

The API call above does ack=yes the fault in my enviornment, but most faults won't actually clear in UCSM unless the fault condition itself is actually cleared.

@licohe
Copy link
Author

licohe commented Aug 11, 2023

@dsoper2 ,
I tested it again and the value not changing to 'yes' also on the xml:
image

I don't receive any errors when making the call so I can't say if something is wrong.
Thanks,

@dsoper2
Copy link
Contributor

dsoper2 commented Aug 16, 2023

I'm seeing the issue in additional testing and I'll file an internal bug since this looks to be a back-end UCSM issue and not something with the SDK.

@vvb
Copy link
Member

vvb commented Oct 9, 2023

This is a side-effect of an issue with UCSM schema. FaultInst Object is not allowed in the request(UCSM-IN.xsd), but only in the response(UCSM-OUT.xsd). We will add a work-around for this in the ucsmsdk while the UCSM backend fixes this. A fix should be shortly available in the next ucsmsdk release.

@vvb
Copy link
Member

vvb commented Oct 12, 2023

0.9.16 fixes this.

@vvb vvb closed this as completed Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants