Closed bzurkowski closed 3 years ago
The Replica Set probe is unable to fetch a list of objects after upgrade to Kubernetes v1.16.
According to Kubernetes client documentation, list_replica_set_for_all_namespaces method has been moved from ExtensionsV1beta1Api to AppsV1Api.
list_replica_set_for_all_namespaces
ExtensionsV1beta1Api
AppsV1Api
Full error message:
22:34:04 probe.1 | 2020-12-02 22:34:04,005 - orca.topology.probe - INFO - Consuming events for entity: kubernetes/replica_set 22:34:04 probe.1 | Unhandled exception 22:34:04 probe.1 | Traceback (most recent call last): 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/cotyledon/_utils.py", line 95, in exit_on_exception 22:34:04 probe.1 | yield 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/cotyledon/_service.py", line 139, in _run 22:34:04 probe.1 | self.run() 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/orca/topology/probe.py", line 50, in run 22:34:04 probe.1 | probe.run() 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/orca/topology/probe.py", line 103, in run 22:34:04 probe.1 | self._synchronize() 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/orca/topology/probe.py", line 110, in _synchronize 22:34:04 probe.1 | upstream_nodes = self._get_upstream_nodes() 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/orca/topology/probe.py", line 118, in _get_upstream_nodes 22:34:04 probe.1 | entities = self._upstream_proxy.get_all() 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/orca/topology/infra/k8s/upstream.py", line 23, in get_all 22:34:04 probe.1 | return self._client.get_all() 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/orca/common/clients/k8s/client.py", line 138, in get_all 22:34:04 probe.1 | return self._list_fn().items 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/kubernetes/client/api/extensions_v1beta1_api.py", line 3906, in list_replica_set_for_all_namespaces 22:34:04 probe.1 | (data) = self.list_replica_set_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/kubernetes/client/api/extensions_v1beta1_api.py", line 4001, in list_replica_set_for_all_namespaces_with_http_info 22:34:04 probe.1 | collection_formats=collection_formats) 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 345, in call_api 22:34:04 probe.1 | _preload_content, _request_timeout) 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 176, in __call_api 22:34:04 probe.1 | _request_timeout=_request_timeout) 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/kubernetes/client/api_client.py", line 366, in request 22:34:04 probe.1 | headers=headers) 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/kubernetes/client/rest.py", line 241, in GET 22:34:04 probe.1 | query_params=query_params) 22:34:04 probe.1 | File "/usr/local/lib/python3.7/site-packages/kubernetes/client/rest.py", line 231, in request 22:34:04 probe.1 | raise ApiException(http_resp=r) 22:34:04 probe.1 | kubernetes.client.rest.ApiException: (404) 22:34:04 probe.1 | Reason: Not Found 22:34:04 probe.1 | HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Wed, 02 Dec 2020 22:33:34 GMT', 'Content-Length': '174'}) 22:34:04 probe.1 | HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the server could not find the requested resource","reason":"NotFound","details":{},"code":404}
The Replica Set probe is unable to fetch a list of objects after upgrade to Kubernetes v1.16.
According to Kubernetes client documentation,
list_replica_set_for_all_namespaces
method has been moved fromExtensionsV1beta1Api
toAppsV1Api
.Full error message: