[PATCH 0 of 2] Enable ECTP's multiple namespace capability

To enable the multiple namespace capability of the ElementConformsToProfile association it was necessary to 1) enable provider_register script for multiple namespace registration 2) register ECTP to root/virt 3) fix minor namespace bug in ECTP

# HG changeset patch # User Heidi Eckhart <heidieck@linux.vnet.ibm.com> # Date 1201005483 -3600 # Node ID 946081cff94e6ef92587edbf7a712113db37a1a2 # Parent 2adbc38cef059981a838033097778cb2f320d3eb fixes provider_register script for multiple namespace registration Signed-off-by: Heidi Eckhart <heidieck@linux.vnet.ibm.com> diff -r 2adbc38cef05 -r 946081cff94e provider-register.sh --- a/provider-register.sh Mon Jan 21 16:32:35 2008 -0500 +++ b/provider-register.sh Tue Jan 22 13:38:03 2008 +0100 @@ -35,6 +35,8 @@ pegasus_transform() pegasus_transform() { OUTFILE=$1 + shift + namespace=$1 shift regfiles=$* PROVIDERMODULES=`cat $regfiles 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` @@ -114,7 +116,9 @@ EOFP return 1;; esac done - cat >> $OUTFILE <<EOFC + if test $namespace = $NAMESPACE + then + cat >> $OUTFILE <<EOFC instance of PG_ProviderCapabilities { ProviderModuleName = "$PROVIDERMODULE"; @@ -128,6 +132,7 @@ instance of PG_ProviderCapabilities }; EOFC + fi done done } @@ -197,10 +202,9 @@ pegasus_install() fi done - trap "rm -f $_REGFILENAME" EXIT - if pegasus_transform $_REGFILENAME $myregs + if pegasus_transform $_REGFILENAME $namespace $myregs then chatter Registering providers with $state cimserver $CIMMOF -uc -I $mofpath -n $namespace $mymofs && @@ -314,6 +318,8 @@ sfcb_transform() { OUTFILE=$1 shift + namespace=$1 + shift regfiles=$* #produce sfcb registraion @@ -321,8 +327,10 @@ sfcb_transform() do cat $rf | grep -v '^[[:space:]]*#.*' | while read CLASSNAME NAMESPACE PROVIDERNAME PROVIDERMODULE CAPS do - chatter "Registering class" $CLASSNAME - cat >> $OUTFILE <<EOFC + if test $namespace = $NAMESPACE + then + chatter "Registering class" $CLASSNAME + cat >> $OUTFILE <<EOFC [$CLASSNAME] provider: $PROVIDERNAME location: $PROVIDERMODULE @@ -330,6 +338,7 @@ sfcb_transform() namespace: $NAMESPACE # EOFC + fi done done } @@ -425,7 +434,7 @@ sfcb_install() trap "rm -f $_REGFILENAME" EXIT - if sfcb_transform $_REGFILENAME $myregs + if sfcb_transform $_REGFILENAME $namespace $myregs then chatter "Staging provider registration." sfcbstage -n $namespace -r $_REGFILENAME $mymofs

# HG changeset patch # User Heidi Eckhart <heidieck@linux.vnet.ibm.com> # Date 1201005493 -3600 # Node ID a1e219a2a4d04d008c128bf393368ac279f682c9 # Parent 946081cff94e6ef92587edbf7a712113db37a1a2 ECTP: enabled for multiple namespace registration - register ElementConformsToProfile to root/virt namespace - fixed root/interop namespace for ME to RP direction Signed-off-by: Heidi Eckhart <heidieck@linux.vnet.ibm.com> diff -r 946081cff94e -r a1e219a2a4d0 Makefile.am --- a/Makefile.am Tue Jan 22 13:38:03 2008 +0100 +++ b/Makefile.am Tue Jan 22 13:38:13 2008 +0100 @@ -76,7 +76,8 @@ REGS = \ schema/HostedService.registration \ schema/ElementSettingData.registration \ schema/VSMigrationCapabilities.registration \ - schema/VSMigrationService.registration + schema/VSMigrationService.registration \ + schema/ElementConformsToProfile.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r 946081cff94e -r a1e219a2a4d0 schema/ElementConformsToProfile.registration --- a/schema/ElementConformsToProfile.registration Tue Jan 22 13:38:03 2008 +0100 +++ b/schema/ElementConformsToProfile.registration Tue Jan 22 13:38:13 2008 +0100 @@ -1,6 +1,6 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -#Xen_ElementConformsToProfile root/virt Virt_ElementConformsToProfile Virt_ElementConformsToProfile association +Xen_ElementConformsToProfile root/virt Virt_ElementConformsToProfile Virt_ElementConformsToProfile association Xen_ElementConformsToProfile root/interop Virt_ElementConformsToProfile Virt_ElementConformsToProfile association -#KVM_ElementConformsToProfile root/virt Virt_ElementConformsToProfile Virt_ElementConformsToProfile association +KVM_ElementConformsToProfile root/virt Virt_ElementConformsToProfile Virt_ElementConformsToProfile association KVM_ElementConformsToProfile root/interop Virt_ElementConformsToProfile Virt_ElementConformsToProfile association diff -r 946081cff94e -r a1e219a2a4d0 src/Virt_ElementConformsToProfile.c --- a/src/Virt_ElementConformsToProfile.c Tue Jan 22 13:38:03 2008 +0100 +++ b/src/Virt_ElementConformsToProfile.c Tue Jan 22 13:38:13 2008 +0100 @@ -169,7 +169,7 @@ static CMPIStatus elem_to_prof(const CMP continue; instance = reg_prof_instance(_BROKER, - "/root/interop", + "root/interop", NULL, conn, candidate);

