Bug 1418545

Summary: cinder service-list filtered by host name does not return overlapping names
Product: Red Hat OpenStack Reporter: bkopilov <bkopilov>
Component: openstack-cinderAssignee: Eric Harney <eharney>
Status: CLOSED WONTFIX QA Contact: Tzach Shefi <tshefi>
Severity: low Docs Contact:
Priority: urgent    
Version: 8.0 (Liberty)CC: bkopilov, eharney, geguileo, jinhli, mburns, scohen, srevivo, tvignaud
Target Milestone: ---   
Target Release: 12.0 (Pike)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-05 07:07:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description bkopilov 2017-02-02 04:48:55 UTC
Description of problem:
Testing kaminario cinder backend ,


[stack@cougar08 ~]$ cinder service-list
+------------------+-------------------------+------+---------+-------+----------------------------+-----------------+
| Binary           | Host                    | Zone | Status  | State | Updated_at                 | Disabled Reason |
+------------------+-------------------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | hostgroup               | nova | enabled | up    | 2017-02-02T04:42:12.000000 | -               |
| cinder-volume    | hostgroup@kaminario_fc  | nova | enabled | up    | 2017-02-02T04:42:13.000000 | -               |
| cinder-volume    | hostgroup@tripleo_iscsi | nova | enabled | down  | 2017-01-29T05:07:40.000000 | -               |
+------------------+-------------------------+------+---------+-------+----------------------------+-----------------+


When trying to get service-list by host=hostgroup , only the first match returned and not all names start with hostgroup.

Example:
[stack@cougar08 ~]$ cinder service-list --host hostgroup
+------------------+-----------+------+---------+-------+----------------------------+-----------------+
| Binary           | Host      | Zone | Status  | State | Updated_at                 | Disabled Reason |
+------------------+-----------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | hostgroup | nova | enabled | up    | 2017-02-02T04:43:22.000000 | -               |
+------------------+-----------+------+---------+-------+----------------------------+-----------------+




Version-Release number of selected component (if applicable):


How reproducible:
Run cinder service-list --host [name]
The host name should overlaps with other names.
The returned table contains only the first hit and not all hosts that starts with this name. 

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
cinder service-list --host [name]  should resturn all hosts that starts with the name.


Additional info:

Comment 1 jinhua li 2017-02-08 09:52:55 UTC
Hi Mike and Eric,

 This is a known issue, right?
 Is there any workaroud for this solultion?

Sincerely,
Jinhua Li

Comment 2 jinhua li 2017-02-09 07:29:06 UTC
Hi Mike and Eric,

There is a RHOSP8 cert[1] blocked by this issue. If it is a known issue, is there any workaround to make the below test items pass?

o tempest.api.volume.admin.test_volume_services.VolumesServicesV1TestJSON.test_get_service_by_host_name
o tempest.api.volume.admin.test_volume_services.VolumesServicesV2TestJSON.test_get_service_by_host_name


[1] https://hardware.redhat.com/show.cgi?id=1416490


Sincerely,
Jinhua Li

Comment 3 jinhua li 2017-02-14 09:20:00 UTC
Hi Eric, 

Could you help to confirm that whether this is a known issue of upstream? 
 I setup a rhosp8 machine,  run the test with the default cinder plugin, but I did not meet failure of these two tests:

o tempest.api.volume.admin.test_volume_services.VolumesServicesV1TestJSON.test_get_service_by_host_name
o tempest.api.volume.admin.test_volume_services.VolumesServicesV2TestJSON.test_get_service_by_host_name


Sincerely,
Jinhua Li

Comment 4 bkopilov 2017-02-15 11:39:25 UTC
Hi  , 
I have managed to reproduce the issue on other setup , on Jinhua li setup.

I have decided to disable the first service in the list.
cinder service-disable dell-per730-43 cinder-backup  

enabled it again .

[root@dell-per730-43 ~(keystone_admin)]# cinder service-list
+------------------+--------------------+------+---------+-------+----------------------------+-----------------+
|      Binary      |        Host        | Zone |  Status | State |         Updated_at         | Disabled Reason |
+------------------+--------------------+------+---------+-------+----------------------------+-----------------+
|  cinder-backup   |   dell-per730-43   | nova | enabled |   up  | 2017-02-15T11:38:33.000000 |        -        |
| cinder-scheduler |   dell-per730-43   | nova | enabled |   up  | 2017-02-15T11:38:33.000000 |        -        |
|  cinder-volume   | dell-per730-43@lvm | nova | enabled |   up  | 2017-02-15T11:38:37.000000 |        -        |
+------------------+--------------------+------+---------+-------+----------------------------+-----------------+
[root@dell-per730-43 ~(keystone_admin)]# cinder service-list --host dell-per730-43
+------------------+----------------+------+---------+-------+----------------------------+-----------------+
|      Binary      |      Host      | Zone |  Status | State |         Updated_at         | Disabled Reason |
+------------------+----------------+------+---------+-------+----------------------------+-----------------+
|  cinder-backup   | dell-per730-43 | nova | enabled |   up  | 2017-02-15T11:38:43.000000 |        -        |
| cinder-scheduler | dell-per730-43 | nova | enabled |   up  | 2017-02-15T11:38:43.000000 |        -        |
+------------------+----------------+------+---------+-------+----------------------------+-----------------+

