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

Cluster cannot start with older versions of k8s #10122

Closed
hakman opened this issue Oct 27, 2020 · 18 comments
Closed

Cluster cannot start with older versions of k8s #10122

hakman opened this issue Oct 27, 2020 · 18 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@hakman
Copy link
Member

hakman commented Oct 27, 2020

After merging #10048, the new way of installing Docker is conflicting with the pre-installed Docker in the kope.io images.
https://prow.k8s.io/view/gcs/kubernetes-jenkins/logs/e2e-kops-aws-k8s-1-15/1320685447990480896

A similar problem existed in 1.17 and was fixed in kubernetes-sigs/image-builder#273, by just copying the Docker deb files to /var/cache/nodeup/packages and letting kOps install them if the hash matches.

All kope.io images from 1.11 to 1.16, maybe also 1.17.

@hakman hakman added this to the v1.18 milestone Oct 27, 2020
@hakman hakman added blocks-next kind/bug Categorizes issue or PR as related to a bug. labels Oct 27, 2020
@hakman hakman modified the milestones: v1.18, v1.19 Oct 27, 2020
@hakman hakman changed the title cluster cannot start on older versions of k8s Cluster cannot start on older versions of k8s Oct 27, 2020
@hakman hakman changed the title Cluster cannot start on older versions of k8s Cluster cannot start with older versions of k8s Oct 27, 2020
@hakman hakman closed this as completed Dec 4, 2020
@hakman hakman reopened this Dec 4, 2020
@rifelpet
Copy link
Member

This issue is impacting kubernetes 1.17 as well: https://testgrid.k8s.io/kops-versions#kops-aws-k8s-1.17

https://storage.googleapis.com/kubernetes-jenkins/logs/e2e-kops-aws-k8s-1-17/1344395270774853632/artifacts/18.193.88.194/protokube.log

Starting Kubernetes Protokube Service...
Started Kubernetes Protokube Service.
ctr: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:58: mounting \\\"/var/run/dbus\\\" to rootfs \\\"/run/containerd/io.containerd.runtime.v2.task/k8s.io/protokube/rootfs\\\" at \\\"/var/run/dbus\\\" caused \\\"stat /var/run/dbus: no such file or directory\\\"\"": unknown
protokube.service: Main process exited, code=exited, status=1/FAILURE

@hakman
Copy link
Member Author

hakman commented Dec 31, 2020

Yes, dbus should be installed on those images.
Ref: kubernetes-sigs/image-builder#130

justinsb added a commit to justinsb/kops that referenced this issue Jan 14, 2021
By creating a tempfile and then moving the file into place, we both
write more atomically and we can overwrite in-use files.

Issue kubernetes#10122
justinsb added a commit to justinsb/kops that referenced this issue Jan 14, 2021
@atam003
Copy link

atam003 commented Jan 26, 2021

I am using kops1.19 +Kubernetes 1.16. I tried using image latest available kops image "kope.io/k8s-1.16-debian-stretch-amd64-hvm-ebs-2020-11-19". I still see this issue.
Is there any latest published image of kops which can be used?

@hakman
Copy link
Member Author

hakman commented Jan 26, 2021

@atam003 until 1.19 is released, you can use the official Debian 9 image or the Ubuntu 20.04 image.

@sonowz
Copy link

sonowz commented Jan 28, 2021

Is there any workaround with this issue?
I'm using kops 1.19-beta3, Kubernetes 1.18, and my AMI is Ubuntu 18.04 with Docker pre-installed.
Then struck into same error as #10492.
What should I do in order for the AMI to work? Does upgrading Kubernetes into 1.20 solves the issue?

@hakman
Copy link
Member Author

hakman commented Jan 28, 2021

@sonowz can you explain a bit more why Ubuntu 18.04 and why docker pre-installed?

As for workaround, you could try with:

  containerd:
    skipInstall: true
  docker:
    skipInstall: true

The issue should be fixed once 1.19 is released later this week (I hope).

@sonowz
Copy link

sonowz commented Jan 28, 2021

There's no reason to use 18.04, it's just a version I'm currently using.
The reasons why Docker is pre-installed are the following:

  • nvidia-container-runtime should be configured as default runtime
  • Some images should be stored in AMI due to its gigantic size (~20GB)

The issue should be fixed once 1.19 is released later this week (I hope).

That's good to hear! I'm looking forward to it.

@hakman
Copy link
Member Author

hakman commented Jan 28, 2021

Thanks for explaining. You may also disable the Docker and containerd services in the AMI. kOps will start them later.

@sonowz
Copy link

sonowz commented Jan 28, 2021

Disabling autostart of Docker and containerd service works! Thanks a lot 👍

@atam003
Copy link

atam003 commented Jan 29, 2021

@hakman
I see kops 1.19 is released today. I tried using it. I see the issue is still there ... Please note that I am using Kubernetes 1.16.9 version and tried the image version - kope.io/k8s-1.16-debian-stretch-amd64-hvm-ebs-2020-07-20

