Skip to content
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

Downgrade from dev/2.5 to dev/2.4 does not work #2058

Closed
TeddyAndrieux opened this issue Nov 20, 2019 · 3 comments
Closed

Downgrade from dev/2.5 to dev/2.4 does not work #2058

TeddyAndrieux opened this issue Nov 20, 2019 · 3 comments
Assignees
Labels
kind:bug Something isn't working topic:lifecycle Issues related to upgrade or downgrade of MetalK8s

Comments

@TeddyAndrieux
Copy link
Collaborator

TeddyAndrieux commented Nov 20, 2019

Component:

'salt', 'kubernetes'

What happened:

In dev/2.4 we use extensions/v1beta1 API do deploy kube-proxy DaemonSet but this API get removed in k8s 1.16 (which is the version we use in dev/2.5) so when we try to downgrade kube-proxy and our APIserver still using dev/2.5 version (k8s 1.16) extensions/v1beta1 do not exists

          ID: Deploy kube-proxy (DaemonSet)
    Function: metalk8s_kubernetes.object_present
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.7/site-packages/salt/state.py", line 1919, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.7/site-packages/salt/loader.py", line 1918, in wrapper
                  return f(*args, **kwargs)
                File "/var/cache/salt/master/extmods/states/metalk8s_kubernetes.py", line 132, in object_present
                  **kwargs
                File "/var/cache/salt/master/extmods/modules/metalk8s_kubernetes.py", line 200, in method
                  return _handle_error(exc, action)
                File "/var/cache/salt/master/extmods/modules/metalk8s_kubernetes.py", line 74, in _handle_error
                  raise CommandExecutionError(base_msg + str(exception).decode('utf-8'))
              CommandExecutionError: Failed to create object: (404)
              Reason: Not Found
              HTTP response headers: HTTPHeaderDict({'date': 'Wed, 20 Nov 2019 11:01:44 GMT', 'content-length': '174', 'content-type': 'application/json', 'cache-control': 'no-cache, private'})
              HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the server could not find the requested resource","reason":"NotFound","details":{},"code":404}

This extensions/v1beta1 is already deprecated in dev/2.4 and should not have been used (since metalk8s-2.4.0 and metalk8s-2.4.1 are released with this API this issue need to be handle in downgrade process of dev/2.5)

What was expected:

Working downgrade from dev/2.5 to dev/2.4

Steps to reproduce

Try to downgrade from dev/2.5 to dev/2.4

Resolution proposal (optional):

TBD:
2 proposition:

  1. Downgrade API server of the bootstrap node before downgrading all kubernetes objects (but then when downgrading kubernetes object we can't remove object that use newer API)
  2. Do a kind of "hack" to use apps/v1 instead of extensions/v1beta1 to "downgrade" DaemonSet + no longer use depreacted API in any metalk8s branchs
@TeddyAndrieux TeddyAndrieux added kind:bug Something isn't working moonshot topic:lifecycle Issues related to upgrade or downgrade of MetalK8s labels Nov 20, 2019
@TeddyAndrieux TeddyAndrieux changed the title Downgrade in from dev/2.5 to dev/2.4 does not work Downgrade from dev/2.5 to dev/2.4 does not work Nov 20, 2019
TeddyAndrieux added a commit that referenced this issue Nov 20, 2019
Currently downgrade do not working because we downgrade all kubernetes
objects before downgrading the API server of the bootstrap node and
kubernetes 1.16 removed the support of DaemonSet and other objects using
`extensions/v1beta1`, since we use `extensions/v1beta1` to deploy
coredns in dev/2.4 we cannot downgrade it.

Sees: #2058
TeddyAndrieux added a commit that referenced this issue Nov 20, 2019
Currently downgrade do not working because we downgrade all kubernetes
objects before downgrading the API server of the bootstrap node and
kubernetes 1.16 removed the support of DaemonSet and other objects using
`extensions/v1beta1`, since we use `extensions/v1beta1` to deploy
coredns in dev/2.4 we cannot downgrade it.

Sees: #2058
gdemonet pushed a commit that referenced this issue Nov 21, 2019
Currently downgrade does not work because we downgrade all Kubernetes
objects before downgrading the API server of the bootstrap node.
Kubernetes 1.16 removed the support of some APIs that we use in the 2.4
branch, hence we cannot downgrade without re-ordering the whole process.

See: #2058
@thomasdanan
Copy link
Contributor

maybe related to #2081 ?

@TeddyAndrieux
Copy link
Collaborator Author

maybe related to #2081 ?

No we have 2 separate issue, #2081 is just downgrading from one version to a version already released so only 2.4.1 and 2.4.0

@thomasdanan thomasdanan added this to the MetalK8s 2.5.0 milestone Dec 10, 2019
@TeddyAndrieux TeddyAndrieux self-assigned this Dec 12, 2019
TeddyAndrieux added a commit that referenced this issue Dec 12, 2019
This reverts commit c5ef29b.
Downgrade is fixed by #2101

Sees: #2058
@TeddyAndrieux
Copy link
Collaborator Author

Fixed by #2101

ChengYanJin pushed a commit that referenced this issue Dec 17, 2019
Currently downgrade does not work because we downgrade all Kubernetes
objects before downgrading the API server of the bootstrap node.
Kubernetes 1.16 removed the support of some APIs that we use in the 2.4
branch, hence we cannot downgrade without re-ordering the whole process.

See: #2058
ChengYanJin pushed a commit that referenced this issue Dec 17, 2019
This reverts commit c5ef29b.
Downgrade is fixed by #2101

Sees: #2058
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Something isn't working topic:lifecycle Issues related to upgrade or downgrade of MetalK8s
Projects
None yet
Development

No branches or pull requests

2 participants