[one-users] Monitoring issue right after host creation [No Monitoring Information | OpenNebula 3.2.0]

biro lehel lehel.biro at yahoo.com
Fri Mar 9 08:55:38 PST 2012


Hello,

I managed to resolve the issues regarding the monitoring, by following the instructions at [1] (sections 7.1.1.1. and 7.1.1.2), and at [2] (the section regarding PolicyKit). Now, 'onehost show 6' results in the following (see below).

As you can see, although the monitoring info returned the correct result, it still contains an error message, which is stuck there from an earlier time (the timestamp of the error message is not the actual time of the monitoring, it shows the timestamp of an earlier unsuccessful monitoring try). The oned.log contains no errors. Also, I suppose because of this error message (which also appears at the bottom of the "Host Template" tab, with my current Host selected in Sunstone), the "Monitoring Information" tab shows "There is no monitoring information for
 host 6" both at CPU and Memory info. Any idea how to work this around?

Also, my initial socket problem (I copy the following from messages.log):
Mar  9 10:10:57 pcls libvirtd[5603]: Starting libvirtd WARNING: no socket to connect to
Mar  9 10:10:57 pcls libvirtd[5603]: ..done

, still persist. This message also appears when trying to run anything related to 'virsh' on my host,, for ex:

> virsh -c qemu:///system list
WARNING: no socket to connect to
 Id Name                 State
----------------------------------

, and also, it appears when running run_probes on my host (although after the warning, it returns the correct information).

It is kind of bothering me, and I could find the reason of it so far. It is also making it hard to trace the fact that besides this warning message, no errors messages are issued nowhere, and I couldn't trace it in the logs neither, so far. Any ideas what causes this socket warning? Please help.

All the best,
Lehel.



> onehost show 6
HOST 6 INFORMATION                                                              
ID                    : 6                   
NAME                  :
 pcls                
STATE                 : MONITORED           
IM_MAD                : im_kvm              
VM_MAD                : vmm_kvm             
VN_MAD                : dummy               
TM_MAD                :
 tm_shared           
LAST MONITORING TIME  : 1331310160          

HOST SHARES                                                                     
MAX MEM               : 16446748            
USED MEM (REAL)       : 773580              
USED MEM (ALLOCATED)  :
 0                   
MAX CPU               : 400                 
USED CPU (REAL)       : 42                  
USED CPU (ALLOCATED)  : 0                   
MAX DISK              : 0                   
USED DISK (REAL)      :
 0                   
USED DISK (ALLOCATED) : 0                   
RUNNING VMS           : 0                   

MONITORING INFORMATION                                                          
ARCH=x86_64
CPUSPEED=1600
ERROR=[
  MESSAGE="Error monitoring host 6 : MONITOR FAILURE 6 Error executing kvm.rb
",
 
 TIMESTAMP="Fri Mar  9 12:12:32 2012" ]
FREECPU=357.2
FREEMEMORY=15673168
HOSTNAME=pcls
HYPERVISOR=kvm
MODELNAME="Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz"
NETRX=0
NETTX=0
TOTALCPU=400
TOTALMEMORY=16446748
USEDCPU=42.8
USEDMEMORY=773580


[1] http://doc.opensuse.org/documentation/html/openSUSE/opensuse-kvm/cha.libvirt.connect.html#sec.libvirt.connect.auth
[2] http://en.opensuse.org/SDB:Cloud_OpenNebula#Setting_up_a_cloud_node


--- On Fri, 3/9/12, biro lehel <lehel.biro at yahoo.com> wrote:

From: biro lehel <lehel.biro at yahoo.com>
Subject: Re: [one-users]
 Monitoring issue right after host creation [No Monitoring Information | OpenNebula 3.2.0]
To: users at lists.opennebula.org
Date: Friday, March 9, 2012, 1:00 PM

Hi Ruben,

