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. So when host is removed, guid is set to null. When service is restarted, check if guid is null for the host it send to mgt server. If guid is null then dont add it back. When we are adding host, temporarily set guid to non null value so that when agent sends startuprouting command it knows that the host is getting explicitly added. Once host is added, set it back to null ## 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. 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]
