added actionlist_template to display action list consistently on different pages
[monitor.git] / monitor / wrapper / emailTxt.py
1 #
2 # Copyright (c) 2004  The Trustees of Princeton University (Trustees).
3 #
4 # Faiyaz Ahmed <faiyaza@cs.princeton.edu>
5 #
6 # $Id: emailTxt.py,v 1.10 2007/08/29 17:26:50 soltesz Exp $
7
8
9
10 # This file contains the texts of the automatically generated
11 # emails sent to techs and PIs
12 #
13
14 class mailtxt:
15
16         thankyou=("""Thank you for helping maintain your PlanetLab nodes - %(loginbase)s""",
17         """
18 While monitoring your site, we noticed that the following nodes *improved*
19 their states:
20
21 %(hostname_list)s  
22 Often, system administration is a thankless job, but not today. :-)
23
24 Thank you!
25   -- %(plc_name)s (%(support_email)s)
26
27 Legend:
28 PROD-      This state is the production state where the node can contact PlanetLab, 
29            and install slices from users.
30 DEBUG-     This state designates a node that could not boot successfully.
31 OLDBOOTCD- This state corresponds to the situation where an oldbootcd prevented 
32            the normal operation of the node.
33 ERROR-     This is an error state, where there is absolutely no contact 
34            with PlanetLab.
35         """)
36
37 #############################################################################
38 #############################################################################
39 #############################################################################
40
41         pcumissing_notice =("""There is no PCU available to reboot %(hostname)s""",
42 """We've noticed that there is no PCU associated with %(hostname)s, so we could 
43 not reboot it ourselves.
44
45 By taking a few moments now to register your PCU for this host, you will save
46 time in the future the next time we need to reboot this machine, because we
47 will be able to do so without disturbing you.
48
49     http://%(plc_hostname)s/registerwizard/index.php
50
51 The registration is very quick.  All we need are: PCU hostname, IP, username, 
52 and password.  Then, choose which node to associate it with, and we will take 
53 care of the rest.
54
55 Thank you very much for your help,
56   -- %(plc_name)s (%(support_email)s)
57 """)
58
59         pcuerror_notice=("""Please help us configure your PCU: %(pcu_name)s""",
60 """During our standard monitoring of your site we noticed that the following
61 PCU is misconfigured:
62
63     %(pcu_name)s
64         %(pcu_errors)s
65 You can learn more details about the problem by visiting the link below.
66
67     https://%(monitor_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
68
69 If you need to change the PCU configuration in the PLC database:
70
71     https://%(plc_hostname)s/db/sites/pcu.php?id=%(plc_pcuid)s
72
73 We would like to save you time by taking care of as many administrative situations for your site's machines as possible without disturbing you.  Errors like these prevent us from being able to remotely administer your machines, and so we must solicit your help using messages like these.
74
75 So, any help and time that you can offer now to help us remotely administer your machines will pay off for you in the future.
76
77 Thank you very much for your help,
78   -- %(plc_name)s (%(support_email)s)
79 """)
80
81         pcufailed_notice =("""Could not use PCU to reboot %(hostname)s""",
82
83 """We tried to use the PCU registered for %(hostname)s, but for some reason the host did not come back online.  This may be for several reasons, and you can learn more by visiting this link:
84
85     %(pcu_name)s
86
87     https://%(monitor_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
88
89 We need your help resolving this issue in a few ways:  
90
91  1. First, we need your help rebooting %(hostname)s.  Because the above PCU does 
92     not appear to work, please manually reboot this machine.  If it turns out 
93     that there is a problem with the PCU configuration, we can help you
94     resolve that independently.
95
96  2. If it is possible, please correct the above PCU problem, or let us know
97     what steps you are taking.  By enabling us to take administrative actions
98     automatically without your intervention, you will save time in the future 
99     the next time we need to reboot this machine, because we will be able to 
100     do so without disturbing you.
101
102  3. If there is nothing apparently wrong with the PCU, or the mapping between
103     the PCU and the host, then there is likely a problem with our bootstrap
104     software on your machine.  To help us, please make a note of any text on
105     the console and report it to mailto:%(support_email)s .  An example
106     might be that the console hangs waiting for a module to unload.  The last
107     reported name or any error messages on the screen would be very helpful.
108
109 If the PCU is up and running, but behind a firewall, please make it accessible
110 from address block 128.112.139.0/24.  You can confirm that this is the address
111 space from which the %(plc_name)s servers run.
112
113 Thank you very much for your help,
114   -- %(plc_name)s (%(support_email)s)
115 """)
116
117         online_notice=("""Host %(hostname)s is online""",
118         """
119 This notice is simply to let you know that:
120     %(hostname)s
121
122 is online and operational.  
123
124     http://%(monitor_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
125
126 Thank you very much for your help!
127   -- %(plc_name)s (%(support_email)s)
128         """)
129         test_notice=("""Host %(hostname)s is testing""",
130         """
131 This notice is simply to test whether notices work.
132     %(hostname)s
133
134 Thank you very much for your help!
135         """)
136         retry_bootman=("""Running BootManager on %(hostname)s""",
137         """
138 This notice is simply to let you know that:
139     %(hostname)s
140
141 appears stuck in a debug mode.  To try to correct this, we're trying to rerun BootManager.py.  
142 If any action is needed from you, you will recieve additional notices.  Thank you!
143         """)
144         firewall_notice=("""Host %(hostname)s blocked by a firewall""",
145         """
146 This notice is simply to let you know that:
147     %(hostname)s
148
149 has some ports that appear to be blocked, making the node unusable.  While
150 some ports are open, a fully functional node needs all ports accessible at all
151 times.  Please see the following for the list of requirements for hosting a
152 node:
153
154     http://www.planet-lab.org/hosting
155
156 We will consider the node 'DOWN' until the ports are unblocked.
157
158 Please investigate and let us know if there's anything we can do to help get
159 it back on-line.  You can see more information about the current status of
160 this host here:
161
162     http://%(monitor_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
163
164 Thank you very much for your help,
165   -- %(plc_name)s (%(support_email)s)
166         """)
167         down_notice=("""Host %(hostname)s is down""",
168         """
169 This notice is simply to let you know that:
170     %(hostname)s
171
172 is down, disconnected from the network and/or non-operational.  
173
174 Please investigate, and let us know if there's anything we can do to help get
175 it back on-line.  You can see more information about the current status of
176 this host here:
177
178     http://%(monitor_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
179
180 Thank you very much for your help,
181   -- %(plc_name)s (%(support_email)s)
182         """)
183
184         clear_penalty=("""All privileges restored to site %(loginbase)s""",
185         """
186 This notice is to let you know that any privileges previously reduced at your 
187 site have been restored: %(penalty_level)s.
188
189 All privileges are restored.  You may create slices again, and if your 
190 slices were disabled, please allow up to 30 minutes for them to return to 
191 enabled.
192
193     http://%(monitor_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
194
195 Thank you very much for your help,
196   -- %(plc_name)s (%(support_email)s)
197
198 Legend:
199
200    0 - no penalties applied
201   -1 - site is disabled.  no new slices can be created.
202   -2 - all existing slices will be disabled.
203         """)
204
205         increase_penalty=("""Privilege reduced for site %(loginbase)s""",
206         """
207 This notice is to let you know that the privileges granted to your site as
208 a participating member of Planetlab have reduced: %(penalty_level)s.
209
210 Your privileges will be reduced corresponding to the legend below.  To 
211 restore these privileges, please return at least two machines to working 
212 state.
213
214     http://%(monitor_hostname)s/monitor/pcuview?loginbase=%(loginbase)s
215
216 Thank you very much for your help,
217   -- %(plc_name)s (%(support_email)s)
218   
219 Legend:
220
221    0 - no penalties applied
222   -1 - site is disabled.  no new slices can be created.
223   -2 - all existing slices will be disabled.
224 """)
225
226         newbootcd_notice=("""Host %(hostname)s needs a new BootImage""", """
227 We noticed the following node has an out-dated BootImage: 
228
229     %(hostname)s  
230
231 This usually implies that you need to update the BootImage and node
232 configuration file stored on the read-only media (either the all-in-one ISO
233 CD, floppy disk, or write-protected USB stick).
234
235 You can do this by walking through the steps of the registration wizard, and
236 downloading a new BootImage for your machine.
237
238     https://%(plc_hostname)s/registerwizard/index.php
239
240 Thank you for your help,
241   -- %(plc_name)s (%(support_email)s)
242 """)
243
244         noblockdevice_notice=("""Cannot Detect Disks on %(hostname)s""", 
245 """As part of PlanetLab node monitoring, we noticed that we were not able to detect any hard disks in your machine.  
246
247     %(hostname)s  
248
249 This may be the case for a number of reasons:
250     * the hardware is very new and needs a new driver,
251     * the hardware is very old is no longer supported,
252     * the hard disk was physically removed, 
253     * the hard disk cable is loose or disconnected,
254
255 Please help us investigate and let us know if there is anything that we can do to assist in getting your machine up and running again.
256
257 Thank you for your help,
258   -- %(plc_name)s (%(support_email)s)
259 """)
260
261         newalphacd_notice=("""New Boot Images for %(hostname)s""", 
262 """As part of PlanetLab node monitoring, we noticed that we were not able to recognize all the hardware in your machine.  This means that either it is so new that it needs a new BootCD, or that it is so old that it is no longer supported.
263
264     %(hostname)s  
265
266 To make this process as simple as possible, we have created All-in-One boot images that include the node configuration file.  
267
268 The only step that you need to take is to choose which media you prefer, either CD ISO, or USB image for each host.
269
270 %(url_list)s
271
272 Instructions to burn or copy these All-in-One images to the appropriate media are available in the Technical Contacts Guide.
273
274     https://%(plc_hostname)s/doc/guides/bootcdsetup
275
276 If your node returns to normal operation after following these directions, then there is no need to respond to this message.  However, if there are any console messages relating to the nodes failure, please report them to PlanetLab support (%(support_email)s) so we can help resolve the issue.  Including this message in your reply will help us coordinate our records with the actions you have taken.  
277
278 Thank you for your help,
279   -- %(plc_name)s (%(support_email)s)
280 """)
281
282
283         # TODO: need reminder versions for repeats...
284         #newdown=[newdown_one, newdown_two, newdown_three]
285         #newbootcd=[newbootcd_one, newbootcd_two, newbootcd_three]
286         #newalphacd=[newalphacd_one, newalphacd_one, newalphacd_one]
287         #newthankyou=[thankyou,thankyou,thankyou]
288         #pcuthankyou=[pcuthankyou_one,pcuthankyou_one,pcuthankyou_one]
289         #pcutonodemapping=[pcutonodemapping_one, pcutonodemapping_one, pcutonodemapping_one]
290         #pcudown=[pcudown_one, pcudown_one, pcudown_one]
291
292         unknownsequence_notice = ("""Unrecognized Error on PlanetLab host %(hostname)s""", 
293                                            """
294 While trying to automatically recover this machine:
295
296     http://%(plc_hostname)s/db/nodes/index.php?pattern=%(hostname)s
297     https://%(monitor_hostname)s/monitor/pcuview?hostname=%(hostname)s
298
299 We encountered an unknown situation.  Please re-code to handle, or manually intervene to repair this host.
300
301 Abbreviated BootManager Sequence:
302
303     %(sequence)s
304
305 BootManager.log output follows:
306 ---------------------------------------------------------
307 %(bmlog)s
308 """       )
309
310
311         minimalhardware_notice = ("""Hardware requirements not met on PlanetLab host %(hostname)s""", 
312                                            """
313 While trying to automatically recover this machine:
314
315     http://%(plc_hostname)s/db/nodes/index.php?pattern=%(hostname)s
316
317 We encountered an failed hardware requirement.  Please look at the log below to determine the exact nature of the failure, either Disk, CPU, Network, or Mimial RAM was not satisfied.
318
319 If your machine does not meet the current hardware specifications for a PlanetLab node (http://%(plc_hostname)s/hardware), please upgrade it to meet the current recommended configuration.  
320
321 If you believe this message is an error, please email %(support_email)s explaining the problem.  You may need to create an updated Boot Image that includes drivers for your hardware.
322
323 Thank you,
324  - PlanetLab Support
325
326 BootManager.log output follows:
327 ---------------------------------------------------------
328 %(bmlog)s
329 """       )
330
331         baddisk_notice = ("""Bad Disk on PlanetLab node %(hostname)s""", 
332                            """As part of PlanetLab node monitoring, we noticed %(hostname)s has a number of disk or media related I/O errors, that prevent it from either booting or reliably running as a PlanetLab node.
333
334 Please verify the integrity of the disk, and order a replacement if needed.  If you need to schedule downtime for the node, please let us know at %(support_email)s. 
335
336 Thanks.
337
338   -- %(plc_name)s (%(support_email)s)
339
340 The output of `dmesg` follows:
341 -------------------------------------------------------------------------
342
343 %(log)s
344 """)
345
346
347         nodeconfig_notice=(""" Please Update Configuration file for PlanetLab node %(hostname)s""", 
348 """As part of PlanetLab node monitoring, we noticed %(hostname)s has an out-dated configuration.
349
350 Either our boot scripts cannot find it because the boot media is corrupted, or it has no NODE_ID or a mis-matched HOSTNAME.  This can happen either due to a configuration mistake at your site, with bad information entered into our database, or after a necessary software upgrade.  To resolve the issue we require your assistance.  All that is needed is to visit:
351
352     https://%(plc_hostname)s/db/nodes/index.php?pattern=%(hostname)s
353
354 Then double check the network settings for your host.
355
356 Then, select, "Download -> Download ISO image for %(hostname)s" menu.  This will generate a new All-in-one BootImage file for your node.  Copy this file to the appropriate read-only media, and reboot the machine.
357
358 There is no need to respond to this message. If you're able to update the boot image without difficulty and your node returns to normal operation, please accept our thanks.  However, if there are any console messages relating to the node's failure, please report them to PlanetLab support (%(support_email)s) so we can help resolve the issue. 
359
360 Thank you for your help,
361   -- %(plc_name)s (%(support_email)s)
362 """)
363
364         baddns_notice=("""Planetlab node down: broken DNS configuration for %(hostname)s""", 
365 """As part of PlanetLab node monitoring, we noticed the DNS servers used by the following machine(s) are not responding to queries.
366
367     %(hostname)s 
368
369 The conseuqnece of this is that the node cannot boot correctly, and is not a functioning part of the PlanetLab network.
370
371 To help us return this machine to running order, please verify that the registered DNS servers in the node network configuration are correct.  
372
373 %(network_config)s
374
375 You may update the node's network information at the link below:
376
377     https://%(plc_hostname)s/db/nodes/node_networks.php?id=%(interface_id)s
378
379 If you have any questions, please feel free to contact us at PlanetLab Support (%(support_email)s).
380
381 Thank you for your help,
382   -- %(plc_name)s (%(support_email)s)
383 """)
384
385 #############################################################################
386 #############################################################################
387 #############################################################################
388
389
390         filerw=("""Planetlab node %(hostname)s has a bad disk.""", """As part of PlanetLab node monitoring, we noticed %(hostname)s has a read-only filesystem.
391
392 Please verify the integrity of the disk and email the site if a replacement is needed. 
393
394 Thanks.
395
396   -- %(plc_name)s (%(support_email)s)
397 """)
398
399
400         clock_drift=("""Planetlab node %(hostname)s and NTP.""", """As part of PlanetLab node monitoring, we noticed %(hostname)s cannot reach our NTP server.
401
402 Please verify that the NTP port (tcp/123) is not blocked by your site. 
403
404 Thanks.
405
406   -- %(plc_name)s (%(support_email)s)
407 """)
408