I am using the OpenSUSE package (installed through 
YaST). Just to make sure that I did the configurations right (I'm sure I
 didn't):

At (I quote from the documentation): "To be able to use
 the images copied by OpenNebula, change also the user and group under 
which the libvirtd is run to “oneadmin”", what exactly needs to be done?
 I am a Linux-noob (or at least, not at all an expert), so forget me 
this question, but how do I set the user and group under which a daemon 
is run? I have checked under which user is the libvirtd daemon is 
currently running, and indeed it is root (since I probably set it and 
put it in init.d as the root user).

Also: "(typically  <oneadmin>) has to pertain to the <libvirtd> and <kvm> groups in order to use the daemon and be able to launch VMs."
What are the
 <libvirtd> and <kvm> groups? And how how do I achieve the necessary configuration?

I did some configuration, but I just want to make sure that I'm not missing anything (which I probably do).

Ruben? Anyone? 

Thank you,
Lehel.

--- On Fri, 3/9/12, Ruben S. Montero <rsmontero at opennebula.org> wrote:

From: Ruben S. Montero <rsmontero at opennebula.org>
Subject: Re: [one-users] Monitoring issue right after host creation [No Monitoring Information | OpenNebula 3.2.0]
To: "biro lehel" <lehel.biro at yahoo.com>
Cc: users at lists.opennebula.org
Date: Friday, March 9, 2012, 11:42 AM

Hi
It seems that a libvirt problem, either is not running at pcls or it is misconfigured. You have a couple of hints about configuring libvirt for KVM at
 [1].
My other concern is your permissions problem. Are you using the OpenSUSE package or installing from source?


[1] http://www.opennebula.org/documentation:rel3.2:kvmg#configuration
Thanks


Ruben

On Fri, Mar 9, 2012 at 7:58 AM, biro lehel <lehel.biro at yahoo.com> wrote:




Hello,

I checked your suggestions, and although the scripts existed inside kvm.d, I didn't have execution permissions on them. I also run 'onehost sync'.

However, now I get a monitoring error while running 'onehost show pcls', oned.log containing the following:



Fri Mar  9 08:45:45 2012 [InM][I]: Monitoring host pcls (6)
Fri Mar  9 08:45:50 2012 [InM][I]: Command execution fail: 'if [ -x "/var/tmp/one/im/run_probes" ]; then /var/tmp/one/im/run_probes kvm 6 pcls;
 else                              exit 42; fi'
Fri Mar  9 08:45:50 2012 [InM][I]: WARNING: no socket to connect to
Fri Mar  9 08:45:50 2012
 [InM][I]: error: authentication failed: authentication failed
Fri Mar  9 08:45:50 2012 [InM][I]: error: failed to connect to the hypervisor
Fri Mar  9 08:45:50 2012 [InM][E]: Error executing kvm.rb
Fri Mar  9 08:45:50 2012 [InM][I]: ExitCode: 255


Fri Mar  9 08:45:50 2012 [InM][E]: Error monitoring host 6 : MONITOR FAILURE 6 Error executing kvm.rb

On the other hand, running run_probes on pcls result in the same warning, but also outputs the expected  data:



# /var/tmp/one/im/run_probes kvm 6 pcls
WARNING: no socket to connect to
ARCH=x86_64 MODELNAME="Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz" HYPERVISOR=kvm TOTALCPU=400 CPUSPEED=3301 TOTALMEMORY=16446744 USEDMEMORY=724860 FREEMEMORY=15721884 FREECPU=381.6 USEDCPU=18.4 NETRX=0 NETTX=0 HOSTNAME=pcls



I did check the documentation at [1], the only thing missing is that I didn't perform the following line:

 /etc/default/libvirt-bin : add -l option to libvirtd_opts
, since I didn't have the mentioned file on my machine (I'm running OpenNebula 3.2.0 on an openSUSE 12.1 machine).



I was curious, and I run 'virsh -c qemu' command, resulting in the following:

# virsh -c qemu
WARNING: no socket to connect to
error: internal error unexpected Xen URI path 'qemu', try ///var/lib/xen/xend-socket


error: failed to connect to the hypervisor

Since I want to use KVM, and not Xen, as my hypervisor for OpenNebula, I smell a problem here. What am I missing? Any help?

[1]: http://opennebula.org/documentation:rel3.2:kvmg





--- On Thu, 3/8/12, Ruben S. Montero <rsmontero at opennebula.org> wrote:



From: Ruben S. Montero <rsmontero at opennebula.org>
Subject: Re: [one-users] Monitoring issue right after host creation [No Monitoring Information | OpenNebula 3.2.0]


To: "biro lehel" <lehel.biro at yahoo.com>
Cc:
 users at lists.opennebula.org
Date: Thursday, March 8, 2012, 7:04 PM

Yes,
I mean the contents of the directory. run_probes, just executes the scripts in /var/tmp/one/im/kvm.d (in your case). The reason for no output of run_probes is an empty kvm.d. Could you check the contents of that directory (and execute any script there....)? 




BTW run_probes is a very simple shell script (similar to run_parts) you may want to execute it with bash -xv /var/tmp/one/im/run_probes kvm 4 pcls
On Thu, Mar 8, 2012 at 5:57 PM, biro lehel <lehel.biro at yahoo.com> wrote:




Hello Ruben,



as I mentioned at the bottom of my previous email, I already run /var/tmp/one/im/run_probes with the necessary parameters on pcls (my only host), which resulted in the same (empty) output. The file exists, it just doesn't produce the expected (or any) output, and I couldn't find the reason so far.





I didn't try 'onehost sync', but I could try tomorrow morning (since I got home already, and I'm not at the respective computers), if you consider that it might help.

Any other suggestions?





Cheers,
Lehel.

