Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
b07be71b
"vscode:/vscode.git/clone" did not exist on "5034b14439e9dc3510764b581bd940cb7ebd7218"
Unverified
Commit
b07be71b
authored
Mar 06, 2026
by
Janelle Cai
Committed by
GitHub
Mar 06, 2026
Browse files
fix(chrek): pass checkpointPath to restore (#6941)
parent
d71c0c32
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
deploy/chrek/pkg/criu/restore.go
deploy/chrek/pkg/criu/restore.go
+2
-2
deploy/chrek/pkg/orchestrate/nsrestore.go
deploy/chrek/pkg/orchestrate/nsrestore.go
+1
-2
No files found.
deploy/chrek/pkg/criu/restore.go
View file @
b07be71b
...
...
@@ -83,7 +83,7 @@ func ExecuteRestore(
// BuildRestoreOpts assembles CriuOpts for a CRIU restore from the checkpoint manifest.
// ImagesDirFd and WorkDirFd are left unset — ExecuteRestore opens them at restore time.
func
BuildRestoreOpts
(
m
*
types
.
CheckpointManifest
,
cgroupRoot
string
,
log
logr
.
Logger
)
(
*
criurpc
.
CriuOpts
,
error
)
{
func
BuildRestoreOpts
(
m
*
types
.
CheckpointManifest
,
checkpointPath
string
,
cgroupRoot
string
,
log
logr
.
Logger
)
(
*
criurpc
.
CriuOpts
,
error
)
{
extMounts
,
err
:=
buildRestoreExtMounts
(
m
)
if
err
!=
nil
{
return
nil
,
err
...
...
@@ -112,7 +112,7 @@ func BuildRestoreOpts(m *types.CheckpointManifest, cgroupRoot string, log logr.L
}
}
criuConfPath
:=
filepath
.
Join
(
settings
.
WorkDir
,
".."
,
criuConfFilename
)
criuConfPath
:=
filepath
.
Join
(
checkpointPath
,
criuConfFilename
)
if
_
,
err
:=
os
.
Stat
(
criuConfPath
);
err
==
nil
{
criuOpts
.
ConfigFile
=
proto
.
String
(
criuConfPath
)
}
...
...
deploy/chrek/pkg/orchestrate/nsrestore.go
View file @
b07be71b
...
...
@@ -42,7 +42,7 @@ func RestoreInNamespace(ctx context.Context, opts RestoreOptions, log logr.Logge
"checkpoint_has_cuda"
,
!
m
.
CUDA
.
IsEmpty
(),
)
// Phase 1: Configure — build CRIU opts from manifest
criuOpts
,
err
:=
criu
.
BuildRestoreOpts
(
m
,
opts
.
CgroupRoot
,
log
)
criuOpts
,
err
:=
criu
.
BuildRestoreOpts
(
m
,
opts
.
CheckpointPath
,
opts
.
CgroupRoot
,
log
)
if
err
!=
nil
{
return
0
,
err
}
...
...
@@ -57,7 +57,6 @@ func RestoreInNamespace(ctx context.Context, opts RestoreOptions, log logr.Logge
return
restoredPID
,
nil
}
func
executeRestore
(
ctx
context
.
Context
,
criuOpts
*
criurpc
.
CriuOpts
,
m
*
types
.
CheckpointManifest
,
opts
RestoreOptions
,
log
logr
.
Logger
)
(
int
,
error
)
{
// Apply rootfs diff inside the namespace (target root is /)
if
err
:=
common
.
ApplyRootfsDiff
(
opts
.
CheckpointPath
,
"/"
,
log
);
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment