<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-family: Verdana,Geneva,sans-serif'>
<p>On 2012-12-21 9:25, Paul Robert Marino wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<p>While in theory that sonds like a great idea I can see a few problems with doing it that way.<br /> 1) don't you have to re-enable the monitoring after the reboot<br /> 2) you have enter the actions in every time you push an update any way.<br /> 3) there is some planing being done to add a reboot requiered field in the future either throught the errata or the rpm itself the holdup is those are larger dicussions because they don't just effect spacewalk.</p>
<p>For this level of complexity I would either write a script that directly used the apis or use a full scheduler like jobscheduler from SOS Berlin.<br /> The scheduler rought is the more robust route because it will allow to define more robust workflows which could be triggered by spacewalk or vica versa</p>
<div class="gmail_quote">On Dec 21, 2012 7:54 AM, "Spacewalk User" <<a href="mailto:spacewalk@epperson.homelinux.net">spacewalk@epperson.homelinux.net</a>> wrote:<br />
<blockquote class="gmail_quote" style="margin: 0  0  0  .8ex; border-left: 1px  #ccc  solid; padding-left: 1ex;"><span style="text-decoration: underline;"></span>
<div style="font-family: Verdana,Geneva,sans-serif;">
<p>When pushing patches, I need to run remote commands both before and after the updates, but the UI seems to offer me only one or the other as part of the update.  Is there a way that I have not found to have both a pre- and a post- transaction command integral to the software update?</p>
<p>Specifics are that I need to send a "cease monitoring" e-mail to the network operations center and the server team duty manager, run the update, then reboot the system.  I can schedule one of the commands as a separate scheduled event, but that's not optimal.</p>
<p><br />Thanks for any tips anyone can offer.</p>
<p> </p>
<p>--j.</p>
<div> </div>
</div>
</blockquote>
</div>
</blockquote>
<p> </p>
<p>Thanks for the input.  Regarding 1), the message is to "discontinue monitoring until xx:xx hours on mm/dd/yy", with the time being the end of the approved change window.  At that point, monitoring resumes and an on-call gets a ticket if there are any issues.  On 2), yes, but it's a simple script paste for the message and "shutdown -r 0" for the reboot, so no big deal.  We do fairly large groups of servers, and it only has to be done once for each patch group.</p>
<p>Since we have to do change requests and have them approved, ideally we wouldn't have to send such a message, the monitoring team would check for change windows before opening tickets, but the monitoring team isn't on board with that.  Which is why I take some pleasure in sending them one message per server.  ;)</p>
<pre>Thus:<br />
HOST=`hostname`
IP=`/usr/bin/dig +short $HOST`
CHANGE="C9999999"
mail -s"$HOST $CHANGE: cease monitoring, ignore alerts" <a href="mailto:ngnotification@vak12ed.edu">notifications@example.com</a> << EOF
Server $HOST with IP $IP is having patches applied and will be rebooted per $CHANGE.  Please suspend monitoring until 12:00:00 hours on 12/23/2012, the end of the change window.x

EOF</pre>
<div> </div>
</body></html>