Comment 6 bkopilov 2017-11-05 07:07:53 UTC
Hi , 
Tried to repoduced , 
stack@cougar08 ~]$ cinder service-list
+------------------+----------------------------+------+---------+-------+----------------------------+-----------------+
| Binary           | Host                       | Zone | Status  | State | Updated_at                 | Disabled Reason |
+------------------+----------------------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | hostgroup                  | nova | enabled | up    | 2017-11-05T07:03:33.000000 | -               |
| cinder-volume    | hostgroup@kaminario_iscsi1 | nova | enabled | up    | 2017-11-05T07:03:30.000000 | -               |
| cinder-volume    | hostgroup@kaminario_iscsi2 | nova | enabled | up    | 2017-11-05T07:03:35.000000 | -               |
| cinder-volume    | hostgroup@tripleo_iscsi    | nova | enabled | down  | 2017-11-01T12:51:46.000000 | -               |
+------------------+----------------------------+------+---------+-------+----------------------------+-----------------+
[stack@cougar08 ~]$ cinder service-list --host hostgroup
+------------------+----------------------------+------+---------+-------+----------------------------+-----------------+
| Binary           | Host                       | Zone | Status  | State | Updated_at                 | Disabled Reason |
+------------------+----------------------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | hostgroup                  | nova | enabled | up    | 2017-11-05T07:04:33.000000 | -               |
| cinder-volume    | hostgroup@kaminario_iscsi1 | nova | enabled | up    | 2017-11-05T07:04:30.000000 | -               |
| cinder-volume    | hostgroup@kaminario_iscsi2 | nova | enabled | up    | 2017-11-05T07:04:25.000000 | -               |
| cinder-volume    | hostgroup@tripleo_iscsi    | nova | enabled | down  | 2017-11-01T12:51:46.000000 | -               |
+------------------+----------------------------+------+---------+-------+----------------------------+-----------------+
[stack@cougar08 ~]$ 



Did not managed to reproduce.

Benny

Comment 7 bkopilov 2017-11-05 07:08:27 UTC
(In reply to bkopilov from comment #6)
> Hi , 
> Tried to repoduced , 
> stack@cougar08 ~]$ cinder service-list
> +------------------+----------------------------+------+---------+-------+---
> -------------------------+-----------------+
> | Binary           | Host                       | Zone | Status  | State |
> Updated_at                 | Disabled Reason |
> +------------------+----------------------------+------+---------+-------+---
> -------------------------+-----------------+
> | cinder-scheduler | hostgroup                  | nova | enabled | up    |
> 2017-11-05T07:03:33.000000 | -               |
> | cinder-volume    | hostgroup@kaminario_iscsi1 | nova | enabled | up    |
> 2017-11-05T07:03:30.000000 | -               |
> | cinder-volume    | hostgroup@kaminario_iscsi2 | nova | enabled | up    |
> 2017-11-05T07:03:35.000000 | -               |
> | cinder-volume    | hostgroup@tripleo_iscsi    | nova | enabled | down  |
> 2017-11-01T12:51:46.000000 | -               |
> +------------------+----------------------------+------+---------+-------+---
> -------------------------+-----------------+
> [stack@cougar08 ~]$ cinder service-list --host hostgroup
> +------------------+----------------------------+------+---------+-------+---
> -------------------------+-----------------+
> | Binary           | Host                       | Zone | Status  | State |
> Updated_at                 | Disabled Reason |
> +------------------+----------------------------+------+---------+-------+---
> -------------------------+-----------------+
> | cinder-scheduler | hostgroup                  | nova | enabled | up    |
> 2017-11-05T07:04:33.000000 | -               |
> | cinder-volume    | hostgroup@kaminario_iscsi1 | nova | enabled | up    |
> 2017-11-05T07:04:30.000000 | -               |
> | cinder-volume    | hostgroup@kaminario_iscsi2 | nova | enabled | up    |
> 2017-11-05T07:04:25.000000 | -               |
> | cinder-volume    | hostgroup@tripleo_iscsi    | nova | enabled | down  |
> 2017-11-01T12:51:46.000000 | -               |
> +------------------+----------------------------+------+---------+-------+---
> -------------------------+-----------------+
> [stack@cougar08 ~]$ 
> 
> 
> 
> Did not manage to reproduce.
> 
> Benny