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

Tolerate old machine images, but warn they should be recreated #13523

Merged

Conversation

n1hility
Copy link
Member

@n1hility n1hility commented Mar 15, 2022

Fixes #13510

Machine instances created on podman 3 will be incompatible with podman current podman remote.
Let them run in a reduced mode and warn there will be problems and should be recreated.

Output:

Starting machine "podman-machine-default"
ERRO[0000] machine "podman-machine-default" is incompatible with this release of podman and needs to be recreated, starting for recovery only 
INFO[0000] waiting for clients...                       
INFO[0000] new connection from  to /var/folders/w6/95wf1cp50bz9rdm74r_pdyw40000gs/T/podman/qemu_podman-machine-default.sock 
Waiting for VM ...

!!! ACTION REQUIRED: INCOMPATIBLE MACHINE !!!

This machine was created by an older podman release that is incompatible
with this release of podman. It has been started in a limited operational
mode to allow you to copy any necessary files before recreating it. This
can be accomplished with the following commands:

	# Login and copy desired files (Optional)
	# podman machine ssh tar cvPf - /path/to/files > backup.tar

	# Recreate machine (DESTRUCTIVE!) 
	podman machine stop
	podman machine rm -f
	podman machine init --now

	# Copy back files (Optional)
	# cat backup.tar | podman machine ssh tar xvPf - 

Machine "podman-machine-default" started successfully

[NO NEW TESTS NEEDED]

@n1hility
Copy link
Member Author

@baude not sure if you prefer this to outright fail on start.

@rhatdan
Copy link
Member

rhatdan commented Mar 16, 2022

I think this should fail. Won't podman blow up trying to communicate with the podman service within the VM? Or do you want to allow users to enter then VM via podman machine ssh, and update it?

@Luap99
Copy link
Member

Luap99 commented Mar 16, 2022

I think it would be good to allow it to start so users can ssh into it and save their data before nuking the machine.
If we fail to start this will be impossible and someone would need to manually mount the VM image just to save some files.

@n1hility
Copy link
Member Author

Ok how about I change this to have a louder warning on start to that effect? It will say that the machine is no longer compatible and is starting only to allow you to copy your data off.

@rhatdan
Copy link
Member

rhatdan commented Mar 17, 2022

SGTM

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
We should backport this to 4.0

Start in a reduced mode for recovery, warn, and provide instructions to recreate them

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
@n1hility
Copy link
Member Author

@rhatdan @Luap99 PTAL i can submit a backport once ok.

@rhatdan
Copy link
Member

rhatdan commented Mar 18, 2022

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 18, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 18, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: n1hility, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 18, 2022
@openshift-merge-robot openshift-merge-robot merged commit b0fefb3 into containers:main Mar 18, 2022
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Podman on MacOS: Couldn't restablish ssh tunnel on path (when a machine already exists)
4 participants