Scenario
Cloudify 2.7 application running a tomcat service instance
Goal
I would like to stop (shut off) and start the VM hosting tomcat using OpenStack APIs, without Cloudify re-installs the tomcat recipe.
What I tried to do
I tried to use the Maintenance Mode, following this guide:
Setting a service instance to maintenance mode will disable host machine failure detection for that specific service instance. This means that during the specified time period, a failure or a restart of a service instance host machine will NOT result in a provisioning of a new machine and service instance.
So, I have executed the following commands:
1. cloudify@default> connect VM_MNG_IP
2. cloudify@default> use-application <application_name>
3. cloudify@tommy> invoke <service_name> cloudify:start-maintenance-mode 300
4. Shut off the tomcat VM using OpenStack API
5. Start the tomcat VM using OpenStack API
After that, what I saw in the Cloudify's Orchestraotor logs was the re-installation process of the tomcat service. In other words, the tomcat VM now hosts tow tomcat Processing Units.
ls -al /root/gigaspaces/work/processing-units
<application_name>_tomcat_1_1278947587
<application_name>_tomcat_1_2029943570
Can someone suggest to me what should I do in order to reach my goal?