1665 lines
64 KiB
Diff
1665 lines
64 KiB
Diff
|
--- pegasus/TestMakefile.obz5051 2006-02-17 18:46:50.000000000 -0500
|
||
|
+++ pegasus/TestMakefile 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -257,6 +257,8 @@
|
||
|
$(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestBinRepository
|
||
|
$(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOP_TS1
|
||
|
$(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_IndInit_TS1
|
||
|
+ $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOPProvFail_TS1
|
||
|
+ $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOPProvFail_TS2
|
||
|
$(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_INDSSL_TS1
|
||
|
$(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_SSL_TS1
|
||
|
$(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_G11N_TS1
|
||
|
@@ -360,6 +362,61 @@
|
||
|
TESTSUITE_CMDS="$(IndInit_TS1b_TEST_CMDS)"
|
||
|
|
||
|
###############################################################################
|
||
|
+## OOPProvFail Test Suite 1: OOP Provider Module Failure Tests
|
||
|
+##
|
||
|
+## Configuration Options: forceProviderProcesses=true
|
||
|
+## enableAuthentication=true, enableAuthentication=false
|
||
|
+##
|
||
|
+## NOTE: Regardless of the setting of PEGASUS_DEFAULT_ENABLE_OOP, this test
|
||
|
+## suite is always run with OOP enabled. This test suite causes a provider to
|
||
|
+## exit. Running this test suite with OOP disabled would cause the cimserver
|
||
|
+## to exit and the test suite to fail.
|
||
|
+##
|
||
|
+## NOTE: The test is run once with authentication enabled, and once without
|
||
|
+## authentication enabled.
|
||
|
+##
|
||
|
+###############################################################################
|
||
|
+OOPProvFail_TS1a_CONFIG_OPTIONS = forceProviderProcesses=true enableAuthentication=true
|
||
|
+OOPProvFail_TS1b_CONFIG_OPTIONS = forceProviderProcesses=true enableAuthentication=false
|
||
|
+OOPProvFail_TS1_TEST_CMDS = \
|
||
|
+ $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS1
|
||
|
+
|
||
|
+run_OOPProvFail_TS1:
|
||
|
+ $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
|
||
|
+ CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS1a_CONFIG_OPTIONS)" \
|
||
|
+ TESTSUITE_CMDS="$(OOPProvFail_TS1_TEST_CMDS)"
|
||
|
+ $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
|
||
|
+ CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS1b_CONFIG_OPTIONS)" \
|
||
|
+ TESTSUITE_CMDS="$(OOPProvFail_TS1_TEST_CMDS)"
|
||
|
+
|
||
|
+###############################################################################
|
||
|
+## OOPProvFail Test Suite 2: OOP Provider Module Failure on IndicationService
|
||
|
+## Initialization Tests
|
||
|
+##
|
||
|
+## Configuration Options: forceProviderProcesses=true
|
||
|
+## enableAuthentication=true
|
||
|
+##
|
||
|
+## NOTE: Regardless of the setting of PEGASUS_DEFAULT_ENABLE_OOP, this test
|
||
|
+## suite is always run with OOP enabled. This test suite causes a provider to
|
||
|
+## exit. Running this test suite with OOP disabled would cause the cimserver
|
||
|
+## to exit and the test suite to fail.
|
||
|
+##
|
||
|
+###############################################################################
|
||
|
+OOPProvFail_TS2_CONFIG_OPTIONS = forceProviderProcesses=true enableAuthentication=true
|
||
|
+OOPProvFail_TS2a_TEST_CMDS = \
|
||
|
+ $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS2a
|
||
|
+OOPProvFail_TS2b_TEST_CMDS = \
|
||
|
+ $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS2b
|
||
|
+
|
||
|
+run_OOPProvFail_TS2:
|
||
|
+ $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
|
||
|
+ CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS2_CONFIG_OPTIONS)" \
|
||
|
+ TESTSUITE_CMDS="$(OOPProvFail_TS2a_TEST_CMDS)"
|
||
|
+ $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
|
||
|
+ CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS2_CONFIG_OPTIONS)" \
|
||
|
+ TESTSUITE_CMDS="$(OOPProvFail_TS2b_TEST_CMDS)"
|
||
|
+
|
||
|
+###############################################################################
|
||
|
## Indication SSL Test Suite 1: Indication Testing over HTTPS
|
||
|
##
|
||
|
## Configuration Options: (none)
|
||
|
--- pegasus/src/Pegasus/ProviderManager2/OOPProviderManagerRouter.cpp.obz5051 2006-05-31 11:42:03.000000000 -0400
|
||
|
+++ pegasus/src/Pegasus/ProviderManager2/OOPProviderManagerRouter.cpp 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -135,8 +135,10 @@
|
||
|
~ProviderAgentContainer();
|
||
|
|
||
|
Boolean isInitialized();
|
||
|
+ Uint16 userContext,
|
||
|
|
||
|
String getModuleName() const;
|
||
|
+ PEGASUS_PROVIDERMODULEFAIL_CALLBACK_T providerModuleFailCallback,
|
||
|
|
||
|
CIMResponseMessage* processMessage(CIMRequestMessage* request);
|
||
|
void unloadIdleProviders();
|
||
|
@@ -232,6 +234,12 @@
|
||
|
|
||
|
/**
|
||
|
Callback function to which response chunks are sent for processing.
|
||
|
+ User Context setting of the provider module served by this Provider
|
||
|
+ Agent.
|
||
|
+ */
|
||
|
+ Uint16 _userContext;
|
||
|
+
|
||
|
+ /**
|
||
|
*/
|
||
|
PEGASUS_RESPONSE_CHUNK_CALLBACK_T _responseChunkCallback;
|
||
|
|
||
|
@@ -243,6 +251,12 @@
|
||
|
/**
|
||
|
Pipe connection used to read responses from the Provider Agent.
|
||
|
*/
|
||
|
+ Callback function to be called upon detection of failure of a
|
||
|
+ provider module.
|
||
|
+ */
|
||
|
+ PEGASUS_PROVIDERMODULEFAIL_CALLBACK_T _providerModuleFailCallback;
|
||
|
+
|
||
|
+ /**
|
||
|
AutoPtr<AnonymousPipe> _pipeFromAgent;
|
||
|
/**
|
||
|
Pipe connection used to write requests to the Provider Agent.
|
||
|
@@ -332,13 +346,17 @@
|
||
|
_userName(userName),
|
||
|
_indicationCallback(indicationCallback),
|
||
|
_responseChunkCallback(responseChunkCallback),
|
||
|
+ Uint16 userContext,
|
||
|
_isInitialized(false),
|
||
|
_subscriptionInitComplete(subscriptionInitComplete)
|
||
|
+ PEGASUS_PROVIDERMODULEFAIL_CALLBACK_T providerModuleFailCallback,
|
||
|
{
|
||
|
PEG_METHOD_ENTER(TRC_PROVIDERMANAGER,
|
||
|
"ProviderAgentContainer::ProviderAgentContainer");
|
||
|
+ _userContext(userContext),
|
||
|
PEG_METHOD_EXIT();
|
||
|
}
|
||
|
+ _providerModuleFailCallback(providerModuleFailCallback),
|
||
|
|
||
|
ProviderAgentContainer::~ProviderAgentContainer()
|
||
|
{
|
||
|
@@ -520,7 +538,7 @@
|
||
|
}
|
||
|
#elif defined (PEGASUS_OS_OS400)
|
||
|
|
||
|
- //Out of provider support for OS400 goes here when needed.
|
||
|
+ //Out of process provider support for OS400 goes here when needed.
|
||
|
|
||
|
#else
|
||
|
|
||
|
@@ -903,24 +921,6 @@
|
||
|
// connection
|
||
|
//
|
||
|
{
|
||
|
- //
|
||
|
- // If not a clean shutdown, log a warning message in case module
|
||
|
- // included indication providers
|
||
|
- //
|
||
|
- if (!cleanShutdown)
|
||
|
- {
|
||
|
- Logger::put_l(
|
||
|
- Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING,
|
||
|
- "ProviderManager.OOPProviderManagerRouter."
|
||
|
- "OOP_PROVIDER_MODULE_FAILURE_DETECTED",
|
||
|
- "A failure was detected in provider module $0. The"
|
||
|
- " generation of indications by providers in this module"
|
||
|
- " may be affected. To ensure these providers are"
|
||
|
- " serving active subscriptions, disable and then"
|
||
|
- " re-enable this module using the cimprovider command.",
|
||
|
- _moduleName);
|
||
|
- }
|
||
|
-
|
||
|
AutoMutex tableLock(_outstandingRequestTableMutex);
|
||
|
|
||
|
CIMResponseMessage* response =
|
||
|
@@ -945,6 +945,21 @@
|
||
|
// We're uninitializing, so do not propagate the exception
|
||
|
PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2,
|
||
|
"Ignoring _uninitialize() exception.");
|
||
|
+
|
||
|
+ //
|
||
|
+ // If not a clean shutdown, call the provider module failure
|
||
|
+ // callback
|
||
|
+ //
|
||
|
+ if (!cleanShutdown)
|
||
|
+ {
|
||
|
+ //
|
||
|
+ // Call the provider module failure callback to
|
||
|
+ // communicate the failure to the Provider Manager Service
|
||
|
+ // Provider Manager Service will inform Indication Service
|
||
|
+ //
|
||
|
+ _providerModuleFailCallback (_moduleName, _userName,
|
||
|
+ _userContext);
|
||
|
+ }
|
||
|
}
|
||
|
|
||
|
PEG_METHOD_EXIT();
|
||
|
@@ -1389,13 +1404,15 @@
|
||
|
|
||
|
OOPProviderManagerRouter::OOPProviderManagerRouter(
|
||
|
PEGASUS_INDICATION_CALLBACK_T indicationCallback,
|
||
|
- PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback)
|
||
|
+ PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback,
|
||
|
+ PEGASUS_PROVIDERMODULEFAIL_CALLBACK_T providerModuleFailCallback)
|
||
|
{
|
||
|
PEG_METHOD_ENTER(TRC_PROVIDERMANAGER,
|
||
|
"OOPProviderManagerRouter::OOPProviderManagerRouter");
|
||
|
|
||
|
_indicationCallback = indicationCallback;
|
||
|
_responseChunkCallback = responseChunkCallback;
|
||
|
+ _providerModuleFailCallback = providerModuleFailCallback;
|
||
|
_subscriptionInitComplete = false;
|
||
|
|
||
|
PEG_METHOD_EXIT();
|
||
|
@@ -1653,6 +1670,30 @@
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
+ //
|
||
|
+ // Look up the Provider Agent for this module instance and requesting
|
||
|
+ // user
|
||
|
+ //
|
||
|
+ ProviderAgentContainer* pa = _lookupProviderAgent(providerModule,
|
||
|
+ request);
|
||
|
+ PEGASUS_ASSERT(pa != 0);
|
||
|
+
|
||
|
+ //
|
||
|
+ // Forward the request to the provider agent
|
||
|
+ //
|
||
|
+ response.reset(pa->processMessage(request));
|
||
|
+ }
|
||
|
+
|
||
|
+ response->syncAttributes(request);
|
||
|
+
|
||
|
+ PEG_METHOD_EXIT();
|
||
|
+ return response.release();
|
||
|
+}
|
||
|
+
|
||
|
+ProviderAgentContainer* OOPProviderManagerRouter::_lookupProviderAgent(
|
||
|
+ const CIMInstance& providerModule,
|
||
|
+ CIMRequestMessage* request)
|
||
|
+{
|
||
|
// Retrieve the provider module name
|
||
|
String moduleName;
|
||
|
CIMValue nameValue = providerModule.getProperty(
|
||
|
@@ -1675,7 +1716,7 @@
|
||
|
|
||
|
if (userContext == 0)
|
||
|
{
|
||
|
- userContext = PG_PROVMODULE_USERCTXT_PRIVILEGED;
|
||
|
+ userContext = PEGASUS_DEFAULT_PROV_USERCTXT;
|
||
|
}
|
||
|
|
||
|
String userName;
|
||
|
@@ -1703,7 +1744,7 @@
|
||
|
}
|
||
|
else if (userContext == PG_PROVMODULE_USERCTXT_DESIGNATED)
|
||
|
{
|
||
|
- // Retrieve the provider module name
|
||
|
+ // Retrieve the provider module designated user property value
|
||
|
providerModule.getProperty(providerModule.findProperty(
|
||
|
PEGASUS_PROPERTYNAME_MODULE_DESIGNATEDUSER)).getValue().
|
||
|
get(userName);
|
||
|
@@ -1725,26 +1766,6 @@
|
||
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,
|
||
|
"User name = " + userName);
|
||
|
|
||
|
- // Look up the Provider Agent for this module and user
|
||
|
- ProviderAgentContainer* pa = _lookupProviderAgent(moduleName, userName);
|
||
|
- PEGASUS_ASSERT(pa != 0);
|
||
|
-
|
||
|
- //
|
||
|
- // Forward the request to the provider agent
|
||
|
- //
|
||
|
- response.reset(pa->processMessage(request));
|
||
|
- }
|
||
|
-
|
||
|
- response->syncAttributes(request);
|
||
|
-
|
||
|
- PEG_METHOD_EXIT();
|
||
|
- return response.release();
|
||
|
-}
|
||
|
-
|
||
|
-ProviderAgentContainer* OOPProviderManagerRouter::_lookupProviderAgent(
|
||
|
- const String& moduleName,
|
||
|
- const String& userName)
|
||
|
-{
|
||
|
ProviderAgentContainer* pa = 0;
|
||
|
String key = moduleName + ":" + userName;
|
||
|
|
||
|
@@ -1752,7 +1773,9 @@
|
||
|
if (!_providerAgentTable.lookup(key, pa))
|
||
|
{
|
||
|
pa = new ProviderAgentContainer(
|
||
|
- moduleName, userName, _indicationCallback, _responseChunkCallback,
|
||
|
+ moduleName, userName, userContext,
|
||
|
+ _indicationCallback, _responseChunkCallback,
|
||
|
+ _providerModuleFailCallback,
|
||
|
_subscriptionInitComplete);
|
||
|
_providerAgentTable.insert(key, pa);
|
||
|
}
|
||
|
--- pegasus/src/Pegasus/ProviderManager2/ProviderManagerService.h.obz5051 2006-02-28 14:53:30.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/ProviderManager2/ProviderManagerService.h 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -79,6 +79,13 @@
|
||
|
static void responseChunkCallback(
|
||
|
CIMRequestMessage* request, CIMResponseMessage* response);
|
||
|
|
||
|
+ /**
|
||
|
+ Callback function to be called upon detection of failure of a
|
||
|
+ provider module.
|
||
|
+ */
|
||
|
+ static void providerModuleFailureCallback (const String & moduleName,
|
||
|
+ const String & userName, Uint16);
|
||
|
+
|
||
|
private:
|
||
|
ProviderManagerService();
|
||
|
|
||
|
@@ -100,8 +107,8 @@
|
||
|
|
||
|
void _updateProviderModuleStatus(
|
||
|
CIMInstance& providerModule,
|
||
|
- Uint16 fromStatus,
|
||
|
- Uint16 toStatus);
|
||
|
+ const Array<Uint16>& removeStatus,
|
||
|
+ const Array<Uint16>& appendStatus);
|
||
|
|
||
|
static ProviderManagerService* providerManagerService;
|
||
|
|
||
|
--- pegasus/src/Pegasus/ProviderManager2/ProviderManagerService.cpp.obz5051 2006-05-31 11:42:03.000000000 -0400
|
||
|
+++ pegasus/src/Pegasus/ProviderManager2/ProviderManagerService.cpp 2006-05-31 12:26:38.000000000 -0400
|
||
|
@@ -55,7 +55,6 @@
|
||
|
#include <Pegasus/Common/Tracer.h>
|
||
|
#include <Pegasus/Common/Logger.h>
|
||
|
#include <Pegasus/Common/AutoPtr.h>
|
||
|
-#include <Pegasus/Common/Constants.h>
|
||
|
|
||
|
#include <Pegasus/Config/ConfigManager.h>
|
||
|
|
||
|
@@ -117,7 +116,8 @@
|
||
|
if (forceProviderProcesses)
|
||
|
{
|
||
|
_oopProviderManagerRouter = new OOPProviderManagerRouter(
|
||
|
- indicationCallback, responseChunkCallback);
|
||
|
+ indicationCallback, responseChunkCallback,
|
||
|
+ providerModuleFailureCallback);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
@@ -126,7 +126,8 @@
|
||
|
}
|
||
|
#else
|
||
|
_oopProviderManagerRouter = new OOPProviderManagerRouter(
|
||
|
- indicationCallback, responseChunkCallback);
|
||
|
+ indicationCallback, responseChunkCallback,
|
||
|
+ providerModuleFailureCallback);
|
||
|
|
||
|
if (!forceProviderProcesses)
|
||
|
{
|
||
|
@@ -453,9 +454,16 @@
|
||
|
dynamic_cast<CIMEnableModuleResponseMessage*>(response);
|
||
|
if (emResp->cimException.getCode() == CIM_ERR_SUCCESS)
|
||
|
{
|
||
|
- _updateProviderModuleStatus(
|
||
|
- providerModule, CIM_MSE_OPSTATUS_VALUE_STOPPED,
|
||
|
- CIM_MSE_OPSTATUS_VALUE_OK);
|
||
|
+ //
|
||
|
+ // On a successful enable, remove Stopped status and
|
||
|
+ // append OK status
|
||
|
+ //
|
||
|
+ Array<Uint16> removeStatus;
|
||
|
+ Array<Uint16> appendStatus;
|
||
|
+ removeStatus.append (CIM_MSE_OPSTATUS_VALUE_STOPPED);
|
||
|
+ appendStatus.append (CIM_MSE_OPSTATUS_VALUE_OK);
|
||
|
+ _updateProviderModuleStatus
|
||
|
+ ( providerModule, removeStatus, appendStatus );
|
||
|
}
|
||
|
}
|
||
|
catch (Exception& e)
|
||
|
@@ -490,12 +498,17 @@
|
||
|
|
||
|
try
|
||
|
{
|
||
|
- // Change module status from OK to STOPPING
|
||
|
+ //
|
||
|
+ // On issuing a disable request, append Stopping status
|
||
|
+ // Do not remove existing status
|
||
|
+ //
|
||
|
if (updateModuleStatus)
|
||
|
{
|
||
|
- _updateProviderModuleStatus(
|
||
|
- providerModule, CIM_MSE_OPSTATUS_VALUE_OK,
|
||
|
- CIM_MSE_OPSTATUS_VALUE_STOPPING);
|
||
|
+ Array<Uint16> removeStatus;
|
||
|
+ Array<Uint16> appendStatus;
|
||
|
+ appendStatus.append (CIM_MSE_OPSTATUS_VALUE_STOPPING);
|
||
|
+ _updateProviderModuleStatus
|
||
|
+ ( providerModule, removeStatus, appendStatus );
|
||
|
}
|
||
|
|
||
|
// Forward the request to the ProviderManager
|
||
|
@@ -508,21 +521,44 @@
|
||
|
dynamic_cast<CIMDisableModuleResponseMessage*>(response);
|
||
|
if (dmResp->cimException.getCode() != CIM_ERR_SUCCESS)
|
||
|
{
|
||
|
- // Disable operation failed. Module not stopped.
|
||
|
- _updateProviderModuleStatus(
|
||
|
- providerModule, CIM_MSE_OPSTATUS_VALUE_STOPPING,
|
||
|
- CIM_MSE_OPSTATUS_VALUE_OK);
|
||
|
+ //
|
||
|
+ // On an unsuccessful disable, remove Stopping status
|
||
|
+ //
|
||
|
+ Array<Uint16> removeStatus;
|
||
|
+ Array<Uint16> appendStatus;
|
||
|
+ removeStatus.append (CIM_MSE_OPSTATUS_VALUE_STOPPING);
|
||
|
+ _updateProviderModuleStatus
|
||
|
+ ( providerModule, removeStatus, appendStatus );
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
// Disable may or may not have been successful,
|
||
|
// depending on whether there are outstanding requests.
|
||
|
- // Use last operationalStatus entry.
|
||
|
- _updateProviderModuleStatus(
|
||
|
- providerModule, CIM_MSE_OPSTATUS_VALUE_STOPPING,
|
||
|
- dmResp->operationalStatus[
|
||
|
+ // Remove Stopping status
|
||
|
+ // Append status, if any, from disable module response
|
||
|
+ Array<Uint16> removeStatus;
|
||
|
+ Array<Uint16> appendStatus;
|
||
|
+ removeStatus.append (CIM_MSE_OPSTATUS_VALUE_STOPPING);
|
||
|
+ if (dmResp->operationalStatus.size() > 0)
|
||
|
+ {
|
||
|
+ //
|
||
|
+ // On a successful disable, remove an OK or a Degraded
|
||
|
+ // status, if present
|
||
|
+ //
|
||
|
+ if (dmResp->operationalStatus[
|
||
|
+ dmResp->operationalStatus.size()-1] ==
|
||
|
+ CIM_MSE_OPSTATUS_VALUE_STOPPED)
|
||
|
+ {
|
||
|
+ removeStatus.append (CIM_MSE_OPSTATUS_VALUE_OK);
|
||
|
+ removeStatus.append
|
||
|
+ (CIM_MSE_OPSTATUS_VALUE_DEGRADED);
|
||
|
+ }
|
||
|
+ appendStatus.append (dmResp->operationalStatus[
|
||
|
dmResp->operationalStatus.size()-1]);
|
||
|
}
|
||
|
+ _updateProviderModuleStatus(
|
||
|
+ providerModule, removeStatus, appendStatus);
|
||
|
+ }
|
||
|
}
|
||
|
}
|
||
|
catch (Exception& e)
|
||
|
@@ -666,7 +702,7 @@
|
||
|
providerModule = pidc.getModule();
|
||
|
}
|
||
|
|
||
|
- Uint16 userContext = 0;
|
||
|
+ Uint16 userContext = PEGASUS_DEFAULT_PROV_USERCTXT;
|
||
|
Uint32 pos = providerModule.findProperty(
|
||
|
PEGASUS_PROPERTYNAME_MODULE_USERCONTEXT);
|
||
|
if (pos != PEG_NOT_FOUND)
|
||
|
@@ -787,10 +823,16 @@
|
||
|
}
|
||
|
|
||
|
// Updates the providerModule instance and the ProviderRegistrationManager
|
||
|
+//
|
||
|
+// This method is used to update the provider module status when the module is
|
||
|
+// disabled or enabled. If a Degraded status has been set (appended) to the
|
||
|
+// OperationalStatus, it is cleared (removed) when the module is disabled or
|
||
|
+// enabled.
|
||
|
+//
|
||
|
void ProviderManagerService::_updateProviderModuleStatus(
|
||
|
CIMInstance& providerModule,
|
||
|
- Uint16 fromStatus,
|
||
|
- Uint16 toStatus)
|
||
|
+ const Array<Uint16>& removeStatus,
|
||
|
+ const Array<Uint16>& appendStatus)
|
||
|
{
|
||
|
PEG_METHOD_ENTER(TRC_PROVIDERMANAGER,
|
||
|
"ProviderManagerService::_updateProviderModuleStatus");
|
||
|
@@ -808,28 +850,10 @@
|
||
|
pos = providerModule.findProperty(CIMName("OperationalStatus"));
|
||
|
PEGASUS_ASSERT(pos != PEG_NOT_FOUND);
|
||
|
CIMProperty operationalStatusProperty = providerModule.getProperty(pos);
|
||
|
- CIMValue operationalStatusValue = operationalStatusProperty.getValue();
|
||
|
-
|
||
|
- if (!operationalStatusValue.isNull())
|
||
|
- {
|
||
|
- operationalStatusValue.get(operationalStatus);
|
||
|
- }
|
||
|
|
||
|
- //
|
||
|
- // update module status
|
||
|
- //
|
||
|
- for (Uint32 i = operationalStatus.size(); i > 0; i--)
|
||
|
- {
|
||
|
- if (operationalStatus[i-1] == fromStatus)
|
||
|
- {
|
||
|
- operationalStatus.remove(i-1);
|
||
|
- }
|
||
|
- }
|
||
|
-
|
||
|
- operationalStatus.append(toStatus);
|
||
|
-
|
||
|
- if (_providerRegistrationManager->setProviderModuleStatus(
|
||
|
- providerModuleName, operationalStatus) == false)
|
||
|
+ if (_providerRegistrationManager->updateProviderModuleStatus(
|
||
|
+ providerModuleName, removeStatus, appendStatus, operationalStatus) ==
|
||
|
+ false)
|
||
|
{
|
||
|
throw PEGASUS_CIM_EXCEPTION_L(
|
||
|
CIM_ERR_FAILED,
|
||
|
@@ -947,4 +971,140 @@
|
||
|
|
||
|
}
|
||
|
|
||
|
+void ProviderManagerService::providerModuleFailureCallback
|
||
|
+ (const String & moduleName,
|
||
|
+ const String & userName,
|
||
|
+ Uint16 userContext)
|
||
|
+{
|
||
|
+ PEG_METHOD_ENTER (TRC_PROVIDERMANAGER,
|
||
|
+ "ProviderManagerService::providerModuleFailureCallback");
|
||
|
+
|
||
|
+ if (userContext == PG_PROVMODULE_USERCTXT_REQUESTOR)
|
||
|
+ {
|
||
|
+ Logger::put_l (
|
||
|
+ Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING,
|
||
|
+ "ProviderManager.OOPProviderManagerRouter."
|
||
|
+ "OOP_PROVIDER_MODULE_USER_CTXT_FAILURE_DETECTED",
|
||
|
+ "A failure was detected in provider module $0 with"
|
||
|
+ " user context $1.",
|
||
|
+ moduleName, userName);
|
||
|
+ }
|
||
|
+ else // not requestor context
|
||
|
+ {
|
||
|
+ Logger::put_l (
|
||
|
+ Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING,
|
||
|
+ "ProviderManager.OOPProviderManagerRouter."
|
||
|
+ "OOP_PROVIDER_MODULE_FAILURE_DETECTED",
|
||
|
+ "A failure was detected in provider module $0.",
|
||
|
+ moduleName);
|
||
|
+ }
|
||
|
+
|
||
|
+ //
|
||
|
+ // Create Notify Provider Fail request message
|
||
|
+ //
|
||
|
+ CIMNotifyProviderFailRequestMessage * request =
|
||
|
+ new CIMNotifyProviderFailRequestMessage
|
||
|
+ (XmlWriter::getNextMessageId (),
|
||
|
+ moduleName,
|
||
|
+ userName,
|
||
|
+ QueueIdStack ());
|
||
|
+
|
||
|
+ //
|
||
|
+ // Send Notify Provider Fail request message to Indication Service
|
||
|
+ //
|
||
|
+ if (_indicationServiceQueueId == PEG_NOT_FOUND)
|
||
|
+ {
|
||
|
+ Array <Uint32> serviceIds;
|
||
|
+
|
||
|
+ providerManagerService->find_services
|
||
|
+ (PEGASUS_QUEUENAME_INDICATIONSERVICE, 0, 0, &serviceIds);
|
||
|
+ PEGASUS_ASSERT (serviceIds.size () != 0);
|
||
|
+
|
||
|
+ _indicationServiceQueueId = serviceIds [0];
|
||
|
+ }
|
||
|
+
|
||
|
+ request->queueIds = QueueIdStack
|
||
|
+ (_indicationServiceQueueId, providerManagerService->getQueueId ());
|
||
|
+
|
||
|
+ AsyncLegacyOperationStart * asyncRequest = new AsyncLegacyOperationStart
|
||
|
+ (providerManagerService->get_next_xid (),
|
||
|
+ 0,
|
||
|
+ _indicationServiceQueueId,
|
||
|
+ request,
|
||
|
+ _indicationServiceQueueId);
|
||
|
+
|
||
|
+ AutoPtr <AsyncReply> asyncReply
|
||
|
+ (providerManagerService->SendWait (asyncRequest));
|
||
|
+
|
||
|
+ AutoPtr <CIMNotifyProviderFailResponseMessage> response
|
||
|
+ (reinterpret_cast <CIMNotifyProviderFailResponseMessage *>
|
||
|
+ ((dynamic_cast <AsyncLegacyOperationResult *>
|
||
|
+ (asyncReply.get ()))->get_result ()));
|
||
|
+
|
||
|
+ if (response->cimException.getCode () != CIM_ERR_SUCCESS)
|
||
|
+ {
|
||
|
+ PEG_TRACE_STRING (TRC_DISCARDED_DATA, Tracer::LEVEL2,
|
||
|
+ "Unexpected exception in providerModuleFailureCallback: " +
|
||
|
+ response->cimException.getMessage ());
|
||
|
+ }
|
||
|
+ else
|
||
|
+ {
|
||
|
+ //
|
||
|
+ // Successful response
|
||
|
+ // Examine result to see if any subscriptions were affected
|
||
|
+ //
|
||
|
+ if (response->numSubscriptionsAffected > 0)
|
||
|
+ {
|
||
|
+ //
|
||
|
+ // Subscriptions were affected
|
||
|
+ // Update the provider module status to Degraded
|
||
|
+ //
|
||
|
+ try
|
||
|
+ {
|
||
|
+ CIMInstance providerModule;
|
||
|
+ CIMKeyBinding keyBinding(
|
||
|
+ _PROPERTY_PROVIDERMODULE_NAME,
|
||
|
+ moduleName,
|
||
|
+ CIMKeyBinding::STRING);
|
||
|
+ Array<CIMKeyBinding> kbArray;
|
||
|
+ kbArray.append(keyBinding);
|
||
|
+ CIMObjectPath modulePath("", PEGASUS_NAMESPACENAME_INTEROP,
|
||
|
+ PEGASUS_CLASSNAME_PROVIDERMODULE, kbArray);
|
||
|
+ providerModule =
|
||
|
+ providerManagerService->_providerRegistrationManager->
|
||
|
+ getInstance(
|
||
|
+ modulePath, false, false, CIMPropertyList());
|
||
|
+
|
||
|
+ Array<Uint16> removeStatus;
|
||
|
+ Array<Uint16> appendStatus;
|
||
|
+ removeStatus.append(CIM_MSE_OPSTATUS_VALUE_OK);
|
||
|
+ appendStatus.append(CIM_MSE_OPSTATUS_VALUE_DEGRADED);
|
||
|
+ providerManagerService->_updateProviderModuleStatus(
|
||
|
+ providerModule, removeStatus, appendStatus);
|
||
|
+ }
|
||
|
+ catch (const Exception & e)
|
||
|
+ {
|
||
|
+ PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2,
|
||
|
+ "Failed to update provider module status: " +
|
||
|
+ e.getMessage());
|
||
|
+ }
|
||
|
+
|
||
|
+ //
|
||
|
+ // Log a warning message since subscriptions were affected
|
||
|
+ //
|
||
|
+ Logger::put_l (
|
||
|
+ Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING,
|
||
|
+ "ProviderManager.OOPProviderManagerRouter."
|
||
|
+ "OOP_PROVIDER_MODULE_SUBSCRIPTIONS_AFFECTED",
|
||
|
+ "The generation of indications by providers in module $0 "
|
||
|
+ "may be affected. To ensure these providers are serving "
|
||
|
+ "active subscriptions, disable and then re-enable this "
|
||
|
+ "module using the cimprovider command.",
|
||
|
+ moduleName);
|
||
|
+ }
|
||
|
+ }
|
||
|
+
|
||
|
+ PEG_METHOD_EXIT();
|
||
|
+}
|
||
|
+
|
||
|
PEGASUS_NAMESPACE_END
|
||
|
--- pegasus/src/Pegasus/ProviderManager2/OOPProviderManagerRouter.h.obz5051 2006-02-28 14:53:30.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/ProviderManager2/OOPProviderManagerRouter.h 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -51,6 +51,9 @@
|
||
|
|
||
|
PEGASUS_NAMESPACE_BEGIN
|
||
|
|
||
|
+typedef void (*PEGASUS_PROVIDERMODULEFAIL_CALLBACK_T)(const String &,
|
||
|
+ const String &, Uint16);
|
||
|
+
|
||
|
class ProviderAgentContainer;
|
||
|
|
||
|
typedef HashTable<String, ProviderAgentContainer*, EqualFunc<String>,
|
||
|
@@ -62,7 +65,8 @@
|
||
|
public:
|
||
|
OOPProviderManagerRouter(
|
||
|
PEGASUS_INDICATION_CALLBACK_T indicationCallback,
|
||
|
- PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback);
|
||
|
+ PEGASUS_RESPONSE_CHUNK_CALLBACK_T responseChunkCallback,
|
||
|
+ PEGASUS_PROVIDERMODULEFAIL_CALLBACK_T providerModuleFailCallback);
|
||
|
|
||
|
virtual ~OOPProviderManagerRouter();
|
||
|
|
||
|
@@ -85,13 +89,12 @@
|
||
|
|
||
|
/**
|
||
|
Return a pointer to the ProviderAgentContainer for the specified
|
||
|
- moduleName and userName. If no ProviderAgentContainer exists for
|
||
|
- this moduleName/userName pair, one is created in an uninitialized
|
||
|
- state.
|
||
|
+ module instance and requesting user. If no appropriate
|
||
|
+ ProviderAgentContainer exists, one is created in an uninitialized state.
|
||
|
*/
|
||
|
ProviderAgentContainer* _lookupProviderAgent(
|
||
|
- const String& moduleName,
|
||
|
- const String& userName);
|
||
|
+ const CIMInstance& providerModule,
|
||
|
+ CIMRequestMessage* request);
|
||
|
|
||
|
/**
|
||
|
Return an array of pointers to ProviderAgentContainers for the
|
||
|
@@ -122,6 +125,12 @@
|
||
|
PEGASUS_RESPONSE_CHUNK_CALLBACK_T _responseChunkCallback;
|
||
|
|
||
|
/**
|
||
|
+ Callback function to be called upon detection of failure of a
|
||
|
+ provider module.
|
||
|
+ */
|
||
|
+ PEGASUS_PROVIDERMODULEFAIL_CALLBACK_T _providerModuleFailCallback;
|
||
|
+
|
||
|
+ /**
|
||
|
The _providerAgentTable contains a ProviderAgentContainer entry for
|
||
|
each of the Provider Agent processes for which a request has been
|
||
|
processed. ProviderAgentContainer objects are persistent; once one
|
||
|
--- pegasus/src/Pegasus/IndicationService/SubscriptionTable.cpp.obz5051 2006-01-30 11:17:55.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/IndicationService/SubscriptionTable.cpp 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -159,11 +159,11 @@
|
||
|
return matchingSubscriptions;
|
||
|
}
|
||
|
|
||
|
-Array <CIMInstance> SubscriptionTable::getAndUpdateProviderSubscriptions (
|
||
|
+Array <CIMInstance> SubscriptionTable::reflectProviderDisable (
|
||
|
const CIMInstance & provider)
|
||
|
{
|
||
|
PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
|
||
|
- "SubscriptionTable::getAndUpdateProviderSubscriptions");
|
||
|
+ "SubscriptionTable::reflectProviderDisable");
|
||
|
|
||
|
Array <CIMInstance> providerSubscriptions;
|
||
|
|
||
|
@@ -230,40 +230,9 @@
|
||
|
if (providerIndex != PEG_NOT_FOUND)
|
||
|
{
|
||
|
tableValue.providers.remove (providerIndex);
|
||
|
- if (tableValue.providers.size () > 0)
|
||
|
- {
|
||
|
- //
|
||
|
- // At least one provider is still serving the
|
||
|
- // subscription
|
||
|
- // Update entry in Active Subscriptions table
|
||
|
- //
|
||
|
- _removeActiveSubscriptionsEntry
|
||
|
- (activeSubscriptionsKey);
|
||
|
- _insertActiveSubscriptionsEntry
|
||
|
- (tableValue.subscription, tableValue.providers);
|
||
|
- }
|
||
|
- else
|
||
|
- {
|
||
|
- //
|
||
|
- // If the terminated provider was the only provider
|
||
|
- // serving the subscription, implement the
|
||
|
- // subscription's On Fatal Error Policy
|
||
|
- //
|
||
|
- Boolean removedOrDisabled =
|
||
|
- _subscriptionRepository->reconcileFatalError
|
||
|
- (tableValue.subscription);
|
||
|
- _removeActiveSubscriptionsEntry
|
||
|
- (activeSubscriptionsKey);
|
||
|
- if (!removedOrDisabled)
|
||
|
- {
|
||
|
- //
|
||
|
- // If subscription was not disabled or deleted
|
||
|
- // Update entry in Active Subscriptions table
|
||
|
- //
|
||
|
- _insertActiveSubscriptionsEntry
|
||
|
- (tableValue.subscription, tableValue.providers);
|
||
|
- }
|
||
|
- }
|
||
|
+
|
||
|
+ _updateSubscriptionProviders (activeSubscriptionsKey,
|
||
|
+ tableValue.subscription, tableValue.providers);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
@@ -293,6 +262,159 @@
|
||
|
return providerSubscriptions;
|
||
|
}
|
||
|
|
||
|
+Array <ActiveSubscriptionsTableEntry>
|
||
|
+SubscriptionTable::reflectProviderModuleFailure
|
||
|
+ (const String & moduleName,
|
||
|
+ const String & userName,
|
||
|
+ Boolean authenticationEnabled)
|
||
|
+{
|
||
|
+ PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
|
||
|
+ "SubscriptionTable::reflectProviderModuleFailure");
|
||
|
+
|
||
|
+ Array <ActiveSubscriptionsTableEntry> providerModuleSubscriptions;
|
||
|
+
|
||
|
+ //
|
||
|
+ // Iterate through the subscription table to find subscriptions served by
|
||
|
+ // a provider in the specified module, with the specified userName as the
|
||
|
+ // subscription creator
|
||
|
+ // NOTE: updating entries (remove and insert) while iterating through the
|
||
|
+ // table is not allowed
|
||
|
+ // The SubscriptionTable first iterates through the active subscriptions
|
||
|
+ // table to find matching subscriptions served by a provider in the
|
||
|
+ // specified module, then looks up and updates each affected subscription
|
||
|
+ //
|
||
|
+ {
|
||
|
+ //
|
||
|
+ // Acquire and hold the write lock during the entire
|
||
|
+ // lookup/remove/insert process, allowing competing threads to apply
|
||
|
+ // their logic over a consistent view of the data.
|
||
|
+ // Do not call any other methods that need
|
||
|
+ // _activeSubscriptionsTableLock.
|
||
|
+ //
|
||
|
+ WriteLock lock (_activeSubscriptionsTableLock);
|
||
|
+
|
||
|
+ for (ActiveSubscriptionsTable::Iterator i =
|
||
|
+ _activeSubscriptionsTable.start (); i; i++)
|
||
|
+ {
|
||
|
+ ActiveSubscriptionsTableEntry tableValue;
|
||
|
+ //
|
||
|
+ // Get subscription creator
|
||
|
+ //
|
||
|
+ tableValue = i.value ();
|
||
|
+ String creator;
|
||
|
+ CIMValue creatorValue = tableValue.subscription.getProperty
|
||
|
+ (tableValue.subscription.findProperty
|
||
|
+ (PEGASUS_PROPERTYNAME_INDSUB_CREATOR)).getValue();
|
||
|
+ creatorValue.get (creator);
|
||
|
+
|
||
|
+ Array <ProviderClassList> failedProviderList;
|
||
|
+ for (Uint32 j = 0; j < tableValue.providers.size (); j++)
|
||
|
+ {
|
||
|
+ //
|
||
|
+ // Get provider module name
|
||
|
+ //
|
||
|
+ String providerModuleName;
|
||
|
+ CIMValue nameValue =
|
||
|
+ tableValue.providers [j].providerModule.getProperty
|
||
|
+ (tableValue.providers [j].providerModule.findProperty
|
||
|
+ (_PROPERTY_NAME)).getValue ();
|
||
|
+ nameValue.get (providerModuleName);
|
||
|
+
|
||
|
+ //
|
||
|
+ // Get module user context setting
|
||
|
+ //
|
||
|
+ Uint16 moduleContext = PEGASUS_DEFAULT_PROV_USERCTXT;
|
||
|
+ CIMValue contextValue =
|
||
|
+ tableValue.providers [j].providerModule.getProperty
|
||
|
+ (tableValue.providers [j].providerModule.findProperty
|
||
|
+ (PEGASUS_PROPERTYNAME_MODULE_USERCONTEXT)).getValue ();
|
||
|
+ if (!contextValue.isNull ())
|
||
|
+ {
|
||
|
+ contextValue.get (moduleContext);
|
||
|
+ }
|
||
|
+
|
||
|
+ //
|
||
|
+ // If provider module name matches,
|
||
|
+ // add provider to the list of failed providers
|
||
|
+ //
|
||
|
+ if (providerModuleName == moduleName)
|
||
|
+ {
|
||
|
+ //
|
||
|
+ // If authentication is enabled, and module was run as
|
||
|
+ // requestor, subscription creator must also match module
|
||
|
+ // user context name, to add provider to the list of
|
||
|
+ // failed providers
|
||
|
+ //
|
||
|
+ if ((moduleContext != PG_PROVMODULE_USERCTXT_REQUESTOR) ||
|
||
|
+ (!authenticationEnabled) || (creator == userName))
|
||
|
+ {
|
||
|
+ //
|
||
|
+ // Add the provider to the list
|
||
|
+ //
|
||
|
+ failedProviderList.append
|
||
|
+ (tableValue.providers [j]);
|
||
|
+ }
|
||
|
+ } // if provider module name matches
|
||
|
+ } // for each subscription provider
|
||
|
+
|
||
|
+ //
|
||
|
+ // If there were any failed providers, add the subscription
|
||
|
+ // entry to the list of affected subscriptions
|
||
|
+ //
|
||
|
+ if (failedProviderList.size () > 0)
|
||
|
+ {
|
||
|
+ ActiveSubscriptionsTableEntry subscription;
|
||
|
+ subscription.subscription = tableValue.subscription;
|
||
|
+ subscription.providers = failedProviderList;
|
||
|
+ providerModuleSubscriptions.append (subscription);
|
||
|
+ }
|
||
|
+ }
|
||
|
+
|
||
|
+ //
|
||
|
+ // Look up and update hash table entry for each affected subscription
|
||
|
+ //
|
||
|
+ for (Uint32 k = 0; k < providerModuleSubscriptions.size (); k++)
|
||
|
+ {
|
||
|
+ //
|
||
|
+ // Update the entry in the active subscriptions hash table
|
||
|
+ //
|
||
|
+ CIMObjectPath activeSubscriptionsKey =
|
||
|
+ _generateActiveSubscriptionsKey
|
||
|
+ (providerModuleSubscriptions [k].subscription.getPath ());
|
||
|
+ ActiveSubscriptionsTableEntry tableValue;
|
||
|
+ if (_activeSubscriptionsTable.lookup (activeSubscriptionsKey,
|
||
|
+ tableValue))
|
||
|
+ {
|
||
|
+ Array <ProviderClassList> updatedProviderList;
|
||
|
+ for (Uint32 l = 0; l < tableValue.providers.size (); l++)
|
||
|
+ {
|
||
|
+ String providerModuleName;
|
||
|
+ CIMValue nameValue =
|
||
|
+ tableValue.providers [l].providerModule.getProperty
|
||
|
+ (tableValue.providers [l].providerModule.findProperty
|
||
|
+ (_PROPERTY_NAME)).getValue ();
|
||
|
+ nameValue.get (providerModuleName);
|
||
|
+ if (providerModuleName != moduleName)
|
||
|
+ {
|
||
|
+ //
|
||
|
+ // Provider is not in the failed module
|
||
|
+ // Append provider to list of providers still serving
|
||
|
+ // the subscription
|
||
|
+ //
|
||
|
+ updatedProviderList.append (tableValue.providers [l]);
|
||
|
+ }
|
||
|
+ }
|
||
|
+
|
||
|
+ _updateSubscriptionProviders (activeSubscriptionsKey,
|
||
|
+ tableValue.subscription, updatedProviderList);
|
||
|
+ }
|
||
|
+ }
|
||
|
+ }
|
||
|
+
|
||
|
+ PEG_METHOD_EXIT ();
|
||
|
+ return providerModuleSubscriptions;
|
||
|
+}
|
||
|
+
|
||
|
CIMObjectPath SubscriptionTable::_generateActiveSubscriptionsKey (
|
||
|
const CIMObjectPath & subscription) const
|
||
|
{
|
||
|
@@ -494,6 +616,51 @@
|
||
|
PEG_METHOD_EXIT ();
|
||
|
}
|
||
|
|
||
|
+void SubscriptionTable::_updateSubscriptionProviders
|
||
|
+ (const CIMObjectPath & activeSubscriptionsKey,
|
||
|
+ const CIMInstance & subscription,
|
||
|
+ const Array <ProviderClassList> & updatedProviderList)
|
||
|
+{
|
||
|
+ PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
|
||
|
+ "SubscriptionTable::_updateSubscriptionProviders");
|
||
|
+
|
||
|
+ if (updatedProviderList.size () > 0)
|
||
|
+ {
|
||
|
+ //
|
||
|
+ // At least one provider is still serving the
|
||
|
+ // subscription
|
||
|
+ // Update entry in Active Subscriptions table
|
||
|
+ //
|
||
|
+ _removeActiveSubscriptionsEntry (activeSubscriptionsKey);
|
||
|
+ _insertActiveSubscriptionsEntry (subscription, updatedProviderList);
|
||
|
+ }
|
||
|
+ else
|
||
|
+ {
|
||
|
+ //
|
||
|
+ // The disabled or failed provider(s) was (were) the only provider(s)
|
||
|
+ // serving the subscription
|
||
|
+ // Implement the subscription's On Fatal Error Policy
|
||
|
+ //
|
||
|
+ Boolean removedOrDisabled =
|
||
|
+ _subscriptionRepository->reconcileFatalError (subscription);
|
||
|
+ _removeActiveSubscriptionsEntry (activeSubscriptionsKey);
|
||
|
+ if (!removedOrDisabled)
|
||
|
+ {
|
||
|
+ //
|
||
|
+ // If subscription was not disabled or deleted
|
||
|
+ // Update entry in Active Subscriptions table
|
||
|
+ // Note that in this case the updatedProviderList is
|
||
|
+ // empty - no providers are serving the subscription
|
||
|
+ // currently
|
||
|
+ //
|
||
|
+ _insertActiveSubscriptionsEntry (subscription,
|
||
|
+ updatedProviderList);
|
||
|
+ }
|
||
|
+ }
|
||
|
+
|
||
|
+ PEG_METHOD_EXIT ();
|
||
|
+}
|
||
|
+
|
||
|
void SubscriptionTable::insertSubscription (
|
||
|
const CIMInstance & subscription,
|
||
|
const Array <ProviderClassList> & providers,
|
||
|
--- pegasus/src/Pegasus/IndicationService/SubscriptionTable.h.obz5051 2006-01-30 11:17:55.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/IndicationService/SubscriptionTable.h 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -289,10 +289,41 @@
|
||
|
|
||
|
@return list of CIMInstance subscriptions
|
||
|
*/
|
||
|
- Array <CIMInstance> getAndUpdateProviderSubscriptions (
|
||
|
+ Array <CIMInstance> reflectProviderDisable (
|
||
|
const CIMInstance & provider);
|
||
|
|
||
|
/**
|
||
|
+ Retrieves a list of subscription table entries for subscriptions that
|
||
|
+ were being served by providers in the specified provider module, where
|
||
|
+ the subscription creator matches the specified provider module userName.
|
||
|
+ The Active Subscriptions table is updated to reflect the fact that these
|
||
|
+ subscriptions are no longer being served by the provider(s) in the
|
||
|
+ failed provider module.
|
||
|
+ This method is called when notification is received that the specified
|
||
|
+ provider module has failed. In the Active Subscriptions table, any
|
||
|
+ provider in the specified provider module is removed from the list of
|
||
|
+ providers serving the subscription.
|
||
|
+ The returned list of Active Subscriptions table entries includes for
|
||
|
+ each subscription only those providers that are in the specified
|
||
|
+ (failed) provider module and therefore are no longer serving the
|
||
|
+ subscription.
|
||
|
+
|
||
|
+ @param moduleName the provider module name
|
||
|
+ @param userName the user name for the context in which
|
||
|
+ the provider module was invoked
|
||
|
+ @param authenticationEnabled indicates whether authentication is
|
||
|
+ currently enabled
|
||
|
+
|
||
|
+ @return list of ActiveSubscriptionsTableEntry structs including the
|
||
|
+ subscriptions served by providers in the specified provider
|
||
|
+ module
|
||
|
+ */
|
||
|
+ Array <ActiveSubscriptionsTableEntry> reflectProviderModuleFailure (
|
||
|
+ const String & moduleName,
|
||
|
+ const String & userName,
|
||
|
+ Boolean authenticationEnabled);
|
||
|
+
|
||
|
+ /**
|
||
|
Determines if the specified provider is in the list of providers
|
||
|
serving the subscription.
|
||
|
|
||
|
@@ -431,6 +462,21 @@
|
||
|
const String & key);
|
||
|
|
||
|
/**
|
||
|
+ Updates the providers for an entry in the Active Subscriptions table.
|
||
|
+ The caller must first lock the _activeSubscriptionsTableLock for write
|
||
|
+ access.
|
||
|
+
|
||
|
+ @param activeSubscriptionsKey the key of the entry to update
|
||
|
+ @param subscription the subscription instance for the entry
|
||
|
+ @param updatedProviderList the updated list of providers for the
|
||
|
+ entry (may be empty)
|
||
|
+ */
|
||
|
+ void _updateSubscriptionProviders (
|
||
|
+ const CIMObjectPath & activeSubscriptionsKey,
|
||
|
+ const CIMInstance & subscription,
|
||
|
+ const Array <ProviderClassList> & updatedProviderList);
|
||
|
+
|
||
|
+ /**
|
||
|
Active Subscriptions information table. Access to this table is
|
||
|
controlled by the _activeSubscriptionsTableLock.
|
||
|
*/
|
||
|
--- pegasus/src/Pegasus/IndicationService/IndicationService.cpp.obz5051 2006-02-10 17:20:43.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/IndicationService/IndicationService.cpp 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -110,6 +110,7 @@
|
||
|
_cimRepository(repository)
|
||
|
{
|
||
|
_enableSubscriptionsForNonprivilegedUsers = false;
|
||
|
+ _authenticationEnabled = true;
|
||
|
|
||
|
try
|
||
|
{
|
||
|
@@ -126,6 +127,7 @@
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
+ _authenticationEnabled = false;
|
||
|
// Authentication needs to be enabled to perform authorization
|
||
|
// tests.
|
||
|
_enableSubscriptionsForNonprivilegedUsers = true;
|
||
|
@@ -357,6 +359,17 @@
|
||
|
}
|
||
|
break;
|
||
|
|
||
|
+ case CIM_NOTIFY_PROVIDER_FAIL_REQUEST_MESSAGE:
|
||
|
+ try
|
||
|
+ {
|
||
|
+ _handleNotifyProviderFailRequest (message);
|
||
|
+ }
|
||
|
+ catch (...)
|
||
|
+ {
|
||
|
+ ;
|
||
|
+ }
|
||
|
+ break;
|
||
|
+
|
||
|
default:
|
||
|
//
|
||
|
// A message type not supported by the Indication Service
|
||
|
@@ -1410,7 +1423,7 @@
|
||
|
(const Message* message)
|
||
|
{
|
||
|
PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
|
||
|
- "IndicationService::_handleEnumerateInstancesNamesRequest");
|
||
|
+ "IndicationService::_handleEnumerateInstanceNamesRequest");
|
||
|
|
||
|
CIMEnumerateInstanceNamesRequestMessage* request =
|
||
|
(CIMEnumerateInstanceNamesRequestMessage*) message;
|
||
|
@@ -2879,12 +2892,12 @@
|
||
|
//
|
||
|
// Get list of affected subscriptions
|
||
|
//
|
||
|
- // _subscriptionTable->getAndUpdateProviderSubscriptions also updates the
|
||
|
+ // _subscriptionTable->reflectProviderDisable also updates the
|
||
|
// Active Subscriptions hash table, and implements each subscription's
|
||
|
// On Fatal Error policy, if necessary
|
||
|
//
|
||
|
providerSubscriptions.clear ();
|
||
|
- providerSubscriptions = _subscriptionTable->getAndUpdateProviderSubscriptions
|
||
|
+ providerSubscriptions = _subscriptionTable->reflectProviderDisable
|
||
|
(providers [i]);
|
||
|
|
||
|
if (providerSubscriptions.size () > 0)
|
||
|
@@ -3240,6 +3253,41 @@
|
||
|
PEG_METHOD_EXIT ();
|
||
|
}
|
||
|
|
||
|
+void IndicationService::_handleNotifyProviderFailRequest
|
||
|
+ (Message * message)
|
||
|
+{
|
||
|
+ PEG_METHOD_ENTER (TRC_INDICATION_SERVICE,
|
||
|
+ "IndicationService::_handleNotifyProviderFailRequest");
|
||
|
+
|
||
|
+ CIMNotifyProviderFailRequestMessage * request =
|
||
|
+ dynamic_cast <CIMNotifyProviderFailRequestMessage *> (message);
|
||
|
+
|
||
|
+ String moduleName = request->moduleName;
|
||
|
+ String userName = request->userName;
|
||
|
+
|
||
|
+ //
|
||
|
+ // Determine providers in module that were serving active subscriptions
|
||
|
+ // and update the Active Subscriptions Table
|
||
|
+ //
|
||
|
+ Array <ActiveSubscriptionsTableEntry> providerModuleSubscriptions =
|
||
|
+ _subscriptionTable->reflectProviderModuleFailure
|
||
|
+ (moduleName, userName, _authenticationEnabled);
|
||
|
+
|
||
|
+ //
|
||
|
+ // FUTURE: Attempt to recreate the subscription state
|
||
|
+ //
|
||
|
+
|
||
|
+ //
|
||
|
+ // Send response
|
||
|
+ //
|
||
|
+ CIMResponseMessage * response = request->buildResponse ();
|
||
|
+ CIMNotifyProviderFailResponseMessage * failResponse =
|
||
|
+ (CIMNotifyProviderFailResponseMessage *) response;
|
||
|
+ failResponse->numSubscriptionsAffected =
|
||
|
+ providerModuleSubscriptions.size ();
|
||
|
+ _enqueueResponse (request, response);
|
||
|
+}
|
||
|
+
|
||
|
Boolean IndicationService::_canCreate (
|
||
|
CIMInstance & instance,
|
||
|
const CIMNamespaceName & nameSpace)
|
||
|
@@ -6366,6 +6414,15 @@
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
+ //
|
||
|
+ // Update subscription hash tables
|
||
|
+ //
|
||
|
+ _subscriptionTable->removeSubscription
|
||
|
+ (subscription,
|
||
|
+ indicationSubclasses,
|
||
|
+ nameSpace,
|
||
|
+ indicationProviders);
|
||
|
+
|
||
|
CIMRequestMessage * aggRequest = 0;
|
||
|
|
||
|
if (origRequest == 0)
|
||
|
@@ -6856,21 +6913,6 @@
|
||
|
}
|
||
|
|
||
|
//
|
||
|
- // Update subscription hash tables
|
||
|
- // Delete Instance, Modify Instance, or Delete Referencing or Expired
|
||
|
- // Subscription
|
||
|
- //
|
||
|
- CIMDeleteSubscriptionRequestMessage * request =
|
||
|
- (CIMDeleteSubscriptionRequestMessage *)
|
||
|
- operationAggregate->getRequest (0);
|
||
|
-
|
||
|
- _subscriptionTable->removeSubscription
|
||
|
- (request->subscriptionInstance,
|
||
|
- operationAggregate->getIndicationSubclasses (),
|
||
|
- request->nameSpace,
|
||
|
- checkProviders);
|
||
|
-
|
||
|
- //
|
||
|
// For Delete Instance or Modify Instance request, send response
|
||
|
//
|
||
|
if (operationAggregate->requiresResponse ())
|
||
|
--- pegasus/src/Pegasus/IndicationService/IndicationService.h.obz5051 2006-01-30 11:17:55.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/IndicationService/IndicationService.h 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -173,6 +173,16 @@
|
||
|
void _handleNotifyProviderEnableRequest (const Message * message);
|
||
|
|
||
|
/**
|
||
|
+ Notifies the Indication Service that failure of a provider module that
|
||
|
+ included at least one indication provider has been detected.
|
||
|
+ The Indication Service retrieves the subscriptions served by providers
|
||
|
+ in the failed module. The Indication Service returns in the response
|
||
|
+ the number of affected subscriptions, so the sender of the request
|
||
|
+ knows if any subscriptions were affected.
|
||
|
+ */
|
||
|
+ void _handleNotifyProviderFailRequest (Message * message);
|
||
|
+
|
||
|
+ /**
|
||
|
Determines if it is legal to create an instance.
|
||
|
Checks for existence of all key and required properties. Checks that
|
||
|
properties that MUST NOT exist (based on values of other properties),
|
||
|
@@ -1186,6 +1196,12 @@
|
||
|
Boolean _enableSubscriptionsForNonprivilegedUsers;
|
||
|
|
||
|
/**
|
||
|
+ Boolean indicating whether authentication is currently enabled in the
|
||
|
+ CIM Server.
|
||
|
+ */
|
||
|
+ Boolean _authenticationEnabled;
|
||
|
+
|
||
|
+ /**
|
||
|
Gets the indication class specified by the subscription filter query.
|
||
|
|
||
|
@param instance the subscription instance
|
||
|
--- pegasus/src/Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.cpp.obz5051 2006-03-10 16:47:07.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.cpp 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -1719,53 +1719,48 @@
|
||
|
const String & providerModuleName)
|
||
|
{
|
||
|
Array<Uint16> _providerModuleStatus;
|
||
|
- Array<CIMInstance> instances;
|
||
|
-
|
||
|
- //
|
||
|
- // create the key by using providerModuleName and MODULE_KEY
|
||
|
- //
|
||
|
- String _moduleKey = _generateKey(providerModuleName, MODULE_KEY);
|
||
|
-
|
||
|
- //
|
||
|
- // Find the entry whose key's value is same as _moduleKey
|
||
|
- // get provider module status from the value
|
||
|
- //
|
||
|
- ProviderRegistrationTable* _providerModule = 0;
|
||
|
|
||
|
ReadLock lock(_registrationTableLock);
|
||
|
|
||
|
- if (!_registrationTable->table.lookup(_moduleKey, _providerModule))
|
||
|
- {
|
||
|
-// l10n
|
||
|
-
|
||
|
- // throw (CIMException(CIM_ERR_FAILED, MODULE_NOT_FOUND));
|
||
|
-
|
||
|
- MessageLoaderParms mlp(MessageLoaderParms(MODULE_NOT_FOUND_KEY, MODULE_NOT_FOUND));
|
||
|
+ _providerModuleStatus = _getProviderModuleStatus (providerModuleName);
|
||
|
|
||
|
- throw (CIMException(CIM_ERR_FAILED, mlp));
|
||
|
+ return (_providerModuleStatus);
|
||
|
}
|
||
|
|
||
|
- instances = _providerModule->getInstances();
|
||
|
+Boolean ProviderRegistrationManager::updateProviderModuleStatus(
|
||
|
+ const String& providerModuleName,
|
||
|
+ const Array<Uint16>& removeStatus,
|
||
|
+ const Array<Uint16>& appendStatus,
|
||
|
+ Array<Uint16>& outStatus)
|
||
|
+{
|
||
|
+ WriteLock lock(_registrationTableLock);
|
||
|
+
|
||
|
+ outStatus = _getProviderModuleStatus (providerModuleName);
|
||
|
|
||
|
//
|
||
|
- // ATTN-CAKG-P2-20020821: Check for null status?
|
||
|
+ // Remove any status elements to be removed
|
||
|
//
|
||
|
- instances[0].getProperty(instances[0].findProperty
|
||
|
- (_PROPERTY_OPERATIONALSTATUS)).getValue().get(_providerModuleStatus);
|
||
|
-
|
||
|
- return (_providerModuleStatus);
|
||
|
+ for (Uint32 j = 0; j < removeStatus.size(); j++)
|
||
|
+ {
|
||
|
+ for (Uint32 i = outStatus.size(); i > 0; i--)
|
||
|
+ {
|
||
|
+ if (outStatus[i-1] == removeStatus[j])
|
||
|
+ {
|
||
|
+ outStatus.remove(i-1);
|
||
|
+ }
|
||
|
+ }
|
||
|
}
|
||
|
|
||
|
-Boolean ProviderRegistrationManager::setProviderModuleStatus(
|
||
|
- const String & providerModuleName,
|
||
|
- Array<Uint16> status)
|
||
|
-{
|
||
|
//
|
||
|
- // create the key by using providerModuleName and MODULE_KEY
|
||
|
+ // Append any status elements to be appended, if not already in the array
|
||
|
//
|
||
|
- String _moduleKey = _generateKey(providerModuleName, MODULE_KEY);
|
||
|
-
|
||
|
- WriteLock lock(_registrationTableLock);
|
||
|
+ for (Uint32 k = 0; k < appendStatus.size(); k++)
|
||
|
+ {
|
||
|
+ if (!Contains (outStatus, appendStatus[k]))
|
||
|
+ {
|
||
|
+ outStatus.append(appendStatus[k]);
|
||
|
+ }
|
||
|
+ }
|
||
|
|
||
|
//
|
||
|
// find the instance from repository
|
||
|
@@ -1784,7 +1779,7 @@
|
||
|
//
|
||
|
_repository->setProperty(
|
||
|
PEGASUS_NAMESPACENAME_INTEROP,
|
||
|
- reference, _PROPERTY_OPERATIONALSTATUS, status);
|
||
|
+ reference, _PROPERTY_OPERATIONALSTATUS, outStatus);
|
||
|
|
||
|
//
|
||
|
// get instance from the repository
|
||
|
@@ -1800,8 +1795,8 @@
|
||
|
//
|
||
|
// remove old entry from table
|
||
|
//
|
||
|
+ String _moduleKey = _generateKey(providerModuleName, MODULE_KEY);
|
||
|
ProviderRegistrationTable* _entry = 0;
|
||
|
-
|
||
|
if (_registrationTable->table.lookup(_moduleKey, _entry))
|
||
|
{
|
||
|
delete _entry;
|
||
|
@@ -1815,6 +1810,12 @@
|
||
|
instances.append(_instance);
|
||
|
_addInstancesToTable(_moduleKey, instances);
|
||
|
}
|
||
|
+ catch (const Exception & e)
|
||
|
+ {
|
||
|
+ PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2,
|
||
|
+ "Failed to update provider module status: " + e.getMessage());
|
||
|
+ return false;
|
||
|
+ }
|
||
|
catch (...)
|
||
|
{
|
||
|
return (false);
|
||
|
@@ -4061,6 +4062,37 @@
|
||
|
}
|
||
|
}
|
||
|
|
||
|
+Array<Uint16> ProviderRegistrationManager::_getProviderModuleStatus(
|
||
|
+ const String& providerModuleName)
|
||
|
+{
|
||
|
+ Array<Uint16> outStatus;
|
||
|
+
|
||
|
+ //
|
||
|
+ // Create the key using providerModuleName and MODULE_KEY
|
||
|
+ //
|
||
|
+ String _moduleKey = _generateKey(providerModuleName, MODULE_KEY);
|
||
|
+
|
||
|
+ //
|
||
|
+ // Look up the module in the provider registration table
|
||
|
+ //
|
||
|
+ ProviderRegistrationTable* _providerModule = 0;
|
||
|
+ if (!_registrationTable->table.lookup(_moduleKey, _providerModule))
|
||
|
+ {
|
||
|
+ MessageLoaderParms mlp(MessageLoaderParms(MODULE_NOT_FOUND_KEY,
|
||
|
+ MODULE_NOT_FOUND));
|
||
|
+ throw CIMException(CIM_ERR_FAILED, mlp);
|
||
|
+ }
|
||
|
+
|
||
|
+ //
|
||
|
+ // Get the Operational Status from the module instance in the table
|
||
|
+ //
|
||
|
+ Array<CIMInstance> moduleInstances;
|
||
|
+ moduleInstances = _providerModule->getInstances();
|
||
|
+ moduleInstances[0].getProperty(moduleInstances[0].findProperty(
|
||
|
+ _PROPERTY_OPERATIONALSTATUS)).getValue().get(outStatus);
|
||
|
+
|
||
|
+ return outStatus;
|
||
|
+}
|
||
|
|
||
|
Array<String> WildCardNamespaceNames::_nsstr;
|
||
|
Array<Uint32> WildCardNamespaceNames::_nsl;
|
||
|
--- pegasus/src/Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h.obz5051 2006-01-30 11:18:33.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -328,7 +328,37 @@
|
||
|
|
||
|
Array<Uint16> getProviderModuleStatus(const String & providerModuleName);
|
||
|
|
||
|
- Boolean setProviderModuleStatus(const String & providerModuleName, Array<Uint16> status);
|
||
|
+ /**
|
||
|
+ Updates the Provider Module Status. The value of the
|
||
|
+ OperationalStatus property is updated in the Provider Module
|
||
|
+ instance in the repository, and in the provider registration table.
|
||
|
+ If any removeStatus values are specified, each one of the values
|
||
|
+ found in the current OperationalStatus property value is removed
|
||
|
+ from the array. If any appendStatus values are specified, each one
|
||
|
+ of the values not found in the current OperationalStatus property
|
||
|
+ value is appended to the array. The resulting OperationalStatus
|
||
|
+ property value is returned in the output outStatus parameter.
|
||
|
+
|
||
|
+ @param providerModuleName String specifying name of the provider
|
||
|
+ module whose status is to be updated
|
||
|
+
|
||
|
+ @param removeStatus Array of Uint16 specifying values to be
|
||
|
+ removed from the status array (may be empty)
|
||
|
+
|
||
|
+ @param appendStatus Array of Uint16 specifying values to be
|
||
|
+ appended to the status array (may be empty)
|
||
|
+
|
||
|
+ @param outStatus OUTPUT Array of Uint16 returning the resulting
|
||
|
+ status array after update
|
||
|
+
|
||
|
+ @return True if provider module status is successfully updated;
|
||
|
+ False, otherwise
|
||
|
+ */
|
||
|
+ Boolean updateProviderModuleStatus(
|
||
|
+ const String& providerModuleName,
|
||
|
+ const Array<Uint16>& removeStatus,
|
||
|
+ const Array<Uint16>& appendStatus,
|
||
|
+ Array<Uint16>& outStatus);
|
||
|
|
||
|
/**
|
||
|
Iterate through registration hash table, if AutoStart property
|
||
|
@@ -477,6 +507,22 @@
|
||
|
*/
|
||
|
void _setStatus(const Array<Uint16> & status, CIMInstance & moduleInstance);
|
||
|
|
||
|
+ /**
|
||
|
+ Gets the Provider Module Status. The value of the OperationalStatus
|
||
|
+ property is retrieved from the Provider Module instance in the
|
||
|
+ provider registration table.
|
||
|
+
|
||
|
+ @param providerModuleName String specifying name of the provider
|
||
|
+ module whose status is to be retrieved
|
||
|
+
|
||
|
+ @exception CIMException(CIM_ERR_FAILED) if the specified provider
|
||
|
+ module is not found.
|
||
|
+
|
||
|
+ @return Array of Uint16 containing the OperationalStatus property
|
||
|
+ value
|
||
|
+ */
|
||
|
+ Array<Uint16> _getProviderModuleStatus(
|
||
|
+ const String& providerModuleName);
|
||
|
};
|
||
|
|
||
|
class PEGASUS_PRM_LINKAGE WildCardNamespaceNames {
|
||
|
--- pegasus/src/Pegasus/msg/Server/pegasusServer_en.txt.obz5051 2006-05-31 11:42:03.000000000 -0400
|
||
|
+++ pegasus/src/Pegasus/msg/Server/pegasusServer_en.txt 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -1275,6 +1275,28 @@
|
||
|
|
||
|
ProviderManager.ProviderManagerService.DISABLE_PROVIDER_FAILED:string {"PGS04006: Failed to disable the provider."}
|
||
|
|
||
|
+ /**
|
||
|
+ * @note PGS04007
|
||
|
+ * Substitution {0} is the name of a provider module (a string)
|
||
|
+ * Substitution {1} is the name of a system user (a string)
|
||
|
+ * @version 2.6
|
||
|
+ */
|
||
|
+ ProviderManager.ProviderManagerService.OOP_PROVIDER_MODULE_USER_CTXT_FAILURE_DETECTED:string {"PGS04007: A failure was detected in provider module {0} with user context {1}."}
|
||
|
+
|
||
|
+ /**
|
||
|
+ * @note PGS04008
|
||
|
+ * Substitution {0} is the name of a provider module (a string)
|
||
|
+ * @version 2.6
|
||
|
+ */
|
||
|
+ ProviderManager.ProviderManagerService.OOP_PROVIDER_MODULE_FAILURE_DETECTED:string {"PGS04008: A failure was detected in provider module {0}."}
|
||
|
+
|
||
|
+ /**
|
||
|
+ * @note PGS04009
|
||
|
+ * Substitution {0} is the name of a provider module (a string)
|
||
|
+ * @version 2.6
|
||
|
+ */
|
||
|
+ ProviderManager.ProviderManagerService.OOP_PROVIDER_MODULE_SUBSCRIPTIONS_AFFECTED:string {"PGS04009: The generation of indications by providers in module {0} may be affected. To ensure these providers are serving active subscriptions, disable and then re-enable this module using the cimprovider command."}
|
||
|
+
|
||
|
|
||
|
// ==========================================================
|
||
|
// Messages for ProviderModule
|
||
|
@@ -4394,6 +4416,7 @@
|
||
|
/**
|
||
|
* @note PGS13606
|
||
|
* Substitution {0} is a string ID for a provider module name
|
||
|
+ * This message is no longer used as of version 2.6.0
|
||
|
* @version 2.5.1
|
||
|
*/
|
||
|
ProviderManager.OOPProviderManagerRouter.OOP_PROVIDER_MODULE_FAILURE_DETECTED:string {"PGS13606: A failure was detected in provider module {0}. The generation of indications by providers in this module may be affected. To ensure these providers are serving active subscriptions, disable and then re-enable this module using the cimprovider command."}
|
||
|
--- pegasus/src/Pegasus/Common/Message.cpp.obz5051 2006-01-30 11:17:05.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/Common/Message.cpp 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -214,6 +214,9 @@
|
||
|
"CIM_NOTIFY_PROVIDER_ENABLE_REQUEST_MESSAGE",
|
||
|
"CIM_NOTIFY_PROVIDER_ENABLE_RESPONSE_MESSAGE",
|
||
|
|
||
|
+ "CIM_NOTIFY_PROVIDER_FAIL_REQUEST_MESSAGE",
|
||
|
+ "CIM_NOTIFY_PROVIDER_FAIL_RESPONSE_MESSAGE",
|
||
|
+
|
||
|
"CIM_INITIALIZE_PROVIDER_REQUEST_MESSAGE",
|
||
|
"CIM_INITIALIZE_PROVIDER_RESPONSE_MESSAGE",
|
||
|
|
||
|
--- pegasus/src/Pegasus/Common/Constants.h.obz5051 2006-01-30 11:16:48.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/Common/Constants.h 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -464,6 +464,7 @@
|
||
|
|
||
|
// Constants defining the operational status of a CIM_ManagedSystemElement
|
||
|
#define CIM_MSE_OPSTATUS_VALUE_OK 2
|
||
|
+#define CIM_MSE_OPSTATUS_VALUE_DEGRADED 3
|
||
|
#define CIM_MSE_OPSTATUS_VALUE_STOPPING 9
|
||
|
#define CIM_MSE_OPSTATUS_VALUE_STOPPED 10
|
||
|
|
||
|
@@ -472,6 +473,7 @@
|
||
|
#define PG_PROVMODULE_USERCTXT_DESIGNATED 3
|
||
|
#define PG_PROVMODULE_USERCTXT_PRIVILEGED 4
|
||
|
#define PG_PROVMODULE_USERCTXT_CIMSERVER 5
|
||
|
+#define PEGASUS_DEFAULT_PROV_USERCTXT PG_PROVMODULE_USERCTXT_PRIVILEGED
|
||
|
|
||
|
// Standard Pegasus Global Prefix.
|
||
|
// This prefix is used as the basis for pegasus defined classes
|
||
|
--- pegasus/src/Pegasus/Common/CIMMessageDeserializer.cpp.obz5051 2006-03-03 15:21:57.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/Common/CIMMessageDeserializer.cpp 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -298,6 +298,10 @@
|
||
|
break;
|
||
|
case CIM_INITIALIZE_PROVIDER_REQUEST_MESSAGE:
|
||
|
message = _deserializeCIMInitializeProviderRequestMessage(parser);
|
||
|
+ //case CIM_NOTIFY_PROVIDER_FAIL_REQUEST_MESSAGE:
|
||
|
+ // ATTN: No need to deserialize this yet
|
||
|
+ //message = _deserializeCIMNotifyProviderFailRequestMessage(parser);
|
||
|
+ //break;
|
||
|
break;
|
||
|
case CIM_INITIALIZE_PROVIDER_AGENT_REQUEST_MESSAGE:
|
||
|
message =
|
||
|
@@ -456,6 +460,10 @@
|
||
|
break;
|
||
|
case CIM_INITIALIZE_PROVIDER_RESPONSE_MESSAGE:
|
||
|
message = _deserializeCIMInitializeProviderResponseMessage(parser);
|
||
|
+ //case CIM_NOTIFY_PROVIDER_FAIL_RESPONSE_MESSAGE:
|
||
|
+ // ATTN: No need to deserialize this yet
|
||
|
+ //message = _deserializeCIMNotifyProviderFailResponseMessage(parser);
|
||
|
+ //break;
|
||
|
break;
|
||
|
case CIM_INITIALIZE_PROVIDER_AGENT_RESPONSE_MESSAGE:
|
||
|
message =
|
||
|
--- pegasus/src/Pegasus/Common/CIMMessageSerializer.cpp.obz5051 2006-02-28 14:53:29.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/Common/CIMMessageSerializer.cpp 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -280,6 +280,11 @@
|
||
|
// out, (CIMNotifyProviderEnableRequestMessage*)cimMessage);
|
||
|
break;
|
||
|
case CIM_STOP_ALL_PROVIDERS_REQUEST_MESSAGE:
|
||
|
+ //case CIM_NOTIFY_PROVIDER_FAIL_REQUEST_MESSAGE:
|
||
|
+ // ATTN: No need to serialize this yet
|
||
|
+ //_serializeCIMNotifyProviderFailRequestMessage(
|
||
|
+ // out, (CIMNotifyProviderFailRequestMessage*)cimMessage);
|
||
|
+ //break;
|
||
|
_serializeCIMStopAllProvidersRequestMessage(
|
||
|
out, (CIMStopAllProvidersRequestMessage*)cimMessage);
|
||
|
break;
|
||
|
@@ -469,6 +474,11 @@
|
||
|
// out, (CIMNotifyProviderEnableResponseMessage*)cimMessage);
|
||
|
break;
|
||
|
case CIM_STOP_ALL_PROVIDERS_RESPONSE_MESSAGE:
|
||
|
+ //case CIM_NOTIFY_PROVIDER_FAIL_RESPONSE_MESSAGE:
|
||
|
+ // ATTN: No need to serialize this yet
|
||
|
+ //_serializeCIMNotifyProviderFailResponseMessage(
|
||
|
+ // out, (CIMNotifyProviderFailResponseMessage*)cimMessage);
|
||
|
+ //break;
|
||
|
_serializeCIMStopAllProvidersResponseMessage(
|
||
|
out, (CIMStopAllProvidersResponseMessage*)cimMessage);
|
||
|
break;
|
||
|
--- pegasus/src/Pegasus/Common/Message.h.obz5051 2006-01-30 11:17:05.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/Common/Message.h 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -521,6 +521,9 @@
|
||
|
CIM_NOTIFY_PROVIDER_ENABLE_REQUEST_MESSAGE,
|
||
|
CIM_NOTIFY_PROVIDER_ENABLE_RESPONSE_MESSAGE,
|
||
|
|
||
|
+ CIM_NOTIFY_PROVIDER_FAIL_REQUEST_MESSAGE,
|
||
|
+ CIM_NOTIFY_PROVIDER_FAIL_RESPONSE_MESSAGE,
|
||
|
+
|
||
|
CIM_INITIALIZE_PROVIDER_REQUEST_MESSAGE,
|
||
|
CIM_INITIALIZE_PROVIDER_RESPONSE_MESSAGE,
|
||
|
|
||
|
--- pegasus/src/Pegasus/Common/CIMMessage.cpp.obz5051 2006-02-28 14:53:29.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/Common/CIMMessage.cpp 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -473,6 +473,17 @@
|
||
|
return response.release();
|
||
|
}
|
||
|
|
||
|
+CIMResponseMessage* CIMNotifyProviderFailRequestMessage::buildResponse() const
|
||
|
+{
|
||
|
+ AutoPtr<CIMNotifyProviderFailResponseMessage> response(
|
||
|
+ new CIMNotifyProviderFailResponseMessage(
|
||
|
+ messageId,
|
||
|
+ CIMException(),
|
||
|
+ queueIds.copyAndPop()));
|
||
|
+ response->syncAttributes(this);
|
||
|
+ return response.release();
|
||
|
+}
|
||
|
+
|
||
|
CIMResponseMessage* CIMStopAllProvidersRequestMessage::buildResponse()
|
||
|
{
|
||
|
AutoPtr<CIMStopAllProvidersResponseMessage> response(
|
||
|
--- pegasus/src/Pegasus/Common/CIMMessage.h.obz5051 2006-02-28 14:53:29.000000000 -0500
|
||
|
+++ pegasus/src/Pegasus/Common/CIMMessage.h 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -1373,6 +1373,30 @@
|
||
|
Array <CIMInstance> capInstances;
|
||
|
};
|
||
|
|
||
|
+class PEGASUS_COMMON_LINKAGE CIMNotifyProviderFailRequestMessage
|
||
|
+ : public CIMRequestMessage
|
||
|
+{
|
||
|
+public:
|
||
|
+ CIMNotifyProviderFailRequestMessage(
|
||
|
+ const String & messageId_,
|
||
|
+ const String & moduleName_,
|
||
|
+ const String & userName_,
|
||
|
+ const QueueIdStack& queueIds_)
|
||
|
+ : CIMRequestMessage(
|
||
|
+ CIM_NOTIFY_PROVIDER_FAIL_REQUEST_MESSAGE,
|
||
|
+ messageId_,
|
||
|
+ queueIds_),
|
||
|
+ moduleName(moduleName_),
|
||
|
+ userName(userName_)
|
||
|
+ {
|
||
|
+ }
|
||
|
+
|
||
|
+ virtual CIMResponseMessage* buildResponse() const;
|
||
|
+
|
||
|
+ String moduleName;
|
||
|
+ String userName;
|
||
|
+};
|
||
|
+
|
||
|
class PEGASUS_COMMON_LINKAGE CIMStopAllProvidersRequestMessage
|
||
|
: public CIMRequestMessage
|
||
|
{
|
||
|
@@ -2067,6 +2091,22 @@
|
||
|
}
|
||
|
};
|
||
|
|
||
|
+class PEGASUS_COMMON_LINKAGE CIMNotifyProviderFailResponseMessage
|
||
|
+ : public CIMResponseMessage
|
||
|
+{
|
||
|
+public:
|
||
|
+ CIMNotifyProviderFailResponseMessage(
|
||
|
+ const String& messageId_,
|
||
|
+ const CIMException& cimException_,
|
||
|
+ const QueueIdStack& queueIds_)
|
||
|
+ : CIMResponseMessage(CIM_NOTIFY_PROVIDER_FAIL_RESPONSE_MESSAGE,
|
||
|
+ messageId_, cimException_, queueIds_)
|
||
|
+ {
|
||
|
+ }
|
||
|
+
|
||
|
+ Uint32 numSubscriptionsAffected;
|
||
|
+};
|
||
|
+
|
||
|
class PEGASUS_COMMON_LINKAGE CIMStopAllProvidersResponseMessage
|
||
|
: public CIMResponseMessage
|
||
|
{
|
||
|
--- pegasus/src/Providers/TestProviders/Makefile.obz5051 2006-02-07 14:02:01.000000000 -0500
|
||
|
+++ pegasus/src/Providers/TestProviders/Makefile 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -51,6 +51,8 @@
|
||
|
MethodTestProvider \
|
||
|
MethodTestProvider/testclient \
|
||
|
MCCA_TestAssocProvider \
|
||
|
+ OOPModuleFailureProvider \
|
||
|
+ OOPModuleFailureProvider/testclient \
|
||
|
PG_TestPropertyTypes \
|
||
|
ProcessIndicationProvider \
|
||
|
UserContextTestProvider \
|
||
|
--- pegasus/src/Providers/TestProviders/Load/Makefile.obz5051 2006-03-07 13:22:31.000000000 -0500
|
||
|
+++ pegasus/src/Providers/TestProviders/Load/Makefile 2006-05-31 12:18:40.000000000 -0400
|
||
|
@@ -128,6 +128,8 @@
|
||
|
@ cimmofl "-R$(REPOSITORY_DIR)" "-N$(REPOSITORY_NAME)" "-M$(REPOSITORY_MODE)" "-n$(INTEROPNS)" UserContextCIMServerR.mof
|
||
|
endif
|
||
|
endif
|
||
|
+ @ $(ECHO) +++++ Loading OOPModuleFailureTestProvider class definitions into $(TESTPROVIDERNS) namespace ...
|
||
|
+ @ cimmofl "-R$(REPOSITORY_DIR)" "-N$(REPOSITORY_NAME)" "-M$(REPOSITORY_MODE)" "-n$(TESTPROVIDERNS)" FailureTestIndication.mof
|
||
|
|
||
|
##
|
||
|
## Load the test MOF with cimmof. (Do not remove the existing repository.)
|
||
|
@@ -192,6 +194,8 @@
|
||
|
@ cimmof "-n$(INTEROPNS)" UserContextCIMServerR.mof
|
||
|
endif
|
||
|
endif
|
||
|
+ @ $(ECHO) +++++ Loading OOPModuleFailureTestProvider class definitions into $(TESTPROVIDERNS) namespace ...
|
||
|
+ @ cimmof "-R$(REPOSITORY_DIR)" "-N$(REPOSITORY_NAME)" "-M$(REPOSITORY_MODE)" "-n$(TESTPROVIDERNS)" FailureTestIndication.mof
|
||
|
|
||
|
##
|
||
|
##
|