- add install_date
Setting tag Monitor-3.0-24
--This line, and those below, will be ignored--
Please write a changelog for this new tag in the section above
DIFF=========
Index: nodequery.py
===================================================================
--- nodequery.py (.../tags/Monitor-3.0-23) (révision 15400)
+++ nodequery.py (.../trunk) (révision 15400)
@@ -38,6 +38,8 @@
fbnode['bootcd_version'] = "unknown"
if not fbnode['boot_server']:
fbnode['boot_server'] = "unknown"
+ if not fbnode['install_date']:
+ fbnode['install_date'] = "unknown"
fbnode['pcu'] = color_pcu_state(fbnode)
if not fields:
@@ -60,7 +62,7 @@
#print "ERROR!!!!!!!!!!!!!!!!!!!!!"
pass
- print "%(hostname)-45s | %(date_checked)11.11s | %(boot_state)5.5s| %(observed_status)8.8s | %(ssh_status)5.5s | %(pcu)6.6s | %(bootcd_version)6.6s | %(boot_server)s | %(kernel_version)s" % fbnode
+ print "%(hostname)-45s | %(date_checked)11.11s | %(boot_state)5.5s| %(observed_status)8.8s | %(ssh_status)5.5s | %(pcu)6.6s | %(bootcd_version)6.6s | %(boot_server)s | %(install_date)s | %(kernel_version)s" % fbnode
else:
format = ""
for f in fields:
Index: web/MonitorWeb/monitorweb/controllers.py
===================================================================
--- web/MonitorWeb/monitorweb/controllers.py (.../tags/Monitor-3.0-23) (révision 15400)
+++ web/MonitorWeb/monitorweb/controllers.py (.../trunk) (révision 15400)
@@ -54,6 +54,7 @@
kernel_version = widgets.CheckBox(label="Kernel")
bootcd_version = widgets.CheckBox(label="BootCD")
boot_server = widgets.CheckBox(label="Boot Server")
+ install_date = widgets.CheckBox(label="Installation Date")
observed_status = widgets.CheckBox(label="Observed Status")
uptime = widgets.CheckBox(label="Uptime")
traceroute = widgets.CheckBox(label="Traceroute")
Index: web/MonitorWeb/monitorweb/templates/nodescanhistory.kid
===================================================================
--- web/MonitorWeb/monitorweb/templates/nodescanhistory.kid (.../tags/Monitor-3.0-23) (révision 15400)
+++ web/MonitorWeb/monitorweb/templates/nodescanhistory.kid (.../trunk) (révision 15400)
@@ -63,6 +63,7 @@
<th class="sortable plekit_table">kernel</th>
<th class="sortable plekit_table">BootCD</th>
<th class="sortable plekit_table">Boot Server</th>
+ <th class="sortable plekit_table">Installation Date</th>
<th class="sortable plekit_table">Last_contact</th>
</tr>
</thead>
@@ -78,6 +79,7 @@
<td nowrap="true" py:content="node.kernel"></td>
<td nowrap="true" py:content="node.node.bootcd_version"></td>
<td nowrap="true" py:content="node.node.boot_server"></td>
+ <td nowrap="true" py:content="node.node.install_date"></td>
<td id="node-${node.node.observed_status}" py:content="diff_time(node.node.plc_node_stats['last_contact'])"></td>
</span>
</tr>
Index: web/MonitorWeb/monitorweb/templates/node_template.kid
===================================================================
--- web/MonitorWeb/monitorweb/templates/node_template.kid (.../tags/Monitor-3.0-23) (révision 15400)
+++ web/MonitorWeb/monitorweb/templates/node_template.kid (.../trunk) (révision 15400)
@@ -16,6 +16,7 @@
<th>kernel</th>
<th>BootCD</th>
<th>Boot Server</th>
+ <th>Installation Date</th>
<th>last_contact</th>
</span>
<span py:if="node is not None">
@@ -43,6 +44,7 @@
<td nowrap="true" py:content="node.kernel"></td>
<td nowrap="true" py:content="node.node.bootcd_version"></td>
<td nowrap="true" py:content="node.node.boot_server"></td>
+ <td nowrap="true" py:content="node.node.install_date"></td>
<td id="node-${node.node.observed_status}" py:content="diff_time(node.node.plc_node_stats['last_contact'])"></td>
</span>
</span>
Index: upgrade/monitor-server-3.0-23.sql
===================================================================
--- upgrade/monitor-server-3.0-23.sql (.../tags/Monitor-3.0-23) (révision 0)
+++ upgrade/monitor-server-3.0-23.sql (.../trunk) (révision 15400)
@@ -0,0 +1,3 @@
+
+ALTER TABLE findbadnoderecord ADD COLUMN install_date varchar DEFAULT NULL;
+ALTER TABLE findbadnoderecord_history ADD COLUMN install_date varchar DEFAULT NULL;
Index: monitor/database/info/findbad.py
===================================================================
--- monitor/database/info/findbad.py (.../tags/Monitor-3.0-23) (révision 15400)
+++ monitor/database/info/findbad.py (.../trunk) (révision 15400)
@@ -39,6 +39,7 @@
kernel_version = Field(String,default=None)
bootcd_version = Field(String,default=None)
boot_server = Field(String,default=None)
+ install_date = Field(String,default=None)
nm_status = Field(String,default=None)
fs_status = Field(String,default=None)
iptables_status = Field(String,default=None)
Index: monitor/scanapi.py
===================================================================
--- monitor/scanapi.py (.../tags/Monitor-3.0-23) (révision 15400)
+++ monitor/scanapi.py (.../trunk) (révision 15400)
@@ -238,6 +238,7 @@
echo ' "bmlog":"'`ls /tmp/bm.log`'",'
echo ' "bootcd_version":"'`cat /mnt/cdrom/bootme/ID`'",'
echo ' "boot_server":"'`cat /mnt/cdrom/bootme/BOOTSERVER`'",'
+ echo ' "install_date":"'`python -c "import os,time,stat; print time.ctime(os.stat('/usr/boot/plnode.txt')[stat.ST_CTIME])"`'",'
echo ' "nm_status":"'`ps ax | grep nm.py | grep -v grep`'",'
echo ' "dns_status":"'`host boot.planet-lab.org 2>&1`'",'
echo ' "iptables_status":"'`iptables -t mangle -nL | awk '$1~/^[A-Z]+$/ {modules[$1]=1;}END{for (k in modules) {if (k) printf "%s ",k;}}'`'",'
@@ -262,6 +263,7 @@
else:
values.update({'kernel_version': "", 'bmlog' : "", 'bootcd_version' : '',
'boot_server' : '',
+ 'install_date' : '',
'nm_status' : '',
'fs_status' : '',
'uptime' : '',