#restart secd

1 messages · Page 1 of 1 (latest)

gilded forum
#

Good morning, I am trying to setup a script to restart secd on all our netapp nodes due to the bug with secd running out of handles.

Does anyone know a way to do this? I have been trying with invoke-ncssh but "diag secd restart -node <blah>" requires a confirmation and I can't find a way to get past that. Any help would be appreciated!

vast niche
#

This is more of an #1062049169520476220 question of “how can I execute this command non-interactively?” Once I get to my keyboard I will get the syntax, if no one else responds before me.

gilded forum
#

Thank you!

vast niche
#
onPrem::> diag ?

Error: "diag" is not a recognized command

onPrem::>

Here is is: set diagnostic -confirmations off ; secd restart -node node-name

gilded forum
#

I will give that a try, thank you

#

so if I understand correctly, I should be able to run this command through an ssh connection and it should emulate what powershell would do?

vast niche
#

non-interactive SSH, Powershell ncssh (REST/ZAPI as appropriate), or REST directly, it should work and the confirmations (the interactive part) are turned off first, then subsequent command 'just runs'.

gilded forum
#

maybe I am doing something wrong then. I have a connection into the netapp that I am testing and then issuing invoke-ncssh 'set diag -c off;secd restart -node node'

#

and it just hangs

#

if I try to do that command interactively in ssh it still gives the confirmation for secd restart

vast niche
#

Oh, that's not the 'standard' confirmation.... That's different.

#

You're probably better off using expect to handle this specific automation.

gilded forum
#

yeah, I had considered expect

#

I was just hoping there was an easier way 😄

#

Thank you for your time sir, I appreciate it.

vast niche
#

Yea, this is the type of activity that we'd intentionally make a little more difficult to perform.

gilded forum
#

I understand, just in the current version of ontap there is a bug that causes outages unless secd is restarted daily.

vast niche
#

What's the bug ID?

gilded forum
#

contap-155703

vast niche
#

I don't want to leave this hanging, so this is where I sit: honestly I'm not comfortable assisting further with this particular request on this platform. I don't know if there will be any other side effects of doing this in an automated format. I would want to look for a way to determine an outage is about to happen like parsing for a specific error in the logs or events before simply executing.

I don't believe PowerShell can perform the SSH interactions required. Expect, Python Expect, or even the Ansible Expect package can handle this.

Feel free to use the All-Virtual Labs provided by https://labondemand.netapp.com to develop and test against. These labs cannot have the expiration extended, but you can have as many as you want back-to-back. It's where I, albeit poorly, tested the initial syntax provided.

gilded forum
#

Thank you for following up. I got expect working and we restart nightly. We were doing it manually for a few weeks but that just wasn't a good solution.