Changeset 2251 for trunk/scripts


Ignore:
Timestamp:
Mar 16, 2009, 8:26:19 PM (16 years ago)
Author:
price
Message:

outage-mail: small improvements, mostly update for tonight's outage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/outage/outage-mail

    r2250 r2251  
     1#!/usr/bin/python
    12import smtplib
    23from invirt.database import *
    34from email.mime.text import MIMEText
    45
    5 message = """One of the four XVM servers, aperture-science, spontaneously rebooted
    6 today at around 2:55 today. As of now, we're not sure what the cause of
    7 this was.
     6sender = 'Greg Price <price@mit.edu>'
     7sendername = sender.split()[0]
     8host = 'arklay-mansion'
    89
    9 Your VM %s was running on aperture-science. We have restarted it.
     10message = """\
     11One of the four XVM host servers, %s, failed tonight at
     12about 23:17 and was rebooted.  We're working to understand the cause.
     13
     14Your VM %%s was running on %s.  We have restarted it.
    1015
    1116We realize that this is an inconvenience for you, and we apologize for
    1217the unexpected downtime.
    1318
    14 - Evan
    15 for the XVM team"""
     19- %s
     20for the XVM team
     21""" % (host, host, sendername)
    1622
    17 vms = "nforrest0 remus ghost-of-golezan tabbott 6470 dh moo mclamb dt-web htns uav-team x lsmb twopi what esg panache gardiner mailman-acl jack-o-tron knowledge ephialtes ocaml happy-go-lucky maridia cochese ocelot ecprice bibix groovy r privoxy thebes intrepid-paravirt-test qren2 quentin woodrow prolix oculus shinnyih gkovacs".split()
     23vms = "amd64-test brain-trust cluster-test david-vista debathena-livecd-build ecprice gradbook greg-ns1 greg-ns2 groovy htns iodine jsoltren latex liftm medkaz mhd mksvn niska polarix price-lenny price-test8 qren2 shawn-of-awesome staxowax tdc tdc-secure thesecrete tor transistor watmap".split()
    1824
    1925def send_mail(vm):
     
    2531    msg['CC'] = 'XVM <xvm@mit.edu>'
    2632    msg['Reply-To'] = 'XVM <xvm@mit.edu>'
    27     msg['From'] = 'Evan Broder <broder@mit.edu>'
     33    msg['From'] = sender
    2834    msg['Subject'] = '[xvm] Unexpected reboot of your VM %s' % vm
    29     s.sendmail('Evan Broder <broder@mit.edu>',
     35    s.sendmail(sender,
    3036        [contact, 'xvm@mit.edu'],
    3137        msg.as_string())
Note: See TracChangeset for help on using the changeset viewer.