ravening opened a new pull request #4228:
URL: https://github.com/apache/cloudstack/pull/4228


   ## Description
   <!--- Describe your changes in detail -->
   Fixes #4218 
   
   If a host is removed from cloudstack, it will be
   added back if we restart the agent service on
   the host. It should not be added back if manualy
   removed.
   
   Provide a global setting "add.host.on.service.restart" with
   default value of true. If set to false, the zoneid,
   clusterid and podid in agent.properties will be set to
   null so that when service is restarted, the agent is not
   added back
   
   If true these values will not be set to null so that it
   can be still added back on service restart
   
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Put an `x` in all the 
boxes that apply: -->
   - [X] Bug fix (non-breaking change which fixes an issue)
   
   
   ## Screenshots (if appropriate):
   
   ## How Has This Been Tested?
   1. Add a host from ui. It will be successfully added
   2. Now remove the host
   3. Set the global setting `add.host.on.service.restart` to false
   3. ssh to host and restart cloudstack-agent service
   4. The host is not added back
   5. Try to add host from ui again. It will be added
   
   
   <!-- Please read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md)
 document -->
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to