<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>UCSPS code to run a pending reboot?</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=4590299" />
  <subtitle>UCSPS code to run a pending reboot?</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=4590299</id>
  <updated>2013-05-24T14:53:15Z</updated>
  <dc:date>2013-05-24T14:53:15Z</dc:date>
  <entry>
    <title>RE: UCSPS code to run a pending reboot?</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5837180" />
    <author>
      <name>David Peel</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5837180</id>
    <updated>2012-06-07T15:34:24Z</updated>
    <published>2012-06-07T15:34:24Z</published>
    <summary type="html">Hi There,
 
I'm very new to UCS, and currently tpoc'ing UCSM 2.0(q); so not 100% if this is relevent to you?
 
Here's one possible code snippet for performing this task with 0.9.8 Powertools. (least what I have been able to determine so far)
 
Note: You must trigger the restart via UCSM; otherwise it does not know a restart has occured.......it's a "feature" of the DME/AG/MIT automagic :-)
 
# Loop through each SP requiring acknowledgement
${lsAcks} = Get-UcsLsmaintAck -OperState "waiting-for-user" 
   
 foreach (${lsAck} in ${lsAcks})
{
     # perform any activity on host prior to reboot here. i.e. put vmHost into maintenance mode etc.

     # Acknowledge Maintenance Acknowlwedgement to progress reboot
     Set-UcsLsmaintAck -LsmaintAck ${lsAck} -AdminState "trigger-immediate"
    
     # Wait for UCS state change; reboot triggered
     ${lsAck} | Watch-Ucs -Property OperState -SuccessValue pending-next-boot -PollSec 30 -TimeoutSec 600
   
 }
 
Hope this helps?
Dave</summary>
    <dc:creator>David Peel</dc:creator>
    <dc:date>2012-06-07T15:34:24Z</dc:date>
  </entry>
  <entry>
    <title>UCSPS code to run a pending reboot?</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4590298" />
    <author>
      <name>Jose Moreno</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4590298</id>
    <updated>2011-10-11T19:24:19Z</updated>
    <published>2011-10-11T19:24:19Z</published>
    <summary type="html">Hi there,
 
I am trying to code the pending reboot of a server. The maintenance policy of a service profile is configure to "User acknowledgement". That service profile has been modified (new vnic added), and now there is a pending reboot to make. Rebooting the OS or resetting the service profile does not clear the pending action (and the new vnic has not been added), so I am running out of ideas.
 
I wanted to test with Get-Schedule, but unfortunately my UCSPE 1.4 does not support this method, does it?
 
Thanks in advance,
Jose</summary>
    <dc:creator>Jose Moreno</dc:creator>
    <dc:date>2011-10-11T19:24:19Z</dc:date>
  </entry>
</feed>

