Namespace stats issue

Hello,

AMC is not working properly for me in some cases (namespace infos are missing) ajax request failes.

http://localhost:8081/aerospike/service/clusters/76642af6-660c-4ce1-a795-78fa9d731637/namespaces/htmlcache?nodes=xxx,xxx,xxx

Heres a stacktrace: (running 3.9.0.3 and AMC 3.6.9)

args:()
kwargs:{'cluster': <models.cluster.Cluster object at 0x7f89c8041850>, 'namespace_list': u'htmlcache'}Traceback (most recent call last):
  File "/opt/amc/server/utilities/cluster_manager.py", line 131, in f
    return fn(*args, **kwargs)
  File "/opt/amc/server/helpers/debugger.py", line 270, in decorator
    response = fn(*args, **kwargs)
  File "/opt/amc/server/flaskapp.py", line 148, in get_namespace_info
    response = namespace_controller.get_namespace_info(cluster, str(namespace_list), node_addresses)
  File "/opt/amc/server/controllers/namespace_controller.py", line 57, in get_namespace_info
    ns_obj.update_statistics(node_obj)
  File "/opt/amc/server/models/namespace.py", line 136, in update_statistics
    statistics = self.assign_stat_aliases(statistics)
  File "/opt/amc/server/models/namespace.py", line 181, in assign_stat_aliases
    stats["available-bin-names"] = stats["available_bin_names"]
KeyError: 'available_bin_names'
2016-08-05 12:31:53 [15158] [ERROR] Error handling request
Traceback (most recent call last):
  File "/opt/amc/server/site-packages/gunicorn/workers/async.py", line 45, in handle
    self.handle_request(listener, req, client, addr)
  File "/opt/amc/server/site-packages/gunicorn/workers/async.py", line 93, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/opt/amc/server//site-packages/flask/app.py", line 1701, in __call__
    return self.wsgi_app(environ, start_response)
  File "/opt/amc/server//site-packages/flask/app.py", line 1689, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/opt/amc/server//site-packages/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/amc/server//site-packages/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/amc/server//site-packages/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/amc/server//site-packages/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/amc/server/utilities/cluster_manager.py", line 135, in f
    raise Exception("Internal server error!")
Exception: Internal server error!

You have to use the latest amc version, 3.6.10.1

switched over to 3.6.10.1 noticed that its half working…

at least now the dashboard is fully working thanks for that.

But still im unable to see the number of set entries in definitions, any idears for that?

Looks like this is an oversight from a much older change (I would guess 3.6.1) when the format of the set statistics changed to:

$ asinfo -v sets
ns=<namespace>:set=<set>:objects=459398:memory_data_bytes=0:deleting=false:stop-writes-count=0:set-enable-xdr=use-default:disable-eviction=false;

(Notice the removal of Evict HWM count, and the introduction of Disable eviction). We will follow up and address this in the next release. Thanks for reporting on it!

This should be fixed in the latest release (v3.6.11)