<div dir="ltr">Ok. Thanks the fix is already in master and one-4.4 branch. <div><br></div><div><a href="http://dev.opennebula.org/issues/2541">http://dev.opennebula.org/issues/2541</a><br></div><div><br></div><div><br></div>
<div>About the problem. Datastores are monitored through two different sources:</div><div><br></div><div>1.- monitor script for image datastores.</div><div><br></div><div>2.- System datastore are monitored through the monitor_ds script (as in general they cannot be accessed in the front-end and are potentially not-shared). There are only two system datastore types, shared and ssh (with an associated LVM for the FS LVM datastore) so the du/df commands should work.</div>
<div><br></div><div>The proposed patch adds additional error control so totally agree with it (also add it a couple of checks for the other variable outputs)</div><div><br></div><div>THANKS!</div><div><br></div><div>Ruben</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 5, 2013 at 6:29 PM, Gareth Bult <span dir="ltr"><<a href="mailto:gareth@linux.co.uk" target="_blank">gareth@linux.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:trebuchet ms,sans-serif"><div>Ok, not sure what the difference is, but this is a fix;</div>
<div><br></div><div>kvm-probes.d/monitor_ds.sh</div><div><p><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">--- monitor_ds.sh.orig 2013-12-05 17:06:35.251763742 +0000</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">+++ monitor_ds.sh 2013-12-05 16:55:11.699743037 +0000</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif">@@ -31,6 +31,10 @@</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> TOTAL_MB=$(df -B1M -P $dir 2>/dev/null | tail -n 1 | awk '{print $2}')</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> FREE_MB=$(df -B1M -P $dir 2>/dev/null | tail -n 1 | awk '{print $4}')</span></p><p><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">+ USED_MB=${USED_MB:-"0"}</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif">+ TOTAL_MB=${TOTAL_MB:-"0"}</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">+ FREE_MB=${FREE_MB:-"0"}</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif">+</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> if [ -n "$LVM_SIZE_CMD" ]; then</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> LVM_SIZE=$($LVM_SIZE_CMD ${LVM_VG_PREFIX}${ds} 2>/dev/null)</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> LVM_STATUS=$?</span></p>
<div>The host monitor seems to be calling a generic monitor which is also grabbing information about datastores.</div><div>In an environment (such as VDC) where the data exists remotely, the standard monitor (which uses 'du') isn't</div>
<div>going to provide any useful results, indeed in this instance it errors and the script returns blanks, which breaks</div><div>the host monitoring. Returning '0' on failure fixes the issue ...</div><div><br></div>
<div>Any chance this could inserted in the next release please?</div><p><span style="font-size:small">--</span></p></div><div><div><div><table><tbody><tr><td><img></td><td><b style="font-family:verdana,Helvetica,sans-serif;font-size:11px;line-height:14px">Gareth Bult</b><br>
<span color="#666666" style="color:#666666"><span face="verdana, Helvetica, sans-serif" style="font-family:verdana,Helvetica,sans-serif"><span style="font-size:11px;line-height:14px">“The odds of hitting your target go up dramatically when you aim at it.”</span></span></span><span color="#666666" style="color:#666666"><br>
</span><span color="#666666" style="color:#666666"><br></span><span color="#666666" style="color:#666666"><br></span></td></tr></tbody></table></div></div><span name="x"></span><br></div><hr><div style="font-size:12pt;font-style:normal;font-family:Helvetica,Arial,sans-serif;text-decoration:none;font-weight:normal">
<b>From: </b>"Gareth Bult" <<a href="mailto:gareth@linux.co.uk" target="_blank">gareth@linux.co.uk</a>><br><b>To: </b><a href="mailto:users@lists.opennebula.org" target="_blank">users@lists.opennebula.org</a><br>
<b>Sent: </b>Thursday, 5 December, 2013 3:47:12 PM<br><b>Subject: </b>[one-users] Breakage when upgrading from 4.38 to 4.4 ...<br><div><br></div><div style="font-size:12pt;font-family:trebuchet ms,sans-serif"><div>Hi, I've run the upgrade just to see if a number of issues I was having were fixed, and I seem to have</div>
<div>ended up with a fairly terminal issue I can't spot.</div><div><br></div><div>Host monitoring is now failing for hosts that previously seemed to be working. The reason seems to be</div><div>that the host is somehow looking at the datastores, and this in turn is failing.</div>
<div><br></div><div>The datastore monitoring is correct.</div><div>The error in oned.log is as follows;</div><div><p><strong><span style="font-family:'courier new',courier,monaco,monospace,sans-serif;color:rgb(255,0,0)">Thu Dec 5 15:24:47 2013 [ONE][E]: Error parsing host information: syntax error, unexpected EQUAL, expecting COMMA or CBRACKET at line 30, columns 494:497. Monitoring information:</span></strong><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif">ARCH=x86_64</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">MODELNAME="AMD Phenom(tm) II X6 1100T Processor"</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif">HYPERVISOR=kvm</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">TOTALCPU=600</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">CPUSPEED=3300</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif">TOTALMEMORY=16175216</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">USEDMEMORY=399320</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif">FREEMEMORY=15775896</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">FREECPU=600.0</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif">USEDCPU=0.0</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">NETRX=33791417902</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">NETTX=25290741468</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif">DS_LOCATION_USED_MB=2637</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">DS_LOCATION_TOTAL_MB=40190</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif">DS_LOCATION_FREE_MB=28202</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">DS = [</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> ID = 0,</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> USED_MB = 29,</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> TOTAL_MB = 40190,</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> FREE_MB = 28202</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">]</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">DS = [</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> ID = 1,</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> USED_MB = 2609,</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> TOTAL_MB = 40190,</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> FREE_MB = 28202</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">]</span><br><strong><span style="font-family:'courier new',courier,monaco,monospace,sans-serif;color:rgb(255,0,0)">DS = [</span></strong><br>
<strong><span style="font-family:'courier new',courier,monaco,monospace,sans-serif;color:rgb(255,0,0)"> ID = 107,</span></strong><br><strong><span style="font-family:'courier new',courier,monaco,monospace,sans-serif;color:rgb(255,0,0)"> USED_MB = ,</span></strong><br>
<strong><span style="font-family:'courier new',courier,monaco,monospace,sans-serif;color:rgb(255,0,0)"> TOTAL_MB = ,</span></strong><br><strong><span style="font-family:'courier new',courier,monaco,monospace,sans-serif;color:rgb(255,0,0)"> FREE_MB =</span></strong><br>
<strong><span style="font-family:'courier new',courier,monaco,monospace,sans-serif;color:rgb(255,0,0)">]</span></strong><br><strong><span style="font-family:'courier new',courier,monaco,monospace,sans-serif;color:rgb(255,0,0)">DS = [</span></strong><br>
<strong><span style="font-family:'courier new',courier,monaco,monospace,sans-serif;color:rgb(255,0,0)"> ID = 109,</span></strong><br><strong><span style="font-family:'courier new',courier,monaco,monospace,sans-serif;color:rgb(255,0,0)"> USED_MB = ,</span></strong><br>
<strong><span style="font-family:'courier new',courier,monaco,monospace,sans-serif;color:rgb(255,0,0)"> TOTAL_MB = ,</span></strong><br><strong><span style="font-family:'courier new',courier,monaco,monospace,sans-serif;color:rgb(255,0,0)"> FREE_MB =</span></strong><br>
<strong><span style="font-family:'courier new',courier,monaco,monospace,sans-serif;color:rgb(255,0,0)">]</span></strong><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">DS = [</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> ID = 114,</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> USED_MB = 1,</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> TOTAL_MB = 40190,</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> FREE_MB = 28202</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">]</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">DS = [</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> ID = 2,</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> USED_MB = 1,</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> TOTAL_MB = 40190,</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif"> FREE_MB = 28202</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">]</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">HOSTNAME=node1</span><br>
<span style="font-family:'courier new',courier,monaco,monospace,sans-serif">VM_POLL=YES</span><br><span style="font-family:'courier new',courier,monaco,monospace,sans-serif">VERSION="4.4.0"</span></p>
</div><div>So it would appear that it's calling datastore/monitor, and it's failing .. however the script does work and is reporting</div><div>the correct size in the datastore monitor. I've added syslog to the monitor script, it is being called and it is returning</div>
<div>the correct result ...</div><div><br></div><div>If I call the script on the command line with a pasted in base64 and host it, this too gives the correct results;</div><div><br></div><div><span style="font-family:'courier new',courier,monaco,monospace,sans-serif;font-size:small">oneadmin@nebula:~/remotes$ ssh node1 /var/lib/one/remotes/datastore/vdc/monitor "PERTX0RSSVZFUl9BQ1RJT05fREFUQT48REFUQVNUT1JFPjxJRD4xMDk8L0lEPjxVSUQ+MDwvVUlEPjxHSUQ+MTwvR0lEPjxVTkFNRT5vbmVhZG1pbjwvVU5BTUU+PEdOQU1FPnVzZXJzPC9HTkFNRT48TkFNRT5kYXRhMjwvTkFNRT48UEVSTUlTU0lPTlM+PE9XTkVSX1U+MTwvT1dORVJfVT48T1dORVJfTT4xPC9PV05FUl9NPjxPV05FUl9BPjA8L09XTkVSX0E+PEdST1VQX1U+MTwvR1JPVVBfVT48R1JPVVBfTT4wPC9HUk9VUF9NPjxHUk9VUF9BPjA8L0dST1VQX0E+PE9USEVSX1U+MTwvT1RIRVJfVT48T1RIRVJfTT4wPC9PVEhFUl9NPjxPVEhFUl9BPjA8L09USEVSX0E+PC9QRVJNSVNTSU9OUz48RFNfTUFEPnZkYzwvRFNfTUFEPjxUTV9NQUQ+dmRjPC9UTV9NQUQ+PEJBU0VfUEFUSD4vdmFyL2xpYi9vbmUvL2RhdGFzdG9yZXMvMTA5PC9CQVNFX1BBVEg+PFRZUEU+MDwvVFlQRT48RElTS19UWVBFPjA8L0RJU0tfVFlQRT48Q0xVU1RFUl9JRD4tMTwvQ0xVU1RFUl9JRD48Q0xVU1RFUj48L0NMVVNURVI+PFRPVEFMX01CPjE1MDAxMDE8L1RPVEFMX01CPjxGUkVFX01CPjk2MzIzMDwvRlJFRV9NQj48VVNFRF9NQj41MzY4NzE8L1VTRURfTUI+PElNQUdFUz48SUQ+MzE8L0lEPjxJRD4zMjwvSUQ+PElEPjYyPC9JRD48SUQ+ODQ8L0lEPjwvSU1BR0VTPjxURU1QTEFURT48Q0xPTkVfVEFSR0VUPjwhW0NEQVRBW1NZU1RFTV1dPjwvQ0xPTkVfVEFSR0VUPjxESVNLX1RZUEU+PCFbQ0RBVEFbRklMRV1dPjwvRElTS19UWVBFPjxEU19NQUQ+PCFbQ0RBVEFbdmRjXV0+PC9EU19NQUQ+PExOX1RBUkdFVD48IVtDREFUQVtTWVNURU1dXT48L0xOX1RBUkdFVD48TU9VTlRQT0lOVD48IVtDREFUQVsvdm9scy92bXNdXT48L01PVU5UUE9JTlQ+PFNBRkVfRElSUz48IVtDREFUQVsvdmFyL2xpYi9vbmUvaW1hZ2VzXV0+PC9TQUZFX0RJUlM+PFRNX01BRD48IVtDREFUQVt2ZGNdXT48L1RNX01BRD48VFlQRT48IVtDREFUQVtJTUFHRV9EU11dPjwvVFlQRT48VkdfTkFNRT48IVtDREFUQVt2b2xzXV0+PC9WR19OQU1FPjwvVEVNUExBVEU+PC9EQVRBU1RPUkU+PC9EU19EUklWRVJfQUNUSU9OX0RBVEE+" 109</span></div>
<div><p><span style="font-size:small;font-family:'courier new',courier,monaco,monospace,sans-serif">TOTAL_MB=1500101.21</span><br><span style="font-size:small;font-family:'courier new',courier,monaco,monospace,sans-serif">FREE_MB=963230.30</span><br>
<span style="font-size:small;font-family:'courier new',courier,monaco,monospace,sans-serif">USED_MB=536871</span></p></div><div>Short of trying to dig through oned's source code I'm stuck - can anyone help?</div>
<div><br></div><div>My datastore driver type is "vdc", even if I insert a static script (I've also tried the monitor driver from "fs")</div><div>that just prints out "TOTAL_MB=0" etc .. I still get the same issue ...</div>
<div><br></div><div>???</div><div>(and it was working fine .. before the upgrade??)</div><div><br></div><div><br></div><div><span></span><div><div><span style="font-size:small">--</span></div><div><table><tbody><tr><td><img></td>
<td><b style="font-family:verdana,Helvetica,sans-serif;font-size:11px;line-height:14px">Gareth Bult</b><br><span style="color:#666666"><span style="font-family:verdana,Helvetica,sans-serif"><span style="font-size:11px;line-height:14px">“The odds of hitting your target go up dramatically when you aim at it.”</span></span></span><span style="color:#666666"><br>
</span><span style="color:#666666"><br></span><span style="color:#666666"><br></span></td></tr></tbody></table></div></div><span></span><br></div></div><br>_______________________________________________<br>Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br><a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
</div><div><br></div></div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><div>-- <br></div></div>Ruben S. Montero, PhD<br>Project co-Lead and Chief Architect<div>OpenNebula - Flexible Enterprise Cloud Made Simple<br>
<a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:rsmontero@opennebula.org" target="_blank">rsmontero@opennebula.org</a> | @OpenNebula</div></div>
</div>