Weird ECMA2 MA problem: Create Management Agent dialog loops to "Capabilities" page

Playing with a test ECMA2 MA, I've run into a strange problem: after I configure the MA with the "Create Management Agent" dialog, after I configure the last page, the dialog instead of closing and creating the MA goes back to the "Capabilities" page.

I've made a video showing this problem: http://espace.cern.ch/idm/resources/ecma2-capabilities-problem.mp4

I'm getting no error message, and I see nothing in the event log.

Has anyone seen this behavior?

Any suggestion on how to troubleshoot

June 19th, 2015 12:48pm

Hi Paolo,

Are you using any string validation on any of the parameters that you are setting? I would assume that the ParameterValidationResult would be returned when you hit the next button on that screen, but that's at least something to look at.

Thanks,

Mark

Free Windows Admin Tool Kit Click here and download it now
June 19th, 2015 3:05pm

Hi Mark,

Thanks for the hint...

It's something related to parameters for sure... it looks like this behavior is triggered by Capabilities parameters.

I have a parameter with validation (not in the capabilities page), but if it fails validation I get (correctly) an error message immediately.

I'll continue the investigation on Monday.

June 19th, 2015 3:28pm

I noticed in your video that you are implementing the IMAExtensible2GetCapabilitiesEX. I've never tried to use that. Is there a specific feature that you need that is not implemented by IMAExtensible2GetCapabilities? If not, you could try the standard capabilities to see if the issue goes away.

Thanks,

Mark

Free Windows Admin Tool Kit Click here and download it now
June 19th, 2015 6:25pm

The issues pops up with IMAExtensible2GetCapabilitiesEx, as soon as I define a configuration parameter in the "Capabilities" page. I've tested this on 2 different installations, with the same result (FIM version = 4.1.3510.0).

This is a very simple piece of code that allows reproducing the problem.

Could someone please try to reproduce this?

using Microsoft.MetadirectoryServices;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace ecma2_test {

    public partial class TestAgent : IMAExtensible2GetParameters,
                                     IMAExtensible2GetCapabilitiesEx,
                                     IMAExtensible2GetSchema,
                                     IMAExtensible2CallExport,
                                     IMAExtensible2CallImport {

        // IMAExtensible2GetParameters
        public IList<ConfigParameterDefinition> GetConfigParameters(KeyedCollection<string, ConfigParameter> configParameters, ConfigParameterPage page) {
            var ret = new List<ConfigParameterDefinition>();
            if (page == ConfigParameterPage.Capabilities) {
                ret.Add(ConfigParameterDefinition.CreateCheckBoxParameter("SupportHierarchy", false));
            }
            return ret;
        }

        public ParameterValidationResult ValidateConfigParameters(KeyedCollection<string, ConfigParameter> configParameters, ConfigParameterPage page) {
            return new ParameterValidationResult();
        }

        // IMAExtensible2GetCapabilitiesEx
        public MACapabilities GetCapabilitiesEx(KeyedCollection<string, ConfigParameter> configParameters) {
            MACapabilities myCapabilities = new MACapabilities();
            // configParam.Value == "1"
            // myCapabilities.SupportHierarchy = Convert.ToBoolean(configParameters["SupportHierarchy"].Value);
            myCapabilities.SupportHierarchy = (configParameters["SupportHierarchy"].Value == "1");
            return myCapabilities;
        }

        // IMAExtensible2GetSchema
        public Schema GetSchema(KeyedCollection<string, ConfigParameter> configParameters) {
            SchemaType personType = SchemaType.Create("Person", false);
            personType.Attributes.Add(SchemaAttribute.CreateAnchorAttribute("anchor-attribute", AttributeType.String));
            personType.Attributes.Add(SchemaAttribute.CreateSingleValuedAttribute("name", AttributeType.String));
            personType.Attributes.Add(SchemaAttribute.CreateSingleValuedAttribute("email", AttributeType.String));
            Schema schema = Schema.Create();
            schema.Types.Add(personType);
            return schema;
        }

        // IMAExtensible2CallExport
        public void CloseExportConnection(CloseExportConnectionRunStep exportRunStep) {
            throw new NotImplementedException();
        }

        public int ExportDefaultPageSize {
            get { return 1000; }
        }

        public int ExportMaxPageSize {
            get { return 5000; }
        }

        public void OpenExportConnection(KeyedCollection<string, ConfigParameter> configParameters, Schema types, OpenExportConnectionRunStep exportRunStep) {
            throw new NotImplementedException();
        }

        public PutExportEntriesResults PutExportEntries(IList<CSEntryChange> csentries) {
            throw new NotImplementedException();
        }

        // IMAExtensible2CallImport
        public CloseImportConnectionResults CloseImportConnection(CloseImportConnectionRunStep importRunStep) {
            throw new NotImplementedException();
        }

        public GetImportEntriesResults GetImportEntries(GetImportEntriesRunStep importRunStep) {
            throw new NotImplementedException();
        }

        public int ImportDefaultPageSize {
            get { return 1000; }
        }

        public int ImportMaxPageSize {
            get { return 5000; }
        }

        public OpenImportConnectionResults OpenImportConnection(KeyedCollection<string, ConfigParameter> configParameters, Schema types, OpenImportConnectionRunStep importRunStep) {
            throw new NotImplementedException();
        }
    }
}