hakman pushed a commit to hakman/kops that referenced this issue Jan 30, 2021
By creating a tempfile and then moving the file into place, we both
write more atomically and we can overwrite in-use files.

Issue kubernetes#10122
@hakman
Copy link
Member Author

hakman commented Jan 30, 2021

Thanks @atam003, #10691 should fix this in 1.19 also.

@atam003
Copy link

atam003 commented Jan 30, 2021

@hakman I still see the same issue ...

Jan 30 19:43:11 ip-172-20-37-61 nodeup[846]: I0130 19:43:11.909736 846 changes.go:81] Field changed "Mode" actual="0777" expected="0755"
Jan 30 19:43:11 ip-172-20-37-61 nodeup[846]: I0130 19:43:11.909751 846 changes.go:81] Field changed "Type" actual="symlink" expected="file"
Jan 30 19:43:11 ip-172-20-37-61 nodeup[846]: I0130 19:43:11.909821 846 files.go:50] Writing file "/usr/bin/dockerd"
Jan 30 19:43:11 ip-172-20-37-61 nodeup[846]: I0130 19:43:11.953492 846 changes.go:81] Field changed "Contents" actual="\u007fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00>\x00\x01\x00\x00\x00\xf0\xc7\xe4\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x00U\xec\x02\x00\x00\x00\x00\x00\x00\x00\x00@\x008\x00\n\x00@\x00\x1f\x00\x1e\x00\x06\x00\x00\x00\x05\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x000\x02\x00\x00\x00\x00\x00\x000\x02\x00\x00\x00\x00\x00\x00\b\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x00p\x02\x00\x00\x00\x00\x00\x00p\x02\x00\x00\x00\x00\x00\x00p\x02\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc/\xe0\x01\x00\x00\x00\x00\xbc/\xe0\x01\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\xa8;\xe0\x01\x00\x00\x00\x00\xa8;\x00\x02\x00\x00\x00\x00... (truncated)" expected="\u007fELF\x02\x01\x01\x03\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00>\x00\x01\x00\x00\x00\x10\n@\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x18\x11\xeb\x01\x00\x00\x00\x00\x00\x00\x00\x00@\x008\x00\x06\x00@\x00"\x00!\x00\x01\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x12\xf6\x00\x00\x00\x00\x00\x00\x12\xf6\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\xe8\x18\xf6\x00\x00\x00\x00\x00\xe8\x18V\x01\x00\x00\x00\x00\xe8\x18V\x01\x00\x00\x00\x00y\xf6\xf4\x00\x00\x00\x00\x00\x80\xd0\xf7\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x90\x01\x00\x00\x00\x00\x00\x00\x90\x01@\x00\x00\x00\x00\x00\x90\x01@\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\a\x00\x00\x00\x04\x00\x00\x00\xe8\x18\xf6\x00\x00\x00\x00\x00\xe8\x18V\x01\x00\x00\x00\x00... (truncated)"
Jan 30 19:43:11 ip-172-20-37-61 nodeup[846]: I0130 19:43:11.953661 846 files.go:50] Writing file "/usr/bin/containerd"
Jan 30 19:43:11 ip-172-20-37-61 nodeup[846]: W0130 19:43:11.954079 846 executor.go:139] error running task "File//usr/bin/dockerd" (7m4s remaining to succeed): error copying file "/usr/bin/dockerd": error opening destination file "/usr/bin/dockerd": open /usr/bin/dockerd: text file busy
Jan 30 19:43:11 ip-172-20-37-61 nodeup[846]: W0130 19:43:11.954111 846 executor.go:139] error running task "File//usr/bin/containerd" (7m4s remaining to succeed): error copying file "/usr/bin/containerd": error opening destination file "/usr/bin/containerd": open /usr/bin/containerd: text file busy
Jan 30 19:43:11 ip-172-20-37-61 nodeup[846]: I0130 19:43:11.954121 846 executor.go:155] No progress made, sleeping before retrying 2 task(s)

@atam003
Copy link

atam003 commented Jan 30, 2021

@hakman Looks changes are not picked. Particular libs (Nodeup) are picked from repositories.
I am building my kops using the following doc.
https://kops.sigs.k8s.io/contributing/building/

Can you please help with that?

@atam003
Copy link

atam003 commented Feb 3, 2021

@hakman @justinsb Any update on it. Looks like Nodeup has to be updated in repository with these changes?

justinsb added a commit to justinsb/kops that referenced this issue Feb 6, 2021
To pick up the sudo fixes, also addresses some problems with docker
preinstallation.

Issue kubernetes#10122
@olemarkus olemarkus modified the milestones: v1.19, v1.22 Apr 8, 2021
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 7, 2021
@k8s-triage-robot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 6, 2021
@johngmyers johngmyers removed this from the v1.22 milestone Aug 28, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

10 participants