Managed to bring up python3 mgr. Here are some tests:
python3 ceph orchestrator host ls
: Fail
Error EINVAL: Traceback (most recent call last):
File "/usr/share/ceph/mgr/mgr_module.py", line 915, in _handle_command
return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
File "/usr/share/ceph/mgr/mgr_module.py", line 368, in call
return self.func(mgr, **kwargs)
File "/usr/share/ceph/mgr/orchestrator_cli/module.py", line 20, in wrapper
return func(*args, **kwargs)
File "/usr/share/ceph/mgr/orchestrator_cli/module.py", line 71, in _get_hosts
orchestrator.raise_if_exception(completion)
File "/usr/share/ceph/mgr/orchestrator.py", line 129, in raise_if_exception
raise e
File "/usr/share/ceph/mgr/rook/module.py", line 180, in wait
c.execute()
File "/usr/share/ceph/mgr/rook/module.py", line 58, in execute
self._result = self.cb()
File "/usr/share/ceph/mgr/rook/module.py", line 132, in <lambda>
return RookReadCompletion(lambda: f(*args, **kwargs))
File "/usr/share/ceph/mgr/rook/module.py", line 331, in get_hosts
return [orchestrator.InventoryNode(n, []) for n in self.rook_cluster.get_node_names()]
File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 325, in get_node_names
return [i.metadata.name for i in self.nodes.items]
File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 108, in items
resource_version = self._fetch()
File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 86, in _fetch
response = self.api_func(**self.kwargs)
File "/usr/lib/python3.7/site-packages/kubernetes/client/apis/core_v1_api.py", line 13392, in list_node
(data) = self.list_node_with_http_info(**kwargs)
File "/usr/lib/python3.7/site-packages/kubernetes/client/apis/core_v1_api.py", line 13489, in list_node_with_http_info
collection_formats=collection_formats)
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 334, in call_api
_return_http_data_only, collection_formats, _preload_content, _request_timeout)
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 176, in __call_api
return_data = self.deserialize(response_data, response_type)
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 249, in deserialize
return self.__deserialize(data, response_type)
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 289, in __deserialize
return self.__deserialize_model(data, klass)
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 633, in __deserialize_model
kwargs[attr] = self.__deserialize(value, attr_type)
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 267, in __deserialize
for sub_data in data]
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 267, in <listcomp>
for sub_data in data]
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 289, in __deserialize
return self.__deserialize_model(data, klass)
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 633, in __deserialize_model
kwargs[attr] = self.__deserialize(value, attr_type)
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 289, in __deserialize
return self.__deserialize_model(data, klass)
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 633, in __deserialize_model
kwargs[attr] = self.__deserialize(value, attr_type)
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 267, in __deserialize
for sub_data in data]
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 267, in <listcomp>
for sub_data in data]
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 289, in __deserialize
return self.__deserialize_model(data, klass)
File "/usr/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 635, in __deserialize_model
instance = klass(**kwargs)
File "/usr/lib/python3.7/site-packages/kubernetes/client/models/v1_container_image.py", line 52, in __init__
self.names = names
File "/usr/lib/python3.7/site-packages/kubernetes/client/models/v1_container_image.py", line 77, in names
raise ValueError("Invalid value for `names`, must not be `None`")
ValueError: Invalid value for `names`, must not be `None`
python2 ceph orchestrator host ls
: Fail
debug 2019-07-23T03:17:15.249+0000 7f57e1fc3700 0 mgr[rook] Completion <read op> threw an exception:
Traceback (most recent call last):
File "/usr/share/ceph/mgr/rook/module.py", line 180, in wait
c.execute()
File "/usr/share/ceph/mgr/rook/module.py", line 58, in execute
self._result = self.cb()
File "/usr/share/ceph/mgr/rook/module.py", line 132, in <lambda>
return RookReadCompletion(lambda: f(*args, **kwargs))
File "/usr/share/ceph/mgr/rook/module.py", line 331, in get_hosts
return [orchestrator.InventoryNode(n, []) for n in self.rook_cluster.get_node_names()]
File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 325, in get_node_names
return [i.metadata.name for i in self.nodes.items]
File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 108, in items
resource_version = self._fetch()
File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 86, in _fetch
response = self.api_func(**self.kwargs)
File "/usr/lib/python2.7/site-packages/kubernetes/client/apis/core_v1_api.py", line 13437, in list_node
(data) = self.list_node_with_http_info(**kwargs)
File "/usr/lib/python2.7/site-packages/kubernetes/client/apis/core_v1_api.py", line 13534, in list_node_with_http_info
collection_formats=collection_formats)
File "/usr/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 321, in call_api
_return_http_data_only, collection_formats, _preload_content, _request_timeout)
File "/usr/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 163, in __call_api
return_data = self.deserialize(response_data, response_type)
File "/usr/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 236, in deserialize
return self.__deserialize(data, response_type)
File "/usr/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 276, in __deserialize
return self.__deserialize_model(data, klass)
File "/usr/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 620, in __deserialize_model
kwargs[attr] = self.__deserialize(value, attr_type)
File "/usr/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 254, in __deserialize
for sub_data in data]
File "/usr/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 276, in __deserialize
return self.__deserialize_model(data, klass)
File "/usr/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 620, in __deserialize_model
kwargs[attr] = self.__deserialize(value, attr_type)
File "/usr/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 276, in __deserialize
return self.__deserialize_model(data, klass)
File "/usr/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 620, in __deserialize_model
kwargs[attr] = self.__deserialize(value, attr_type)
File "/usr/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 254, in __deserialize
for sub_data in data]
File "/usr/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 276, in __deserialize
return self.__deserialize_model(data, klass)
File "/usr/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 622, in __deserialize_model
instance = klass(**kwargs)
File "/usr/lib/python2.7/site-packages/kubernetes/client/models/v1_container_image.py", line 52, in __init__
self.names = names
File "/usr/lib/python2.7/site-packages/kubernetes/client/models/v1_container_image.py", line 77, in names
raise ValueError("Invalid value for `names`, must not be `None`")
ValueError: Invalid value for `names`, must not be `None`
It seems list_nodes
is not working in my env, anything I can check?
python3 ceph orchestrator device ls
: OK since no code change
python2 ceph orchestrator device ls
: OK since no code change
python3 ceph orchestrator service ls
: OK
python2 ceph orchestrator service ls
: Stuck with no response
The code suggests wrong urllib3 version, which version is required for watch feature?
debug 2019-07-23T03:17:56.400+0000 7f57da5a1700 0 mgr[rook] Full fetch of <bound method CoreV1Api.list_namespaced_pod of <kubernetes.client.apis.core_v1_api.CoreV1Ap
i object at 0x7f57e20aa590>>. result: 7
debug 2019-07-23T03:17:56.416+0000 7f57c677a700 0 mgr[rook] Unable to attach watcher - incompatible urllib3? (<bound method CoreV1Api.list_namespaced_pod of <kuberne
tes.client.apis.core_v1_api.CoreV1Api object at 0x7f57e20aa590>>)
Traceback (most recent call last):
File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 125, in _watch
**self.kwargs):
File "/usr/lib/python2.7/site-packages/kubernetes/watch/watch.py", line 134, in stream
for line in iter_resp_lines(resp):
File "/usr/lib/python2.7/site-packages/kubernetes/watch/watch.py", line 47, in iter_resp_lines
for seg in resp.read_chunked(decode_content=False):
AttributeError: 'HTTPResponse' object has no attribute 'read_chunked'
Exception in thread Thread-18:
Traceback (most recent call last):
File "/usr/lib64/python2.7/threading.py", line 812, in __bootstrap_inner
self.run()
File "/usr/lib64/python2.7/threading.py", line 765, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 125, in _watch
**self.kwargs):
File "/usr/lib/python2.7/site-packages/kubernetes/watch/watch.py", line 134, in stream
for line in iter_resp_lines(resp):
File "/usr/lib/python2.7/site-packages/kubernetes/watch/watch.py", line 47, in iter_resp_lines
for seg in resp.read_chunked(decode_content=False):
AttributeError: 'HTTPResponse' object has no attribute 'read_chunked'```