June 22nd, 2015 5:32am

Everything compiles fine but when I click the refresh interfaces button during the MA creation I get the following error:

If I just press ok, I do get a list of interfaces that looks correct and I am able to successfully create the MA. Editing the MA and selecting refresh interfaces return the same error.

My lab is version 4.1.3559.0

Thanks,

Mark

Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2015 8:56am

Looks like my screen cap did not work. It looked fine in the reply window.

Here's the error:

"Unable to retrieve configuration parameters from the extension: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

Mark

June 22nd, 2015 8:59am

That's the same error I'm getting after I updated to 4.1.3634.0

I'll try with the non-Ex GetCapabilities interface and see what happens...

Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2015 9:05am

With IMAExtensible2GetCapabilities instead of IMAExtensible2GetCapabilitiesEx I get exactly the same error message.

It really looks like something is broken here...

June 22nd, 2015 9:17am

it seems to want some connectivity parameters. If I change your getconfigparameters to this:

public

IList<ConfigParameterDefinition> GetConfigParameters(KeyedCollection<string, ConfigParameter> configParameters,

                                                           

ConfigParameterPagepage)

        {

           

List<ConfigParameterDefinition> configParametersDefinitions = newList<ConfigParameterDefinition>();

           

switch(page)

            {

               

caseConfigParameterPage.Capabilities:

                    configParametersDefinitions.Add(

ConfigParameterDefinition.CreateCheckBoxParameter("SupportHierarchy", false));

                   

break;

               

caseConfigParameterPage.Connectivity:

                    configParametersDefinitions.Add(

ConfigParameterDefinition.CreateStringParameter("UserID", ""));

                    configParametersDefinitions.Add(

ConfigParameterDefinition.CreateEncryptedStringParameter("Password", ""));

                    configParametersDefinitions.Add(

ConfigParameterDefinition.CreateStringParameter("Domain", ""));

                   

break;

            }

           

returnconfigParametersDefinitions;

        }

Everything works just fine. If I remove the connectivity section (of just leave it blank), I get the error.

Mark

Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2015 9:29am

Many thanks for your help, Mark.

To summarize, it looks like the looping to the Capabilities page was a bug in version 4.1.3510.0.

Updating to the latest hotfix solved the problem, but apparently there's another bug that causes a "catastrophic failure" message to pop up if no Connectivity parameters are provided.

I still think that ECMA2 Management Agents development is quite painful.

June 24th, 2015 3:42am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics