I am continuing with the port of open-vm-tools for OpenServer 6.0
(using the 2011.04.24-402641 release for the moment)with:

   --disable-unity

The vmtoolsd & guestInfo plugin were providing the FQDN,
IP address, INFO_OS_NAME="openServer6" and NicInfo V2 or V3
to the vSphere 4.x hosts.  I was unable to get a heartbeat,
however, so I took a little closer look at the rpcIn side
of the RpcChannel and discovered what looks like a severe
configuration and build problem.

lib/rpcIn/rpcin.c & rpcin.h have 2 forms of the functions:

   RpcIn_Construct()
   RpcIn_Start()

with a different number of parameters and parameter type.  The
selection is controlled by the define VMTOOLS_USE_GLIB.

The configure script adds this define to the VMTOOLS_CPPFLAGS
and subsequently to the PLUGIN_CPPFLAGS.

lib/rpcChannel/bdoorChannel.c specifically uses the
VMTOOLS_USE_GLIB form of the 2 functions listed above and
the Makefile.am in that directory specifies that VMTOOLS_CPPFLAGS
are to be added to the library specific CPPFLAGS.

lib/rpcIn contains no similar specification in the Makefile.am
and as a result, rpcin.c is compiled WITHOUT the VMTOOLS_USE_GLIB
define and thus the wrong form of the functions are compiled.

Once the define was added to the Makefile, the heartbeat
was seen by the ESX host and marked with status "green" in
the /var/log/vmware/hostd.log.

What I cannot fathom is that the build problem has existed in
the open-vm-tools releases for a long long time.

  - in the current release - 2011.06.27-437995
  - existed in the 2010.03.20-243334 release
  - appears to have existed in the 2009.09.18-193784 release

So how has this worked in any build, on any platform??

  - UNLESS, all builds have been forcing the VMTOOLS_USE_GLIB
    define on CFLAGS or CPPFLAGS  prior to running the configure
    command.

  - OR is there another  mechanism to establish a VM
    heartbeat that I have yet to activate?

Obviously I am somewhat baffled.

As to a source tree fix, I am assuming that structuring the
lib/rpcIn/Makefile.am like lib/rpcChannel/Makefile.in. 

I have not tried that since I currently  have automake 1.10
on my system.  For the time being I have added VMTOOLS_CPPFLAGS to
the compile commands in the Makefile.in.

-- John Wolfe      UnXis, Inc.




------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
open-vm-tools-devel mailing list
open-vm-tools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-vm-tools-devel

Reply via email to