fuelclient 'fuel node' makes extra calls when filtering nodes by env

Bug #1378963 reported by Andrew Woodward
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Medium
Roman Prykhodchenko

Bug Description

When using 'fuel --debug' I found that 'fuel node' calls that are filtered with '--env' actually makes multiple calls to get each nodes data but (/api/nodes/<node id>) but all of the data rendered is available in /api/nodes output.

[root@nailgun ~]# fuel node --debug
GET http://10.108.52.2:8000/api/v1/nodes/
id | status | name | cluster | ip | mac | roles | pending_roles | online | group_id
---|----------|------------------|---------|---------------|-------------------|-------|---------------|--------|---------
14 | discover | Untitled (9e:71) | None | 10.108.52.230 | 64:af:25:a1:9e:71 | | | True | None
15 | discover | Untitled (82:5c) | None | 10.108.52.238 | 64:fd:39:f9:82:5c | | | True | None
7 | discover | Untitled (32:7b) | 2 | 10.108.52.169 | 64:03:fa:1f:32:7b | | controller | True | 2
6 | discover | Untitled (61:94) | 2 | 10.108.47.165 | 64:74:27:5f:61:94 | | compute | True | 3
5 | discover | Untitled (80:bb) | 2 | 10.108.47.197 | 64:fb:0f:3f:80:bb | | compute | True | 3
12 | discover | Untitled (14:30) | None | 10.108.52.151 | 64:50:cd:f8:14:30 | | | True | None
3 | discover | Untitled (2e:a3) | 2 | 10.108.52.177 | 64:c9:00:54:2e:a3 | | controller | True | 2
4 | discover | Untitled (ba:52) | 2 | 10.108.52.206 | 64:c3:ce:aa:ba:52 | | controller | True | 2
13 | discover | Untitled (f3:76) | None | 10.108.52.140 | 64:3a:10:13:f3:76 | | | True | None
[root@nailgun ~]# fuel node --debug --env 2
GET http://10.108.52.2:8000/api/v1/nodes/
GET http://10.108.52.2:8000/api/v1/nodes/14/
GET http://10.108.52.2:8000/api/v1/nodes/15/
GET http://10.108.52.2:8000/api/v1/nodes/7/
GET http://10.108.52.2:8000/api/v1/nodes/6/
GET http://10.108.52.2:8000/api/v1/nodes/5/
GET http://10.108.52.2:8000/api/v1/nodes/12/
GET http://10.108.52.2:8000/api/v1/nodes/3/
GET http://10.108.52.2:8000/api/v1/nodes/4/
GET http://10.108.52.2:8000/api/v1/nodes/13/
id | status | name | cluster | ip | mac | roles | pending_roles | online | group_id
---|----------|------------------|---------|---------------|-------------------|-------|---------------|--------|---------
7 | discover | Untitled (32:7b) | 2 | 10.108.52.169 | 64:03:fa:1f:32:7b | | controller | True | 2
6 | discover | Untitled (61:94) | 2 | 10.108.47.165 | 64:74:27:5f:61:94 | | compute | True | 3
5 | discover | Untitled (80:bb) | 2 | 10.108.47.197 | 64:fb:0f:3f:80:bb | | compute | True | 3
3 | discover | Untitled (2e:a3) | 2 | 10.108.52.177 | 64:c9:00:54:2e:a3 | | controller | True | 2
4 | discover | Untitled (ba:52) | 2 | 10.108.52.206 | 64:c3:ce:aa:ba:52 | | controller | True | 2

expected result is that output from /api/nodes is filtered by the client so extra calls to API are not needed

Tags: scale cli
Dima Shulyak (dshulyak)
Changed in fuel:
milestone: none → 6.0
importance: Undecided → Medium
Dmitry Pyzhov (dpyzhov)
tags: added: scale
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Tomasz 'Zen' Napierala (tzn)
Changed in fuel:
assignee: Tomasz 'Zen' Napierala (tzn) → Roman Prykhodchenko (romcheg)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

Fix proposed to branch: master
Review: https://review.openstack.org/134498

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

It hits code freeze in 6.0. Moving to 6.1

