Article ID: 130076, created on Dec 28, 2016, last review on Dec 28, 2016

  • Applies to:
  • Operations Automation 7.0

Symptoms

Source service template has several different resources for PHP installed in subscription. Only 1 is used by corresponding website. Destination plan has only 1 PHP resource matching one being used in subscription. An attempt to execute API call pem.upgradeSubscription.xml is followed by the error:

[root@server API]# curl -d@pem.upgradeSubscription.xml -k https://10.20.30.40:8440/

<?xml version="1.0" encoding="UTF-8"?><methodResponse><params><param><value><struct><member><name>module_id</name><value><string>SubscriptionActivator</string></value></member><member><name>error_message</name><value><string>org.hibernate.exception.ConstraintViolationException: could not execute statement</string></value></member><member><name>error_code</name><value><i4>1</i4></value></member><member><name>extype_id</name><value><i4>1</i4></value></member><member><name>properties</name><value><struct><member><name>subscription_id</name><value><i4>123456</i4></value></member><member><name>service_template_id</name><value><i4>2842</i4></value></member></struct></value></member><member><name>status</name><value><i4>-1</i4></value></member></struct></value></param></params></methodResponse>

In /var/lib/pgsql/9.1/data/pg_log/postgres-Sun.log, the following error can be seen:

ERROR:  duplicate key value violates unique constraint "subs_resources_uni"
DETAIL:  Key (sub_id, rt_id)=(123456, 1003110) already exists.
STATEMENT:  update subs_resources set curr_usage=$1, sub_limit=$2, last_update=$3, own_usage=$4, path=$5, rt_id=$6, sub_id=$7 where rt_instance_id=$8

In /var/log/pa/core.log:

Sep 25 10:20:30.685 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.s.r.d.ResourceTypeInstancesTree subscription migration resource type #1003786 -> #1003110
Sep 25 10:20:30.693 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.s.s.e.SubscriptionResourcesManagerBean upgrading subscription resource #19431844 usage: 0 resource type #1003786 to #1003110, path x6473988x16912827x19431844 -> x6473988x19431844, limit -1 -> -1
Sep 25 10:20:30.693 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.s.s.e.SubscriptionResourcesManagerBean preparing old parent subscription resource #16912827 usage update. delta: 0
Sep 25 10:20:30.693 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.s.s.e.SubscriptionResourcesManagerBean preparing new parent subscription resource #6473988 usage update. delta: 0

Sep 25 10:20:30.749 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.s.s.a.SubscriptionResourcesManagement [] service controllers implement interface SDK::ResourceConfigurator::HandleResourcesRemoval
Sep 25 10:20:30.753 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.s.r.e.ResourceManagementBean Entering softUpdateResourceUsage r:16912827 d:+0,r:6473988 d:+0 allowOverUsage: true
Sep 25 10:20:30.753 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.tracer entry: com.parallels.pa.service.resources.ejb.ResourceManagementBean.getSubscriptionResource(16912827)
Sep 25 10:20:30.757 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.tracer exit: com.parallels.pa.service.resources.ejb.ResourceManagementBean.getSubscriptionResource returning SubscriptionResource:16912827
Sep 25 10:20:30.757 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.s.r.e.ResourceManagementBean updateResourceUsage hashEM 1840730685
Sep 25 10:20:30.757 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.c.ServiceInvoker Reusing existing SFSB for txId: 0:ffff0ab81302:3e851099:58521849:47c838 and class: interface com.parallels.pa.service.resources.api.ResourceUsageMutator
Sep 25 10:20:30.757 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.tracer entry: com.parallels.pa.service.resources.ejb.ResourceUsageMutatorBean.updateResourceUsage(SubscriptionResource:16912827, 0, false, true)
Sep 25 10:20:30.757 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.tracer exit: com.parallels.pa.service.resources.ejb.ResourceUsageMutatorBean.updateResourceUsage
Sep 25 10:20:30.757 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.c.ServiceInvoker Service invocation for service ResourceUsageMutator$$$view223 took 0 ms
Sep 25 10:20:30.760 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.c.ServiceInvoker ExSystem or CORBA SystemException which caused EJB exception not found
Sep 25 10:20:30.761 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.c.ServiceInvoker SubscriptionActivator invocation failedjavax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.ConstraintViolationException: could not execute statement
Sep 25 10:20:30.761 : DBG [openapi:11687 RequestProcessor-177 pau 1814615018]: c.p.p.c.ServiceInvoker Rethrowing EJB exception [converted]Plesk.ExSystem: org.hibernate.exception.ConstraintViolationException: could not execute statement

Cause

This behaviour is caused by software related issue #POA-109226.

Resolution

This issue will be resolved in one of the future product update. Contact your Technical Account Manager or Pooled Technical Associate Team (pta@odin.com) in order to trace the current status of #POA-109226.

The workaround is to get PHP resource types matching in source and destination service templates.

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 0871c0b47b3b86ae3b1af4c2942cd0ce 1941880841f714e458ae4dc3d9f3062d

Email subscription for changes to this article
Save as PDF