[Openstack] Different output from same version client on two different hosts.

Akihiro Motoki amotoki at gmail.com
Sat Jan 7 09:18:08 UTC 2017


It looks like that the different comes from cliff-tablib.
JSON formatter is provided from cliff and cliff-tablib.
The former output comes from JSON formatter of cliff and the latter comes
from the cliff-tablib JSON formatter.
My suggestion is to remove cliff-tablib from the latter venv.
(Note that cliff itself now provides JSON formatter, so cliff-tablib is no
longer needed.)

2017-01-06 10:59 GMT+09:00 Kevin Benton <kevin at benton.pub>:

> Since the neutron client versions are the same I suspect a unpinned
> dependency may be different between the two.
>
> Did you install the client via pip or your distro's package manager?
>
> On Jan 5, 2017 10:34, "Ken D'Ambrosio" <ken at jots.org> wrote:
>
>> Hey, all.  I'm writing some wrapper scripts to do some maintenance, and
>> decided to install the client on my desktop Ubuntu machine just for
>> ease-of-use.  And my script crashed and burned.  Initially, I'd assumed it
>> was me screwing up Ruby... but then I realized that I'm getting completely
>> different output from two different openstack clients, both showing v.
>> 2.3.0 (with "-2" for the Ubuntu packages):
>>
>> ken at boatanchor:~ liberty(prod)$ neutron agent-show
>> 30d1048b-b508-4209-b6e4-8214ab9de0f2 -f json
>> Destop:
>> {
>>   "binary": "neutron-vpn-agent",
>>   "description": "",
>>   "admin_state_up": true,
>>   "created_at": "2016-12-15 20:01:39",
>>   "alive": true,
>>   "id": "30d1048b-b508-4209-b6e4-8214ab9de0f2",
>>   "topic": "l3_agent",
>>   "host": "wilted-attention",
>>   "agent_type": "L3 agent",
>>   "started_at": "2016-12-15 20:14:48",
>>   "heartbeat_timestamp": "2017-01-05 17:20:00",
>>   "configurations": "{\n     \"router_id\": \"\", \n     \"agent_mode\":
>> \"legacy\", \n     \"gateway_external_network_id\":
>> \"c1686e8a-ce41-48e6-a18d-77c28eccae50\", \n
>>  \"handle_internal_only_routers\": false, \n     \"use_namespaces\":
>> true, \n     \"routers\": 2, \n     \"interfaces\": 1, \n
>>  \"floating_ips\": 1, \n     \"interface_driver\":
>> \"neutron.agent.linux.interface.OVSInterfaceDriver\", \n
>>  \"log_agent_heartbeats\": false, \n     \"external_network_bridge\":
>> \"br-ex\", \n     \"ex_gw_ports\": 2\n}"
>>
>> Server:
>>
>> gbadmin at openstack-cli:/tmp liberty(prod)$ neutron agent-show
>> 30d1048b-b508-4209-b6e4-8214ab9de0f2 -f json
>> [{"Field": "admin_state_up", "Value": true}, {"Field": "agent_type",
>> "Value": "L3 agent"}, {"Field": "alive", "Value": true}, {"Field":
>> "binary", "Value": "neutron-vpn-agent"}, {"Field": "configurations",
>> "Value": "{\n     \"router_id\": \"\", \n     \"agent_mode\": \"legacy\",
>> \n     \"gateway_external_network_id\": \"c1686e8a-ce41-48e6-a18d-77c28eccae50\",
>> \n     \"handle_internal_only_routers\": false, \n
>>  \"use_namespaces\": true, \n     \"routers\": 2, \n     \"interfaces\": 1,
>> \n     \"floating_ips\": 1, \n     \"interface_driver\":
>> \"neutron.agent.linux.interface.OVSInterfaceDriver\", \n
>>  \"log_agent_heartbeats\": false, \n     \"external_network_bridge\":
>> \"br-ex\", \n     \"ex_gw_ports\": 2\n}"}, {"Field": "created_at", "Value":
>> "2016-12-15 20:01:39"}, {"Field": "description", "Value": ""}, {"Field":
>> "heartbeat_timestamp", "Value": "2017-01-05 17:20:00"}, {"Field": "host",
>> "Value": "wilted-attention"}, {"Field": "id", "Value":
>> "30d1048b-b508-4209-b6e4-8214ab9de0f2"}, {"Field": "started_at",
>> "Value": "2016-12-15 20:14:48"}, {"Field": "topic", "Value": "l3_agent"}]
>>
>> ---------------
>>
>> WAT?  Can someone essplain what I've got going on, here?  I admit that I
>> vastly prefer the desktop's output -- I don't have to keep looping through
>> stuff to pull key/value pairs -- but I've coded for the server's output.
>> More to the point, I'm completely at a loss to explain the disparity.  Some
>> environmental variable or something?
>>
>> Other items of note:
>> * I sniffed the API calls -- they are both receiving the same information
>> back from the server.
>> * YAML output has the same variations as the JSON.
>> * Straight non-formatted output is identical between the two clients
>>
>> Thanks,
>>
>> -Ken
>>
>> _______________________________________________
>> Mailing list: http://lists.openstack.org/cgi
>> -bin/mailman/listinfo/openstack
>> Post to     : openstack at lists.openstack.org
>> Unsubscribe : http://lists.openstack.org/cgi
>> -bin/mailman/listinfo/openstack
>>
>
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/
> openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/
> openstack
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20170107/b96c3723/attachment.html>


More information about the Openstack mailing list