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

fix restore API endpoint #15909

Merged
merged 1 commit into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkg/api/handlers/libpod/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ func Restore(w http.ResponseWriter, r *http.Request) {
PrintStats bool `schema:"printStats"`
FileLocks bool `schema:"fileLocks"`
PublishPorts string `schema:"publishPorts"`
Pod string `schema:"pod"`
}{
// override any golang type defaults
}
Expand All @@ -324,6 +325,7 @@ func Restore(w http.ResponseWriter, r *http.Request) {
PrintStats: query.PrintStats,
FileLocks: query.FileLocks,
PublishPorts: strings.Fields(query.PublishPorts),
Pod: query.Pod,
}

var names []string
Expand Down
4 changes: 4 additions & 0 deletions pkg/api/server/register_containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1516,6 +1516,10 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// name: printStats
// type: boolean
// description: add restore statistics to the returned RestoreReport
// - in: query
// name: pod
// type: string
// description: pod to restore into
// produces:
// - application/json
// responses:
Expand Down
4 changes: 0 additions & 4 deletions test/e2e/checkpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1170,10 +1170,6 @@ var _ = Describe("Podman checkpoint", func() {
share := share // copy into local scope, for use inside function

It(testName, func() {
if podmanTest.Host.Distribution == "ubuntu" && IsRemote() {
Skip("FIXME: #15018. Cannot restore --pod under cgroupsV1 and remote")
}

if !criu.CheckForCriu(criu.PodCriuVersion) {
Skip("CRIU is missing or too old.")
}
Expand Down