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

Upgrade Toolbox fedora version #5239

Closed
afbjorklund opened this issue Sep 1, 2019 · 3 comments · Fixed by #5664
Closed

Upgrade Toolbox fedora version #5239

afbjorklund opened this issue Sep 1, 2019 · 3 comments · Fixed by #5664
Assignees
Labels
area/guest-vm General configuration issues with the minikube guest VM kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Milestone

Comments

@afbjorklund
Copy link
Collaborator

afbjorklund commented Sep 1, 2019

Currently we are using fedora:29, should upgrade to fedora:30 (or even fedora:latest)

TOOLBOX_DOCKER_IMAGE=fedora
TOOLBOX_DOCKER_TAG=29

We could also merge rkt/podman/systemd-nspawn with upstream, or at least get the bug fixes:

https://github.com/coreos/toolbox
https://coreos.com/os/docs/latest/install-debugging-tools.html


Can do this with #5237
Similar issue to #3058

I think we will keep with Fedora 30 and using systemd-nspawn, rather than latest and podman
https://en.wikipedia.org/wiki/Fedora_version_history (this has the same life-span as the other LTS)

@afbjorklund afbjorklund added kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. area/guest-vm General configuration issues with the minikube guest VM labels Sep 1, 2019
@afbjorklund afbjorklund added this to the v1.5.0-candidate milestone Sep 1, 2019
@afbjorklund afbjorklund removed the kind/feature Categorizes issue or PR as related to a new feature. label Sep 1, 2019
@afbjorklund
Copy link
Collaborator Author

We might also bring back docker support, for environments where podman is not available.

coreos/toolbox@35fe466

-	docker pull "${TOOLBOX_DOCKER_IMAGE}:${TOOLBOX_DOCKER_TAG}"
-	docker create --name=${machinename} "${TOOLBOX_DOCKER_IMAGE}:${TOOLBOX_DOCKER_TAG}" /bin/true
-	docker export ${machinename} | sudo tar -x -C "${machinepath}" -f -
-	docker rm ${machinename}
-	sudo touch ${osrelease}
+	riid=$(rkt --insecure-options=image fetch "docker://${TOOLBOX_DOCKER_IMAGE}:${TOOLBOX_DOCKER_TAG}")
+	sudo rkt image extract --overwrite --rootfs-only "${riid}" "${machinepath}"
+	rkt image rm "${riid}"
+	sudo touch "${osrelease}"

Could also consider contributing the podman support upstream, even if they have moved on.

@@ -50,17 +50,13 @@
 	sudo chown "${USER}:" "${machinepath}"
 
 	if [[ -n "${have_docker_image}" ]]; then
-		riid=$(sudo --preserve-env rkt --insecure-options=image fetch "docker://${TOOLBOX_DOCKER_IMAGE}:${TOOLBOX_DOCKER_TAG}")
-		sudo --preserve-env rkt image extract --overwrite --rootfs-only "${riid}" "${machinepath}"
-		sudo --preserve-env rkt image rm "${riid}"
+		piid=$(sudo --preserve-env podman pull "docker://${TOOLBOX_DOCKER_IMAGE}:${TOOLBOX_DOCKER_TAG}")
+		pcid=$(sudo --preserve-env podman create "${piid}")
+		mnt=$(sudo --preserve-env podman mount "${pcid}")
+		sudo --preserve-env rsync -ax "${mnt}"/ "${machinepath}"/
+		sudo --preserve-env podman unmount "${pcid}"
+		sudo --preserve-env podman rm "${pcid}"
+		sudo --preserve-env podman rmi "${piid}"
 	else
 		echo "Error: No toolbox filesystem specified." >&2
 		exit 1

It is a bit uncertain how many are using toolbox with minikube anyway ?

Something seems broken after the rootfs->tmpfs upgrade, will investigate...

@tstromberg
Copy link
Contributor

I'm open to the toolbox removal: I suspect it is rarely used, in part because it's spent such a long duration broken.

That said, I'll also accept PR's to upgrade it. If we are to keep this feature, it should get an integration test, even if it's just a simple assertion that one can run toolbox & install a yum package.

@afbjorklund
Copy link
Collaborator Author

Something seems broken after the rootfs->tmpfs upgrade, will investigate...

The error was after upgrading systemd (237 -> 240), not after upgrading filesystem.

Upgrading the toolbox worked fine, should just tidy up the scripts and create a PR.

$ toolbox
Spawning container docker-fedora-30 on /var/lib/toolbox/docker-fedora-30.
Press ^] three times within 1s to kill container.
[root@minikube ~]# more /etc/fedora-release 
Fedora release 30 (Thirty)
[root@minikube ~]# logout
Container docker-fedora-30 exited successfully.
$ 

Will look at the other systemd failure when doing the buildroot upgrade (#5237)

Something about systemd-nspawn and system bus, not the --share-system

@tstromberg tstromberg added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 18, 2019
@afbjorklund afbjorklund self-assigned this Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/guest-vm General configuration issues with the minikube guest VM kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants