HPE SimpliVity
cancel
Showing results for 
Search instead for 
Did you mean: 

OVC Shutdown through REST API

 
bbelew
Occasional Contributor

OVC Shutdown through REST API

To get it out of the way my scripting skills are not the best.

With that taken care of I was wondering if anyone has worked with the Simplivity REST API to shutdown the OVC's in a cluster.  We are trying to script shutting down all resources in a certain cluster for emergency events such as a building power outage.  I'm able to successfully shutdown the 1st OVC but I am unable to shutdown the 2nd OVC in our cluster because of the need to do a force shutdown for HA sync.  Below is a snippet of the code where I'm telling it to not wait for HA.  

 

$body1 = @{'ha_wait' = 'false'}
$body1 = $body1 | ConvertTo-Json

$url = $BASE_URL+'hosts/' + $uid + '/shutdown_virtual_controller'
Invoke-RestMethod -ContentType 'application/vnd.simplivity.v1+json' -Uri $url -Header $header -Body $body1 -Method Post

 

The result I get with this is shutdown_status @{status=FAILURE}

If I set 'ha_wait' = 'true' then the 2nd OVC will start to shutdown but it never gets past the Wait for HA storage Compliance.

3 REPLIES 3
LiamP
Advisor

Re: OVC Shutdown through REST API

The normal procedure without using the RestAPI, is to use the force flag after the first OVC has powered off, so the same should apply when scripting.

https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-sv11955en_us&docLocale=en_US

What version of HPe SimpliVity software are you running?

 

LiamP
Advisor

Re: OVC Shutdown through REST API

Can you also try using the interactive Rest API to narrow the focus to the probable cause?

bbelew
Occasional Contributor

Re: OVC Shutdown through REST API

We are on version 3.7.8.

Yeah if I do a force shutdown through the GUI or command line using svt-shutdown-force it shuts down fine.

I also did try through the interactive Rest API and set ha_wait: false but I get the same error of shutdown_status = FAILURE.