--- On Thu, 3/8/12, Ruben S. Montero <rsmontero at opennebula.org> wrote:





From: Ruben S. Montero <rsmontero at opennebula.org>
Subject: Re: [one-users] Monitoring issue right after host
 creation [No Monitoring Information | OpenNebula 3.2.0]
To: "biro lehel" <lehel.biro at yahoo.com>
Cc: users at lists.opennebula.org


Date: Thursday, March 8, 2012, 6:17 PM

Hi,
Could you please check the contents of  /var/tmp/one/im/ at pcls? It seems that there are no probes there. If that's the case you can copy them by hand or use onehost sync and wait for a monitoring action on the host.






Cheers
Ruben

On Thu, Mar 8, 2012 at 4:25 PM, biro lehel <lehel.biro at yahoo.com> wrote:












Hello,

I tried to add my one and only host, by executing on the front-end:







> onehost create pcls im_kvm vmm_kvm tm_shared dummy

Issuing the 'onehost list' command, the result seems to be the one expected. However, issuing 'onehost show pcls' command results in zero values and NO monitoring information:







oneadmin at linux-4dsu:~/remotes/im> onehost show pcls
HOST 6
 INFORMATION                                                              
ID                    : 6                   
NAME                  : pcls                
STATE                 :
 MONITORED           
IM_MAD                : im_kvm              
VM_MAD                : vmm_kvm             
VN_MAD                : dummy               
TM_MAD                : tm_shared           
LAST MONITORING TIME  : 1331219173          







HOST
 SHARES                                                                     
MAX MEM               : 0                   
USED MEM (REAL)       : 0                   
USED MEM (ALLOCATED)  : 0                   






MAX
 CPU               : 0                   
USED CPU (REAL)       : 0                   
USED CPU (ALLOCATED)  : 0                   
MAX DISK              : 0                   
USED DISK (REAL)      : 0                   






USED DISK (ALLOCATED) :
 0                   
RUNNING VMS           : 0                   

MONITORING INFORMATION   

(the report ends here, without monitoring information).

I had some errors before, oned.log having:







Thu Mar  8 15:49:03 2012 [InM][I]: Command execution fail: 'if [ -x "/var/tmp/one/im/run_probes" ]; then /var/tmp/one/im/run_probes kvm 4 pcls; else                              exit 42; fi'
Thu Mar  8 15:49:03 2012 [InM][I]: ExitCode: 42






Thu Mar  8 15:49:03 2012 [InM][E]: Error monitoring host 4 : MONITOR FAILURE 4 -

However, I
 fixed this by simply adding execution permission to the run_probes file mentioned above (since, it didn't have one). At this moment, oned.log contains no errors (to be precise, it says,

Thu Mar  8 17:16:12 2012 [ReM][D]: HostPoolInfo method invoked






Thu Mar  8 17:16:12 2012 [ReM][D]: VirtualMachinePoolInfo method invoked
Thu Mar  8 17:16:12 2012 [ReM][D]: AclInfo method invoked
Thu Mar  8 17:16:13 2012 [InM][I]: Monitoring host pcls (6)
Thu Mar  8 17:16:18 2012 [InM][I]: ExitCode: 0






Thu Mar  8 17:16:18 2012 [InM][D]: Host 6 successfully monitored.
Thu Mar  8 17:16:19 2012 [ReM][D]: UserPoolInfo method invoked
Thu Mar  8 17:16:19 2012 [AuM][D]: Message received: LOG I 874 ExitCode: 0

).







Firing the respective command on the host (  /var/tmp/one/im/run_probes kvm 4 pcls ) also results in no output and no errors (it simply puts a space on a new line in the CLI).

I don't
 think that this is the expected behavior and I think that there is a problem somewhere. What am I missing? Any suggestions?

Thanks,
Lehel.







_______________________________________________

Users mailing list

Users at lists.opennebula.org

http://lists.opennebula.org/listinfo.cgi/users-opennebula.org





-- 
Ruben S. Montero, PhD
Project co-Lead and Chief Architect
OpenNebula - The Open Source Solution for Data Center Virtualization




www.OpenNebula.org | rsmontero at opennebula.org | @OpenNebula











-- 
Ruben S. Montero, PhD
Project co-Lead and Chief Architect


OpenNebula - The Open Source Solution for Data Center Virtualization


www.OpenNebula.org | rsmontero at opennebula.org | @OpenNebula





-- 
Ruben S. Montero, PhD
Project co-Lead and Chief Architect
OpenNebula - The Open Source Solution for Data Center Virtualization


www.OpenNebula.org | rsmontero at opennebula.org | @OpenNebula



-----Inline Attachment Follows-----

_______________________________________________
Users mailing list
Users at lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120309/ed086571/attachment-0003.htm>


More information about the Users mailing list