Heidi Eckhart wrote:
To enable the multiple namespace capability of the ElementConformsToProfile association it was necessary to 1) enable provider_register script for multiple namespace registration 2) register ECTP to root/virt 3) fix minor namespace bug in ECTP
I hit a minor issue with Pegasus. After a postinstall, I see the following: Warning: the instance already exists. In this implementation, that means it cannot be changed. Warning: the instance already exists. In this implementation, that means it cannot be changed. Otherwise, this set looks good. -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

Kaitlin Rupert wrote:
I hit a minor issue with Pegasus. After a postinstall, I see the following:
Warning: the instance already exists. In this implementation, that means it cannot be changed. Warning: the instance already exists. In this implementation, that means it cannot be changed.
Yes, I'm aware of this issue. The reason for this message is following. To register a provider for Pegasus it is necessary to create the following instances (that are configured by the <classname>.registration file) in Pegasus' root/PG_InterOp namespace. This is the content of the ElementConformsToProfile.registration file: Xen_ElementConformsToProfile root/virt Virt_ElementConformsToProfile Virt_ElementConformsToProfile association Xen_ElementConformsToProfile root/interop Virt_ElementConformsToProfile Virt_ElementConformsToProfile association KVM_ElementConformsToProfile root/virt Virt_ElementConformsToProfile Virt_ElementConformsToProfile association KVM_ElementConformsToProfile root/interop Virt_ElementConformsToProfile Virt_ElementConformsToProfile association that is translated to: * one instance of PG_ProviderModule registering the provider's module name as defined by STDA_AssocMIStub() ... Virt_ElementConformsToProfile * one instance of PG_Provider registering the name of the provider library ... Virt_ElementConformsToProfile * one instance of PG_ProviderCapabilities per classname registration - one instance of PG_ProviderCapabilities ... Xen_ElementConformsToProfile-1 (root/virt) - one instance of PG_ProviderCapabilities ... Xen_ElementConformsToProfile-2 (root/interop) - one instance of PG_ProviderCapabilities ... KVM_ElementConformsToProfile-3 (root/virt) - one instance of PG_ProviderCapabilities ... KVM_ElementConformsToProfile-4 (root/interop) This is done each time when running provider_register - in our case twice ... root/virt and root/interop (see Makefile.am postinstall step). The provider_register script does now skip all PG_ProviderCapabilities instances, who's namespace is not the same as the one given by the caller of provider_register. But with the current setup of provider_register it would cause a disproportional effort to make the second run (root/interop) aware of that the first run (root/virt) has already registered PG_ProviderModule and PG_Provider. As the second registration try does only cause the warnings above but no corruption, I decided to live with them (for now). FYI ... sfcb's registration does not run into this issue :). -- Regards Heidi Eckhart Software Engineer IBM Linux Technology Center - Open Hypervisor

Heidi Eckhart wrote:
Kaitlin Rupert wrote:
I hit a minor issue with Pegasus. After a postinstall, I see the following:
Warning: the instance already exists. In this implementation, that means it cannot be changed. Warning: the instance already exists. In this implementation, that means it cannot be changed.
Yes, I'm aware of this issue. The reason for this message is following. To register a provider for Pegasus it is necessary to create the following instances (that are configured by the <classname>.registration file) in Pegasus' root/PG_InterOp namespace.
This is the content of the ElementConformsToProfile.registration file: Xen_ElementConformsToProfile root/virt Virt_ElementConformsToProfile Virt_ElementConformsToProfile association Xen_ElementConformsToProfile root/interop Virt_ElementConformsToProfile Virt_ElementConformsToProfile association KVM_ElementConformsToProfile root/virt Virt_ElementConformsToProfile Virt_ElementConformsToProfile association KVM_ElementConformsToProfile root/interop Virt_ElementConformsToProfile Virt_ElementConformsToProfile association
that is translated to: * one instance of PG_ProviderModule registering the provider's module name as defined by STDA_AssocMIStub() ... Virt_ElementConformsToProfile * one instance of PG_Provider registering the name of the provider library ... Virt_ElementConformsToProfile * one instance of PG_ProviderCapabilities per classname registration - one instance of PG_ProviderCapabilities ... Xen_ElementConformsToProfile-1 (root/virt) - one instance of PG_ProviderCapabilities ... Xen_ElementConformsToProfile-2 (root/interop) - one instance of PG_ProviderCapabilities ... KVM_ElementConformsToProfile-3 (root/virt) - one instance of PG_ProviderCapabilities ... KVM_ElementConformsToProfile-4 (root/interop)
This is done each time when running provider_register - in our case twice ... root/virt and root/interop (see Makefile.am postinstall step). The provider_register script does now skip all PG_ProviderCapabilities instances, who's namespace is not the same as the one given by the caller of provider_register. But with the current setup of provider_register it would cause a disproportional effort to make the second run (root/interop) aware of that the first run (root/virt) has already registered PG_ProviderModule and PG_Provider. As the second registration try does only cause the warnings above but no corruption, I decided to live with them (for now). FYI ... sfcb's registration does not run into this issue :).
Thanks for the excellent explanation Heidi. This makes sense to me. And I agree, it seems like a considerable effort to change the provider_register script. +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

Heidi Eckhart wrote:
To enable the multiple namespace capability of the ElementConformsToProfile association it was necessary to 1) enable provider_register script for multiple namespace registration 2) register ECTP to root/virt 3) fix minor namespace bug in ECTP
Dan, please can you check in this patch set ? Thanks ... Heidi -- Regards Heidi Eckhart Software Engineer IBM Linux Technology Center - Open Hypervisor

HE> Dan, please can you check in this patch set ? Thanks ... Heidi Sorry about that, I thought I had. It's applied now! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com
participants (3)
-
Dan Smith
-
Heidi Eckhart
-
Kaitlin Rupert