os-service-type does not work for tackerclient

Bug #1705372 reported by wangchenglong
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-tackerclient
Won't Fix
Medium
wangchenglong

Bug Description

Hi,
My tacker version is stable/Ocata. I install tacker in controller node and network node.
And the controller node's host name is 'tacker-nfvm', the network node's host name is 'tacker-server'.
both nodes' tackers can be running ok.

In order to test the tacker client's --os-service-type, I create I create two service-type for tacker.

root@controller:/home/user# openstack service list|grep tacker
| 29b7eacb4c3341bfbc2acf0fc4804820 | tacker | nfv-management |
| a974817ceeb3431492c55a0f7693771e | tacker | nfv-orchestration |

and I also provide an endpoint for tacker-server with different service-type, nfv-management and nfv-orchestration.

| 2347ad5a0db049deaebed501df0d458f | RegionOne | tacker | nfv-management | True | admin | http://tacker-vnfm:9890/ |
| 42341f79d0d04fb5a1122165d1bfd70b | RegionOne | tacker | nfv-orchestration | True | internal | http://tacker-server:9890/ |
| 7b9cb1daffcb4bbb9af240657d16385d | RegionOne | tacker | nfv-orchestration | True | admin | http://tacker-server:9890/ |
| 86a1a30b561d4b25ae226f5718ef17db | RegionOne | tacker | nfv-management | True | internal | http://tacker-vnfm:9890/ |
| b4b54626de1c4d939d3ec30f6f9515b0 | RegionOne | tacker | nfv-management | True | public | http://tacker-vnfm:9890/ |
| d01e8082308d443bb760958ab4ef0c69 | RegionOne | tacker | nfv-orchestration | True | public | http://tacker-server:9890/ |

In controller, I request vnfd list using --os-service-type.

 command is "tacker --os-service-type nfv-management vnfd-list --debug".

but it's strange that the endpoint's url is not tacker-vnfm:9890 but tacker-server:9890.

the debug is follwing:

tacker --os-service-type nfv-management vnfd-list --debug
DEBUG: keystoneclient.session REQ: curl -g -i -X GET http://controller:35357/v3 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG: keystoneclient.session RESP: [200] Date: Wed, 19 Jul 2017 07:49:17 GMT Server: Apache/2.4.18 (Ubuntu) Vary: X-Auth-Token X-Distribution: Ubuntu x-openstack-request-id: req-2ddbccba-73d1-4b7c-8745-90f3f0af7234 Content-Length: 250 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json
RESP BODY: {"version": {"status": "stable", "updated": "2017-02-22T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.8", "links": [{"href": "http://controller:35357/v3/", "rel": "self"}]}}

