Hi Martin, As Pubudu explained, those are the expected steps and the result of the application update. *Application Runtime* can only be updated with cartridgeMin/cartridgeMax and/or with groupMinInstances/groupMaxInstances. Even if you update other parameters, it will get ignored by the back end.
Please note that you can update application only when it is in deployed mode. After application is created, if you need to update, then you will have to delete the application and create it again. Currently application update is not available when the application is in created mode. Thanks, Reka On Wed, Jul 22, 2015 at 11:29 AM, Pubudu Gunatilaka <pubu...@wso2.com> wrote: > Hi Martin, > > You can update only carridgeMin and cartridgeMax at runtime in application > update. Even you can update the deployment policy which uses the > application. But you cannot change the deployment policy in application at > runtime. > > In your case, as you have used two different deployment policies, it won't > work. It will use the previous deployment policy. I have tested following > scenario. > > 1. Use the deployment policy with partition max as 1. > 2. Deploy the application with cartridgeMin 1. > 3. Update the same deployment policy with partition max 2. > 4. Update application at runtime to cartridgeMin 2. > 4. Another instance spawned successfully. > > Thank you! > > > On Wed, Jul 22, 2015 at 9:25 AM, Martin Eppel (meppel) <mep...@cisco.com> > wrote: > >> Hi, >> >> >> >> I am currently testing the API to update an application (most notably to >> update the cartridge cartridgeMin / cartridgeMax in a cartridge deployment >> policy). >> >> >> >> My main question is which are the parameters which are currently >> supported to be updated as part of application update. >> >> >> >> I have tested updating (increasing the value) of cartridge cartridgeMin / >> cartridgeMax of a cartridge policy which works fine, as long as the >> cartridge deployment policy is correspondingly configured: >> >> >> >> e.g. updating min/max from 1/1 to 2/2 and (using the deployment policy >> “static-2”) with a partitionMax set to 2. >> >> >> >> However, updating the deployment policy either not supported or fails to >> work. >> >> >> >> For example, if I start initially with cartridgeMin / cartridgeMax = 1 >> and a deployment policy “static-1” (with a partitionMax set to 1) and >> then update the cartridge policy cartridgeMin / cartridgeMax = 2 and the >> deployment policy “static-2” ( with a partitionMax set to 2) the >> cartridge instances are not properly spun up to 2. >> >> >> >> I am not sure if updating the deployment policy (or any other parameters >> beyond min / max in the cartridge policy, e.g min / max in group policy etc >> …) is currently supported or not, which brings me back to my initial >> question which parameters are supported as part of application “update”, >> please clarify. >> >> >> >> Also, is the case supported when decreasing the values, e.g. updating >> the cartridgeMin / cartridgeMax = 2 to 1 ? >> >> >> >> Just in case I attached the policy files and log to the email, >> application, cartridge group json see below inline >> >> >> >> Thanks >> >> >> >> Martin >> >> >> >> Before application update: >> >> Application json: >> >> {"alias": "sub-app-update-1", "applicationId": "sub-app-update-1", >> "components": {"cartridges": [], "groups": [{"name": "sub-app-update-1", >> "groupMaxInstances": 1, "groupMinInstances": 1, "alias": >> "sub-app-update-1-x0x", "cartridges": [{"cartridgeMin": 1, >> "cartridgeMax": 1, "type": "c1", "subscribableInfo": {"alias": "c1-0x0", >> "deploymentPolicy": "static-1", "autoscalingPolicy": "economyPolicy"}}], >> "groups": []}]}} >> >> >> >> Cartridge-group.json: >> >> {"name": "sub-app-update-1", "dependencies": {"terminationBehaviour": >> "terminate-none", "startupOrders": []}, "cartridges": ["c1"], "groups": []} >> >> >> >> application update json: >> >> >> >> {"alias": "sub-app-update-1", "applicationId": "sub-app-update-1", >> "components": {"cartridges": [], "groups": [{"name": "sub-app-update-1", >> "groupMaxInstances": 1, "groupMinInstances": 1, "alias": >> "sub-app-update-1-x0x", "cartridges": [{"cartridgeMin": 2, >> "cartridgeMax": 2, "type": "c1", "subscribableInfo": {"alias": "c1-0x0", >> "deploymentPolicy": "static-2", "autoscalingPolicy": "economyPolicy"}}], >> "groups": []}]}} >> >> >> >> >> >> Deployment policies (attached): >> >> >> >> static-1.json, static-2.json >> >> >> >> Application (before / after update): >> >> >> >> >> > > > > -- > > *Pubudu Gunatilaka* > Software Engineer > WSO2, Inc.: http://wso2.com > lean.enterprise.middleware > mobile: +94 77 4078049 > -- Reka Thirunavukkarasu Senior Software Engineer, WSO2, Inc.:http://wso2.com, Mobile: +94776442007