Customer attempts to switch subscription's plan and thus migrate it to another service template. Both templates consist of similar set of resources, including DNS ones. However, each template includes two sets of DNS resources, one of which is not used anymore.
Upgrade order fails with the following error in
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "subs_resources_uni" Detail: Key (sub_id, rt_id)=(1089159, 1000340) already exists.
There is an unusual hierarchy between "DNS Management" and "DNS Hosting" resources in target subscription - both "Management" resources are childs of one "DNS Hosting":
1000339 DNS hosting ext 1000340 DNS management 1000223 DNS management
During subscription transfer "DNS Management" is incorrectly matched to "DNS Management" sub-resource of another DNS Hosting resource (in the example below
1000340 are management resource of different DNS hostings):
DBG: c.p.p.s.r.d.ResourceTypeInstancesTree subscription migration resource type #1000223 -> #1000340 DBG: c.p.p.s.r.d.ResourceTypeInstancesTree subscription migration unprovide resource type #1000340, usage = 0 ... DBG: c.p.p.s.s.e.SubscriptionResourcesManagerBean upgrading subscription resource #2880063 usage: 0 resource type #1000223 to #1000340, path x13x223x2880063 -> x13x18254x2880063, limit -1 -> -1 DBG: c.p.p.s.s.e.SubscriptionResourcesManagerBean upgrading subscription resource #2880064 usage: 0 resource type #1000340 to #1000340, path x13x18254x2880064 -> x13x18254x2880064, limit 0 -> -1
This behavior was reported to the Engineering team as POA-111250: "Unforeseen error on pem.upgradeSubscription - DNS Management sub-resources are mapped incorrectly".
Workaround for the issue is to remove one of DNS Hosting resource from source service template and subscription (management subresource will be removed automatically).
Additionally you may acquire further details on POA-111250 from your Technical Account Manager or by a contacting Pooled Technical Associates team.