> /usr/local/lib/python2.7/dist-packages/tackerclient/shell.py(705)authenticate_user()
-> self.client_manager = clientmanager.ClientManager(
(Pdb) c
DEBUG: stevedore.extension found extension EntryPoint.parse('table = cliff.formatters.table:TableFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('json = cliff.formatters.json_format:JSONFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('csv = cliff.formatters.commaseparated:CSVLister')
DEBUG: stevedore.extension found extension EntryPoint.parse('value = cliff.formatters.value:ValueFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('yaml = cliff.formatters.yaml_format:YAMLFormatter')
DEBUG: tackerclient.tacker.v1_0.vnfm.vnfd.ListVNFD get_data(Namespace(columns=[], fields=[], formatter='table', max_width=0, noindent=False, print_empty=False, quote_mode='nonnumeric', request_format='json', show_details=False, template_source='onboarded'))
DEBUG: keystoneclient.auth.identity.v3.base Making authentication request to http://controller:35357/v3/auth/tokens
DEBUG: keystoneclient.auth.identity.v3.base {"token": {"is_domain": false, "methods": ["password"], "roles": [{"id": "fb6a65d3f2804ea7978085e70ef24179", "name": "admin"}], "expires_at": "2017-07-19T08:49:18.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "3be78d2edb4447d29c88e8909ab1e50b", "name": "admin"}, "catalog": [{"endpoints": [{"url": "http://neutron-server:9696", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "3c927ffb9b3746cea149d42ad246079c"}, {"url": "http://neutron-server:9696", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "89de6c848abc4387af71e103e5d13b30"}, {"url": "http://neutron-server:9696", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "8b1c63363fba45808e178a3b49dcf812"}], "type": "network", "id": "06e01f3155a14b879a4e4346f355e4bf", "name": "neutron"}, {"endpoints": [{"url": "http://nova-server:8774/v2.1/3be78d2edb4447d29c88e8909ab1e50b", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "10dcefbfca6d4ad488cfaa85894a9e29"}, {"url": "http://nova-server:8774/v2.1/3be78d2edb4447d29c88e8909ab1e50b", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "2346a5698d71462f815755257cd4b5d0"}, {"url": "http://nova-server:8774/v2.1/3be78d2edb4447d29c88e8909ab1e50b", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "e1ee5d6e44574af29b38f13826a208a9"}], "type": "compute", "id": "08fdefa941954070952cb721f10d1b48", "name": "nova"}, {"endpoints": [{"url": "http://keystone-server:35357/v3/", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "511cc045a9614b66abf4956c878e2d99"}, {"url": "http://keystone-server:5000/v3/", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "a536a85eca98416cbaedd70d49bf7989"}, {"url": "http://keystone-server:5000/v3/", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "c552937dcdd3462a8fbf83dc3a0c2ccb"}], "type": "identity", "id": "0e43c528f9e2435190537d6f7afcb119", "name": "keystone"}, {"endpoints": [{"url": "http://tacker-vnfm:9890/", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "2347ad5a0db049deaebed501df0d458f"}, {"url": "http://tacker-vnfm:9890/", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "86a1a30b561d4b25ae226f5718ef17db"}, {"url": "http://tacker-vnfm:9890/", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "b4b54626de1c4d939d3ec30f6f9515b0"}], "type": "nfv-management", "id": "29b7eacb4c3341bfbc2acf0fc4804820", "name": "tacker"}, {"endpoints": [], "type": "metering", "id": "44c192552375461aa2eed972021e89da", "name": "ceilometer"}, {"endpoints": [{"url": "http://controller:8004/v1/3be78d2edb4447d29c88e8909ab1e50b", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "1c7b1d0456e34914b1740b8b964f7136"}, {"url": "http://controller:8004/v1/3be78d2edb4447d29c88e8909ab1e50b", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "3be228b1a90241a784a886e48c1d8cfb"}, {"url": "http://controller:8004/v1/3be78d2edb4447d29c88e8909ab1e50b", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "a20bf4eb509d48a498eb8af3a848a4a8"}], "type": "orchestration", "id": "4b70db62aa5d455283f3c7f8af6ba280", "name": "heat"}, {"endpoints": [], "type": "help", "id": "4f31cb8876e44959ad9eb4e5908555b4", "name": "tacker"}, {"endpoints": [{"url": "http://controller:8041", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "0939153a9adf4ba6af77ecaf1ef3b418"}, {"url": "http://controller:8041", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "9aad002655804b3d872ce12aef9edeaa"}, {"url": "http://controller:8041", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "f9e1c0056b7b4b1cadbf1f4d90d9ebbb"}], "type": "metric", "id": "5b2b4085289445d19e109544f53173eb", "name": "gnocchi"}, {"endpoints": [{"url": "http://controller:8042", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "7a83396fca014f1a87a193d23087c971"}, {"url": "http://controller:8042", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "a61a23615d214e788c5dd941c416b50f"}, {"url": "http://controller:8042", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "f711d55e07524eb09a9c63d3346f2766"}], "type": "alarming", "id": "66b1cc99380643ae98499f3a10aa7e34", "name": "aodh"}, {"endpoints": [{"url": "http://glance-server:9292", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "22f1fa5cd75e44b7bbb286455f7ed9dd"}, {"url": "http://glance-server:9292", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "62651361534f4b95977eb1e77b4c3fbc"}, {"url": "http://glance-server:9292", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "f4839a42f17f4255bd8d2cd15a308940"}], "type": "image", "id": "a77548f02ec444aabc4a39b190429e47", "name": "glance"}, {"endpoints": [{"url": "http://tacker-server:9890/", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "42341f79d0d04fb5a1122165d1bfd70b"}, {"url": "http://tacker-server:9890/", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "7b9cb1daffcb4bbb9af240657d16385d"}, {"url": "http://tacker-server:9890/", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "d01e8082308d443bb760958ab4ef0c69"}], "type": "nfv-orchestration", "id": "a974817ceeb3431492c55a0f7693771e", "name": "tacker"}, {"endpoints": [{"url": "http://controller:8000/v1", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "4400c98222ed4bcc98edf8f1ad92be9f"}, {"url": "http://controller:8000/v1", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "75077c06b57847f6bca02508a62e769e"}, {"url": "http://controller:8000/v1", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "9ae6d3cab1a644d9b9d15de00b459f62"}], "type": "cloudformation", "id": "bafb17b904844af7874d79193a7586a2", "name": "heat-cfn"}, {"endpoints": [{"url": "http://controller:8989/v2", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "36f8ecb5a100433291e55ba9494c4ce2"}, {"url": "http://controller:8989/v2", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "8669d329e17f475bbd274f585b6750b5"}, {"url": "http://controller:8989/v2", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "f37316d450cd4075a2c0c49782782497"}], "type": "workflowv2", "id": "e513325274584418b1552135af3cb21c", "name": "mistral"}, {"endpoints": [{"url": "http://placement-server:8778", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "2d94ca7c005949c297a1ee2ae841f610"}, {"url": "http://placement-server:8778", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "3d3cd47f306845fca49d0178bc6652e8"}, {"url": "http://placement-server:8778", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "4bf58be0835c4dafbeb41d73968d5420"}], "type": "placement", "id": "e6e8a9b0320f4afaa2c32e0921e82919", "name": "placement"}], "user": {"domain": {"id": "default", "name": "Default"}, "password_expires_at": null, "name": "admin", "id": "9d193bb5301d4b91b336bce51376cd60"}, "audit_ids": ["SOHhMKaUTk2WyiNP5QSeXQ"], "issued_at": "2017-07-19T07:49:18.000000Z"}}
> /usr/local/lib/python2.7/dist-packages/tackerclient/v1_0/client.py(167)__init__()
-> self.httpclient = client.construct_http_client(**kwargs)
(Pdb) c
DEBUG: keystoneclient.session REQ: curl -g -i -X GET http://tacker-server:9890/v1/vnfds.json?template_source=onboarded -H "User-Agent: python-tackerclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}ef32196a0144dfe9661987bd5d5c46865ef4de92"
DEBUG: keystoneclient.session RESP: [200] Content-Type: application/json Content-Length: 13620 X-Openstack-Request-Id: req-12efd967-d9a6-45ab-a8bd-ceca4a62bc06 Date: Wed, 19 Jul 2017 07:49:01 GMT Connection: keep-alive
RESP BODY: {"vnfds": [{"template_source": "onboarded", "service_types": ["vnfd"], ...

when I stop the network node's tacker, the result is :
ConnectFailure: Unable to establish connection to http://tacker-server:9890/v1/vnfds.json?template_source=onboarded
Unable to establish connection to http://tacker-server:9890/v1/vnfds.json?template_source=onboarded

why client's --os-service-type does not work ?

Changed in python-tackerclient:
assignee: nobody → wangchenglong (wangchenglong)
status: New → Confirmed
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tackerclient (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/485463

Changed in python-tackerclient:
milestone: none → pike-3
milestone: pike-3 → pike-rc1
importance: Undecided → Medium
Changed in python-tackerclient:
status: In Progress → Fix Committed
Changed in python-tackerclient:
status: Fix Committed → Won't Fix
status: Won't Fix → Fix Committed
Revision history for this message
yong sheng gong (gongysh) wrote :

think it is not easy for user to be used to new service_type, so for the time being, just make it fix-coded.

Changed in python-tackerclient:
status: Fix Committed → Won't Fix
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-tackerclient (stable/ocata)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/ocata
Review: https://review.opendev.org/c/openstack/python-tackerclient/+/485463
Reason: stable/ocata for python-tackerclient has been transitioned to End of Life, all open patches need to be abandoned to be able to delete the branch.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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