A customer subscribed to Windows services in Parallels Automation, e.g. IIS or Hosted Exchange and POA started to provision services. The task 'Create OU for subscription' fails in POA with the error message 'A constraint violation occurred'.
More detailed diagnostics is provided in the example below:
Destination host 'ad02.hosting.local' (#17), IP '10.39.93.21' : Provisioning request failed. Error in 'SW Managed Active Directory.CreateCustomerOrganization'. Exception calling "Execute" with "3" argument(s): "**A constraint violation occurred**." Error position: At C:\Program Files\Parallels\Windows Provisioning Engine\Providers\Common\ProviderUtils\ProviderUtils.psm1:53 char:26 + [void]$Context.Execute <<<< ($Provider, $Method, $exec_data) Type: Parallels.Wpe.PowerShell.PowerShellException.
Most likely the name of the OU (Organizational Unit), or a user within the OU to be created in Active Directory exceed 64 characters limit.
Additional details can be acquired from
C:\Program Files\Parallels\Windows Provisioning Engine\Logs on corresponding WPE node. To find the exact reason, it might be necessary to search the log for constraint violation error and look for the object that was to be created before it occurred.
POA generates the name of customer's OU based on the template defined in POA Provider Control Panel at System Director > Configuration Manager > Auto-generated Names. In this particular case the template must be set to the 'Customer company name based' value. So, POA is trying to create OU in AD using the account name a customer provided.
If the name on a customer complany is more than 64 characters POA will not be able to create OU in AD for customer's subscription (if 'Customer company name based' template is used to generate OU name).
Refer to the Microsoft article for more information about Active Directory limits:
Use one of the ways below to resolve the issue.
Shorten customer company name to be within 64 characters.
Switch template to generate OU names to 'Subscription ID based' or 'Account ID based'. Please see corresponding POA guide section "Defining Rules for Automatic Naming of Organizational Units" For instructions.
Since services in customer's subscription were not actually provided yet (due to the failed tasks) the most easy way to fix problem subscription is as follows:
- Cancel the failed task along with all tasks which depend on the failed one
- Terminate the problem subscription
- Apply one of the solutions above
- Subscribe customer again to the same Service Plan
There is also a request for POA to attempt to predict such behavior and resolve it automatically - POA-83450.