shwstppr opened a new pull request #4789: URL: https://github.com/apache/cloudstack/pull/4789
### Description Fixes #3717 Hosts can have multiple tags assigned to them therefore changes have been made to check for all of the host tags if they match `ha.tag` configuration value. <!--- ********************************************************************************* --> <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. --> <!--- PLEASE PUT AN 'X' in only **ONE** box --> <!--- ********************************************************************************* --> ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [x] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [ ] Major - [ ] Minor #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [x] Minor - [ ] Trivial ### Screenshots (if appropriate): ### How Has This Been Tested? <!-- Please describe in detail how you tested your changes. --> <!-- Include details of your testing environment, and the tests you ran to --> <!-- see how your change affects other areas of the code, etc. --> With a 2xKVM hosts env with advanced networking Global config - ha.tag: ``` (localcloud) SBCM5> > list configurations name=ha.tag { "configuration": [ { "category": "Advanced", "description": "HA tag defining that the host marked with this tag can be used for HA purposes only", "isdynamic": false, "name": "ha.tag", "value": "ha" } ], "count": 1 } ``` Before changes: ``` (localcloud) SBCM5> > list hosts type='Routing' filter=id,name,hahost,hosttags,hostha { "count": 2, "host": [ { "hahost": false, "hostha": { "haenable": false, "hastate": "Disabled" }, "id": "845ba3d4-3c28-497d-a4b5-f3918a3031b3", "name": "pr4710-t3640-kvm-centos7-kvm2" }, { "hahost": false, "hostha": { "haenable": false, "hastate": "Disabled" }, "hosttags": "test,ha", "id": "4937aa4f-6f27-4dc8-af70-2335279edf27", "name": "pr4710-t3640-kvm-centos7-kvm1" } ] } ``` After changes: ``` (localcloud) SBCM5> > list hosts type='Routing' filter=id,name,hahost,hosttags,hostha { "count": 2, "host": [ { "hahost": false, "hostha": { "haenable": false, "hastate": "Disabled" }, "id": "845ba3d4-3c28-497d-a4b5-f3918a3031b3", "name": "pr4710-t3640-kvm-centos7-kvm2" }, { "hahost": true, "hostha": { "haenable": false, "hastate": "Disabled" }, "hosttags": "test,ha", "id": "4937aa4f-6f27-4dc8-af70-2335279edf27", "name": "pr4710-t3640-kvm-centos7-kvm1" } ] } ``` <!-- 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: us...@infra.apache.org