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

implement podman pod clone #14299

Merged
merged 1 commit into from
Jun 16, 2022
Merged

implement podman pod clone #14299

merged 1 commit into from
Jun 16, 2022

Conversation

cdoern
Copy link
Contributor

@cdoern cdoern commented May 19, 2022

implement podman pod clone, a command to create an exact copy of a pod while changing certain config elements

current supported (new) flags are:
--name, change the pod name
--destroy, remove the original pod
--start, run the new pod on creation
and all infra-container related flags from podman pod create (namespaces etc)

resolves #12843

Does this PR introduce a user-facing change?

Allow user to clone pods using the CLI. New options include --start --destroy and --name

Signed-off-by: cdoern [email protected]

@openshift-ci openshift-ci bot added do-not-merge/release-note-label-needed Enforce release-note requirement, even if just None release-note and removed do-not-merge/release-note-label-needed Enforce release-note requirement, even if just None labels May 19, 2022
@cdoern cdoern force-pushed the podClone branch 9 times, most recently from d0abb91 to 7d68e92 Compare May 24, 2022 20:45
@cdoern
Copy link
Contributor Author

cdoern commented Jun 9, 2022

@containers/podman-maintainers PTAL

@rhatdan
Copy link
Member

rhatdan commented Jun 9, 2022

LGTM
/approve
@mheon @vrothberg @TomSweeneyRedHat PTAL

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 9, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cdoern, 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 Jun 9, 2022
cmd/podman/common/completion.go Outdated Show resolved Hide resolved
cmd/podman/common/completion.go Outdated Show resolved Hide resolved
cmd/podman/common/create.go Outdated Show resolved Hide resolved
cmd/podman/pods/clone.go Outdated Show resolved Hide resolved
@cdoern
Copy link
Contributor Author

cdoern commented Jun 9, 2022

@edsantiago same failure here: https://github.com/containers/podman/pull/14299/checks?check_run_id=6815997255 as #14400 ... possible issue from #14543 ?

or maybe a registry issue

@edsantiago
Copy link
Member

@cdoern that's a different failure. I've filed #14552 for it.

implement podman pod clone, a command to create an exact copy of a pod while changing
certain config elements

current supported flags are:
--name change the pod name
--destroy remove the original pod
--start run the new pod on creation
and all infra-container related flags from podman pod create (namespaces etc)

resolves containers#12843

Signed-off-by: cdoern <[email protected]>
@cdoern
Copy link
Contributor Author

cdoern commented Jun 16, 2022

@Luap99 does this look good to go now?

@mheon
Copy link
Member

mheon commented Jun 16, 2022

Code LGTM

@rhatdan
Copy link
Member

rhatdan commented Jun 16, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 16, 2022
@openshift-ci openshift-ci bot merged commit 2af8851 into containers:main Jun 16, 2022
cdoern added a commit to cdoern/podman that referenced this pull request Jun 16, 2022
[NO NEW TESTS NEEDED] podman pod clone somehow snuck by the new linter code that went in while it was in flight
fix that here

Signed-off-by: cdoern <[email protected]>
openshift-ci bot added a commit that referenced this pull request Jun 16, 2022
edsantiago added a commit to edsantiago/libpod that referenced this pull request Sep 9, 2022
This one is a nightmare, because --volume has been edited
in four different files throughout the years (five if you
count podman-build, which I am not including in this PR).
Those edits have not always been done in sync.

The list of options was reordered 2022-06-28 by Giuseppe in containers#14734,
but only in podman-create and -run (not in podman-pod-*). No
explanation of why, but I'll assume he knew what he was doing,
and have accepted that for the reference copy.

There was also a big edit in containers#8519.

The "Propagation property...bind mounted" sentence first appeared
in pod-clone, in containers#14299 by cdoern, with no obvious source of where
it came from. I choose to include it in the reference copy.

The "**copy**" option seems to work in pod-create, so I'm including
it in the reference copy. Someone please yell loudly if this is
not the case.

The "disables SELinux separation for containers used in the build",
no idea, changed that to just "for the container/pod"

The "advanced users / overlay / upperdir / workdir" paragraph
makes zero sense to me, but hey, I assume it applies to all
the commands, so I put it in the reference copy.

Finally, there's still a mishmash of backticks, asterisks, underscores,
and even quotation marks. Someone is gonna have to perform major
cleanup on this one day, but at least it'll be in only one place.

Signed-off-by: Ed Santiago <[email protected]>
@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. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename pods
6 participants