Friday, September 24, 2010

Sync Configurations and Source Control

Synchronization configurations can fit nicely into source control, which is a great way to track the changes of your ILM or FIM changes.  Checking them in is pretty easy, but lately I checked in a change that broke my configuration.
The scenario was:
  1. Export the configuration from the Sync server (File—> Export Server Configuration)
  2. Check in the modified files (I only changed rules on one MA)
  3. Test the configuration on another server (File –> Import Server Configuration)
  4. BANG
The error message returned by Identity Manager was:
File header validation starting...
    'FILE:C:\SyncConfig\New Folder\MA-TargetWebService.xml' contains an invalid header.
File header validation FAILED.

Turns out when you export a server configuration, it stamps the ‘server’ and ‘export-date’ into all of the files.  When you import a server configuration, the import process validates that ALL of the XML files have the same ‘server’ and ‘export-date’.

In my case I tried to add only the changed files to my source control system.  This caused the import process to fail when I tested the changes I’d checked in.
The moral of the story is to keep these header details consistent, either by hacking it manually, or always checking in the complete server configuration as a set.  The more supportable way is to always check the files in as a set because as the XML snippet above reminds us; the XML files should not be edited, even if such edits prevent errors during import ;-)

No comments: