DK101010 commented on pull request #4399:
URL: https://github.com/apache/cloudstack/pull/4399#issuecomment-885436838


   > found two bugs in testing
   > (1) list hosts response lists only 1 host tag, although hosts have 
multiple host tags.
   > for example
   > 
   > ```
   > (localcloud) SBCM5> > update host id=d9988a7b-7e02-4e90-9c4a-798c588b1cba 
hosttags=tag1,tag2
   > {
   >   "host": {
   > ...
   >     "hosttags": "tag2",
   > ...
   >   }
   > }
   > 
   > (localcloud) SBCM5> > list hosts id=d9988a7b-7e02-4e90-9c4a-798c588b1cba 
filter=hosttags
   > {
   >   "count": 1,
   >   "host": [
   >     {
   >       "hosttags": "tag2"
   >     }
   >   ]
   > }
   > ```
   > 
   > however in db, host has 2 tags.
   > 
   > ```
   > mysql> select * from host_tags;
   > +----+---------+------+
   > | id | host_id | tag  |
   > +----+---------+------+
   > | 29 |       4 | tag1 |
   > | 30 |       4 | tag2 |
   > +----+---------+------+
   > 2 rows in set (0.00 sec)
   > ```
   > 
   > (2) vm can be starteded on a host which does not have all tags.
   > for example, service offering has host tags "tag1,tag2", and host has host 
tags "tag1,tag1".
   > 
   > @DK101010 could you please fix the bugs above ?
   
   Hi @weizhouapache, many thanks for testing. I'm a little bit confused, the 
logic doesn't use the list host method to find the right one. I wrote an sql to 
check this. Also we use this feature already for a long time without problems 
and I wrote test for this to get sure of this :/. Hmm ... how do you test this? 


-- 
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.

To unsubscribe, e-mail: [email protected]

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


Reply via email to