-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to rollback #1256
Comments
It looks like the server doesn't host the API, which is weird because IIRC the rollback API gets dropped in 1.18, and should be still available in 1.17. Does kubectl rollout work? |
The apps/v1beta1 and extensions/v1beta1 API groups are not served by default since 1.16. Have you enabled them in the apiserver? Could you run kubectl api-versions to double check? |
[root@k8smaster02 ~]# kubectl api-versions |
Verified that extensions/v1beta1 is enabled. Still getting 404 for rollback request. Tested with kubernetes-client 12.0.0b1 as well..
|
Found another issue which raises same problem. kubernetes 12 should use apps/v1 for rollback since apps/v1beta1 and extensions/v1beta1 seems deprecated |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What happened (please include outputs or screenshots):
def rollback(self,namespace,name,version): try: rollbackto=client.AppsV1beta1RollbackConfig(revision=version) body=client.ExtensionsV1beta1DeploymentRollback(api_version="extensions/v1beta1",name=name,kind="DeploymentRollback",rollback_to=rollbackto) res=self.extensions_v1beta1.create_namespaced_deployment_rollback(namespace=namespace,name=name,body=body) return True,res.status except: return False,traceback.format_exc()
The result of the operation is:
Connected to pydev debugger (build 192.6262.63)
False:Traceback (most recent call last):
File "D:/WORK/CI/branches/CI/Ci/base/k8scommon/k8s_api.py", line 51, in rollback
res=self.extensions_v1beta1.create_namespaced_deployment_rollback(namespace=namespace,name=name,body=body)
File "D:\vitural\lib\site-packages\kubernetes\client\api\extensions_v1beta1_api.py", line 291, in create_namespaced_deployment_rollback
(data) = self.create_namespaced_deployment_rollback_with_http_info(name, namespace, body, **kwargs) # noqa: E501
File "D:\vitural\CiWeb\lib\site-packages\kubernetes\client\api\extensions_v1beta1_api.py", line 389, in create_namespaced_deployment_rollback_with_http_info
collection_formats=collection_formats)
File "D:\vitural\CiWeb\lib\site-packages\kubernetes\client\api_client.py", line 345, in call_api
_preload_content, _request_timeout)
File "D:\vitural\CiWeb\lib\site-packages\kubernetes\client\api_client.py", line 176, in __call_api
_request_timeout=_request_timeout)
File "D:\vitural\CiWeb\lib\site-packages\kubernetes\client\api_client.py", line 388, in request
body=body)
File "D:\vitural\CiWeb\lib\site-packages\kubernetes\client\rest.py", line 278, in POST
body=body)
File "D:\vitural\CiWeb\lib\site-packages\kubernetes\client\rest.py", line 231, in request
raise ApiException(http_resp=r)
kubernetes.client.rest.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'Date': 'Mon, 14 Sep 2020 06:24:52 GMT', 'Content-Length': '174'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the server could not find the requested resource","reason":"NotFound","details":{},"code":404}
What you expected to happen:
there have versions1 、2 ,i want rollback to version 1
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
1.17.4
):python -3.6.8
)11.0.0
)The text was updated successfully, but these errors were encountered: