1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 layout_params['page_title'] = "Monitor PCU View"
4 from monitor.util import diff_time
5 from monitor import config
6 from time import mktime
7 from pcucontrol.reboot import pcu_name, model_to_object
10 <html py:layout="'sitemenu.kid'"
11 xmlns:py="http://purl.org/kid/ns#"
12 xmlns:mochi="http://www.mochi.org">
14 <div py:match="item.tag == 'content'">
16 <table id="sortable_table" class="datagrid" border="1" width="100%">
19 <th mochi:format="int"></th>
20 <th mochi:format="str">Site</th>
22 <th>Missing Fields</th>
25 <th width="80%">Test Results</th>
31 <tr py:for="i,pcu in enumerate(pcuquery)" class="${i%2 and 'odd' or 'even'}" >
33 <td><a class="ext-link" href="${plc_site_uri_id(pcu.plc_pcu_stats['site_id'])}">
34 <span class="icon">${pcu.loginbase}</span>
38 <a class="ext-link" href="${plc_pcu_uri_id(pcu.plc_pcu_stats['pcu_id'])}">
39 <span class="icon">${pcu_name(pcu.plc_pcu_stats)}</span>
42 <td py:content="pcu.entry_complete"></td>
43 <td id="dns-${pcu.dns_status}" py:content="pcu.dns_status"></td>
45 <span py:for="port,state in pcu.ports"
46 id="port${state}" py:content="'%s, ' % port">80</span>
48 <td width="40" id="status-${pcu.status}"><pre py:content="pcu.reboot_trial_status"></pre></td>
49 <td py:content="pcu.plc_pcu_stats['model']"></td>
50 <td py:content="len(pcu.plc_pcu_stats['node_ids'])"></td>
54 <h4>Convenience Calls</h4>
56 if len(pcuquery) == 0: pcu = None
58 <div py:if="pcu is not None" class="code">
59 <span py:for="port,state in pcu.ports">
60 <span class="code" py:if="port == 22 and state == 'open'">
61 ssh -o PasswordAuthentication=yes -o PubkeyAuthentication=no
62 ${pcu.plc_pcu_stats['username']}@${pcu_name(pcu.plc_pcu_stats)}
64 <span class="code" py:if="port == 23 and state == 'open'">
65 telnet ${pcu_name(pcu.plc_pcu_stats)}
67 <span class="code" py:if="port == 80 and state == 'open'">
68 <a href="http://${pcu_name(pcu.plc_pcu_stats)}">http://${pcu_name(pcu.plc_pcu_stats)}</a>
70 <span class="code" py:if="port == 443 and state == 'open'">
71 <a href="https://${pcu_name(pcu.plc_pcu_stats)}">https://${pcu_name(pcu.plc_pcu_stats)}</a>
73 /usr/share/monitor/racadm.py -r ${pcu.plc_pcu_stats['ip']}
74 -u ${pcu.plc_pcu_stats['username']} -p '${pcu.plc_pcu_stats['password']}'
76 /usr/share/monitor/pcucontrol/models/hpilo/locfg.pl
77 -f /usr/share/monitor/pcucontrol/models/hpilo/iloxml/Reset_Server.xml
78 -s ${pcu_name(pcu.plc_pcu_stats)}
79 -u ${pcu.plc_pcu_stats['username']}
80 -p '${pcu.plc_pcu_stats['password']} ' | grep MESSAGE"
82 <span class="code" py:if="port == 16992 and state == 'open'">
83 /usr/share/monitor/pcucontrol/models/intelamt/remoteControl -A
84 -verbose 'http://${pcu_name(pcu.plc_pcu_stats)}:16992/RemoteControlService'
85 -user admin -pass '${pcu.plc_pcu_stats['password']}'
90 <table id="sortable_table" class="datagrid" border="1" width="100%">
93 <th mochi:format="int"></th>
97 <th>External Probe</th>
98 <th>Internal Probe</th>
103 <tr py:for="i,node in enumerate(nodequery)" class="${i%2 and 'odd' or 'even'}" >
105 <td id="node-${node.observed_status}" nowrap="true" >
106 <a class="ext-link" href="${plc_node_uri(node.hostname)}">
107 <span class="icon">${node.hostname}</span></a>
109 <td py:content="diff_time(node.plc_node_stats['last_contact'])"></td>
110 <td py:content="diff_time(mktime(node.date_checked.timetuple()))"></td>
112 <!-- TODO: add some values/code to authenticate the operation. -->
113 <form action="${link('pcuview', pcuid=pcu.plc_pcuid)}" name="nodeaction" method='post'>
114 <input type='hidden' name='hostname' value='${node.hostname}'/>
115 <input type='submit' name='submit' value='ExternalProbe' />
119 <!-- TODO: add some values/code to authenticate the operation. -->
120 <form action="${link('pcuview', pcuid=pcu.plc_pcuid)}" name="nodeaction" method='post'>
121 <input type='hidden' name='hostname' value='${node.hostname}'/>
122 <input type='submit' name='submit' value='DeepProbe' />
126 <!-- TODO: add some values/code to authenticate the operation. -->
127 <form action="${link('pcuview', pcuid=pcu.plc_pcuid)}" name="nodeaction" method='post'>
128 <input type='hidden' name='hostname' value='${node.hostname}'/>
129 <input type='submit' name='submit' value='Reboot' />
135 <div class="error" py:if="exceptions is not None">
138 <div id="status_block" class="flash"
139 py:if="value_of('tg_flash', None)" py:content="tg_flash"></div>
142 <table border="1" align="center" width="80%">
143 <tr><th colspan="2">Legend for 'DNS Status'</th></tr>
145 <tr><td id="dns-DNS-OK">DNS-OK</td>
146 <td>This indicates that the DNS name and registered IP address match.</td>
148 <tr><td id="dns-DNS-MISMATCH">DNS-MISMATCH</td>
149 <td>Sometimes, the registered IP and DNS IP address do not match.
150 In these cases it is not clear which is correct,
151 so an error is flagged.</td>
153 <tr><td id="dns-DNS-NOENTRY">DNS-NOENTRY</td>
154 <td>While a hostname is provided in the registration, the hostname is not actually registered in DNS.</td>
156 <tr><td id="dns-NOHOSTNAME">NOHOSTNAME</td>
157 <td>While we prefer that a hostname be registered, it is not
158 strictly required, since simply the IP address, if it is static, is enough to access the PCU.</td>
160 <tr><td> </td></tr>
163 <tr><th colspan="2">Legend for 'Port Status'</th></tr>
165 <tr><td id="portopen">Open</td>
166 <td>Green port numbers are believed to be open.</td>
168 <tr><td id="portfiltered">Filtered</td>
169 <td>Gold port numbers are believed to be filtered or simply offline.</td>
171 <tr><td id="portclosed">Closed</td>
172 <td>Finally, red ports appear to be closed.</td>
174 <tr><td> </td></tr>
177 <tr><th colspan="2">Legend for 'Test Results'</th></tr>
179 <tr><td id="status-0">OK</td>
180 <td>The PCU is accessible, and short of actually rebooting the node, everything appears to work.</td>
182 <tr><td id="status-NetDown">NetDown</td>
183 <td>The PCU is inaccessible from the PlanetLab address block 128.112.139.0/25, or it is simply offline.</td>
185 <tr><td id="status-Not_Run">Not_Run</td>
186 <td>Previous errors, such as DNS or an incomplete configuration prevented the actual test from begin performed.</td>
188 <tr><td id="status-error">Other Errors</td>
189 <td>Other errors are reported by the test that are more specific to the block encountered by the script.</td>