WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-cim

Re: [Xen-cim] Detection of host instrumentation

To: xen-cim@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-cim] Detection of host instrumentation
From: Jim Fehlig <jfehlig@xxxxxxxxxx>
Date: Wed, 04 Oct 2006 16:38:16 -0600
Delivery-date: Wed, 04 Oct 2006 15:43:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4521A8AF.10709@xxxxxxxxxx>
List-help: <mailto:xen-cim-request@lists.xensource.com?subject=help>
List-id: xen-cim mailing list <xen-cim.lists.xensource.com>
List-post: <mailto:xen-cim@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-cim>, <mailto:xen-cim-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-cim>, <mailto:xen-cim-request@lists.xensource.com?subject=unsubscribe>
References: <4521A8AF.10709@xxxxxxxxxx>
Sender: xen-cim-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (X11/20060909)
Jim Fehlig wrote:
After thinking about several approaches for ensuring that host instrumentation is available at build time, I've concluded they all suck and we should just document this dependency :-).

Detecting existence of dependent providers during configure requires asking the cimom (assuming it is running) for a known registered profile or class. This is the only way I see of reliably determining if the build host has the required instrumentation - and I'm not comfortable doing such hackery in the configure script.

I like the runtime discovery we have previously discussed, but it is useless without our own instrumentation to fall back on in the event nothing is found - and I don't want to be in the host instrumentation business given the existence of OMC, SBLIM, etc.

I have two suggestions for handling the host instrumentation dependency.

1. Just document that the existence of virtualization model depends on existence of related modeling. We could provide instructions in the README for obtaining and installing the OMC project and be done with it.

2. Same as above but with added 'feature' of specifying host instrumentation via a configure argument. E.g. one could run './configure --with-omc' or './configure --with-sblim'. The configure script would not detect existence of the instrumentation - just use some knowledge about these projects to determine namespace and classnames of host instrumentation for use throughout the providers. If not specified, default to OMC.

Option 2 seems reasonable and allows for using SBLIM providers on Pegasus until such time OMC providers can run in that environment. User is still responsible for ensuring the host instrumentation is installed and functional.

Attached is a patch for the planned approach to handle host instrumentation. OMC is the default but users can run './configure --with-host-instrumentation=sblim' to use sblim providers. A namespace and class prefix is written to config.h which can be used in the association providers when making upcalls. Using this technique we can, for example, ask for finer-grained CIM_ComputerSystem - Linux_ComputerSystem.

Any problems with this? If not I will proceed forward. Silence == agreement :-).

Jim

diff -r 16d625984bc4 configure.ac
--- a/configure.ac      Thu Sep 28 17:07:14 2006 -0600
+++ b/configure.ac      Wed Oct 04 16:21:27 2006 -0600
@@ -118,6 +118,30 @@ LIBXM_LIBS="$libvirt_LIBS $libxml2_LIBS 
 LIBXM_LIBS="$libvirt_LIBS $libxml2_LIBS "
 AC_SUBST([LIBXM_CFLAGS])
 AC_SUBST([LIBXM_LIBS])
+
+# Add argument to allow specifying which host instrumentation
+# to use.  omc or sblim are the options, omc is default.
+HOST_INSTRUMENTATION="omc"
+AC_ARG_WITH([host-instrumentation],
+       [  --with-host-instrumentation=TYPE  supported types are omc and sblim],
+       [
+               if test "x$withval" != "xno" ; then
+                       
+                       HOST_INSTRUMENTATION="$withval" 
+               fi
+       ]
+)
+
+if test "x$HOST_INSTRUMENTATION" = "xomc" ; then
+       AC_DEFINE([HOST_INSTRUMENTATION_NS],  ["smash"], [Namespace where host 
instrumentation resides.])
+       AC_DEFINE([HOST_INSTRUMENTATION_PREFIX],  ["OMC_"], [Prefix of host 
instrumentation class names.])
+elif test "x$HOST_INSTRUMENTATION" = "xsblim" ; then
+       AC_DEFINE([HOST_INSTRUMENTATION_NS],  ["root/cimv2"], [Namespace where 
host instrumentation resides.])
+       AC_DEFINE([HOST_INSTRUMENTATION_PREFIX],  ["Linux_"], [Prefix of host 
instrumentation class names.])
+else
+       AC_MSG_ERROR([unrecognized host instrumentation $HOST_INSTRUMENTATION])
+fi
+
 
 # Set compiler flag for CMPI API version compatibility
 # SET THE PACKAGE CMPI_VERSION HERE
@@ -189,6 +213,7 @@ if test x"$TESTSUITEDIR" != x; then
 if test x"$TESTSUITEDIR" != x; then
    echo "   TESTSUITEDIR: " $TESTSUITEDIR
 fi
+echo "   HOST_INSTRUMENTATION: " $HOST_INSTRUMENTATION
 echo "   CPPFLAGS:" $CPPFLAGS
 echo
 echo "You can override these values by setting the corresponding"
_______________________________________________
Xen-cim mailing list
Xen-cim@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-cim
<Prev in Thread] Current Thread [Next in Thread>