libopenstorage / openstorage

A multi-host clustered implementation of the open storage specification
Apache License 2.0
520 stars 118 forks source link

Client issues multiple calls to the REST backend #175

Closed zoxpx closed 7 years ago

zoxpx commented 7 years ago

A certain client-API REST call, i.e. (NodeStatus):

clnt, _ := cluster.NewClusterClient("http://127.0.0.1:9001", "v1")
clusterManager := cluster.ClusterManager(clnt)
clusterManager.NodeStatus("test")

.. will result in calling the REST back-end twice instead of one time.

To illustrate, if we add extra debugs into the back-end server, this reveal "duplicated" REST-calls:


time="2017-03-08T21:29:18Z" level=warning msg="DBG ZOX> HTTP REST GET call on \
   /v1/cluster/status?name=test for \
  github.com/portworx/porx/vendor/github.com/libopenstorage/openstorage/api/server.(*clusterApi).(github.com/portworx/porx/vendor/github.com/libopenstorage/openstorage/api/server.status)-fm by 192.168.57.1:52902"
time="2017-03-08T21:29:18Z" level=warning msg="DBG ZOX> HTTP REST GET call on \
  /v1/cluster/status?name=test for \
  github.com/portworx/porx/vendor/github.com/libopenstorage/openstorage/api/server.(*clusterApi).(github.com/portworx/porx/vendor/github.com/libopenstorage/openstorage/api/server.status)-fm by 192.168.57.1:52902"```
zoxpx commented 7 years ago

Fix merged - closing the issue