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

  • Question

  • 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 this?


    Paolo Tedesco - http://cern.ch/idm

    Friday, June 19, 2015 12:48 PM

Answers

  • 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.


    Paolo Tedesco - http://cern.ch/idm

    • Marked as answer by Paolo Tedesco Wednesday, June 24, 2015 7:41 AM
    Wednesday, June 24, 2015 7:41 AM

All replies

  • 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


    Mark Creekmore - BlueVault Software http://www.bluevaultsoftware.com

    Friday, June 19, 2015 3:05 PM
  • 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.


    Paolo Tedesco - http://cern.ch/idm

    Friday, June 19, 2015 3:28 PM
  • 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


    Mark Creekmore - BlueVault Software http://www.bluevaultsoftware.com

    Friday, June 19, 2015 6:25 PM
  • 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();
            }
        }
    }
    


    Paolo Tedesco - http://cern.ch/idm

    Monday, June 22, 2015 9:30 AM
  • 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


    Mark Creekmore - BlueVault Software http://www.bluevaultsoftware.com

    Monday, June 22, 2015 12:54 PM
  • 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


    Mark Creekmore - BlueVault Software http://www.bluevaultsoftware.com

    Monday, June 22, 2015 12:57 PM
  • 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...


    Paolo Tedesco - http://cern.ch/idm

    Monday, June 22, 2015 1:03 PM
  • With IMAExtensible2GetCapabilities instead of IMAExtensible2GetCapabilitiesEx I get exactly the same error message.

    It really looks like something is broken here...


    Paolo Tedesco - http://cern.ch/idm

    Monday, June 22, 2015 1:14 PM
  • 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


    Mark Creekmore - BlueVault Software http://www.bluevaultsoftware.com

    Monday, June 22, 2015 1:27 PM
  • 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.


    Paolo Tedesco - http://cern.ch/idm

    • Marked as answer by Paolo Tedesco Wednesday, June 24, 2015 7:41 AM
    Wednesday, June 24, 2015 7:41 AM