Changed in fuel:
milestone: 6.0 → 6.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/134498
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=bc143f2f62900cf1d62193f1a05528b3f23d574f
Submitter: Jenkins
Branch: master

commit bc143f2f62900cf1d62193f1a05528b3f23d574f
Author: Roman Prykhodchenko <email address hidden>
Date: Fri Nov 14 11:36:06 2014 +0100

    Do not refresh data on filtering stuff by cluster

    Listing nodes of node groups downloads all data from
    Nailgun so there is no need to refresh it during the
    following filtering by cluster id.

    Closes-bug: #1378963
    Change-Id: Ib9f45225f6e3c91809ea0dbc47e79b3529b54d3b

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Anastasia Palkina (apalkina) wrote :

Verified on ISO #61

"build_id": "2015-01-14_22-54-45", "ostf_sha": "92ad9f8e4c509c82e07ceb093b5d579205c76014", "build_number": "61", "auth_required": true, "api": "1.0", "nailgun_sha": "bfb5ee4940555a3270362bb449fc1af4add43f20", "production": "docker", "fuelmain_sha": "", "astute_sha": "82125b0eef4e5a758fd4afa8917812e09a1f7dac", "feature_groups": ["mirantis"], "release": "6.1", "release_versions": {"2014.2-6.0": {"VERSION": {"build_id": "2015-01-14_22-54-45", "ostf_sha": "92ad9f8e4c509c82e07ceb093b5d579205c76014", "build_number": "61", "api": "1.0", "nailgun_sha": "bfb5ee4940555a3270362bb449fc1af4add43f20", "production": "docker", "fuelmain_sha": "", "astute_sha": "82125b0eef4e5a758fd4afa8917812e09a1f7dac", "feature_groups": ["mirantis"], "release": "6.1", "fuellib_sha": "89f7c94d65f75ebff01898b40aa3931bd52a8a61"}}}, "fuellib_sha": "89f7c94d65f75ebff01898b40aa3931bd52a8a61"

[root@fuel ~]# fuel node --debug
GET http://10.20.0.2:8000/api/v1/nodes/
id | status | name | cluster | ip | mac | roles | pending_roles | online | group_id
---|----------|------------------|---------|------------|-------------------|------------|---------------|--------|---------
6 | ready | Untitled (31:30) | 4 | 10.20.0.12 | 08:00:27:52:31:30 | compute | | True | 4
5 | ready | Untitled (90:a2) | 4 | 10.20.0.10 | 08:00:27:46:90:a2 | controller | | True | 4
8 | ready | Untitled (c2:f3) | 5 | 10.20.0.11 | 08:00:27:c1:c2:f3 | compute | | True | 5
7 | ready | Untitled (80:52) | 5 | 10.20.0.9 | 08:00:27:12:80:52 | controller | | True | 5
11 | discover | Untitled (af:b4) | None | 10.20.0.4 | 08:00:27:31:af:b4 | | | True | None
12 | discover | Untitled (82:4c) | None | 10.20.0.3 | 08:00:27:79:82:4c | | | True | None
10 | discover | Untitled (d2:8b) | None | 10.20.0.6 | 08:00:27:8f:d2:8b | | | True | None
13 | discover | Untitled (59:fe) | None | 10.20.0.5 | 08:00:27:8f:59:fe | | | True | None
14 | discover | Untitled (aa:71) | None | 10.20.0.8 | 08:00:27:0b:aa:71 | | | True | None
9 | discover | Untitled (a5:8d) | None | 10.20.0.7 | 08:00:27:84:a5:8d | | | True | None
[root@fuel ~]# fuel node --debug --env 4
GET http://10.20.0.2:8000/api/v1/nodes/
id | status | name | cluster | ip | mac | roles | pending_roles | online | group_id
---|--------|------------------|---------|------------|-------------------|------------|---------------|--------|---------
6 | ready | Untitled (31:30) | 4 | 10.20.0.12 | 08:00:27:52:31:30 | compute | | True | 4
5 | ready | Untitled (90:a2) | 4 | 10.20.0.10 | 08:00:27:46:90:a2 | controller | | True | 4
[root@fuel ~]#

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.