File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -675,16 +675,17 @@ pub(crate) fn exec_in_host_mountns(args: &[std::ffi::OsString]) -> Result<()> {
675
675
let ( cmd, args) = args[ 1 ..]
676
676
. split_first ( )
677
677
. ok_or_else ( || anyhow:: anyhow!( "Missing command" ) ) ?;
678
+ tracing:: trace!( "{cmd:?} {args:?}" ) ;
678
679
let pid1mountns = std:: fs:: File :: open ( "/proc/1/ns/mnt" ) ?;
679
680
nix:: sched:: setns ( pid1mountns. as_fd ( ) , nix:: sched:: CloneFlags :: CLONE_NEWNS ) . context ( "setns" ) ?;
680
- rustix:: process:: chdir ( "/" ) ?;
681
+ rustix:: process:: chdir ( "/" ) . context ( "chdir" ) ?;
681
682
// Work around supermin doing chroot() and not pivot_root
682
683
// https://github.com/libguestfs/supermin/blob/5230e2c3cd07e82bd6431e871e239f7056bf25ad/init/init.c#L288
683
684
if !Utf8Path :: new ( "/usr" ) . try_exists ( ) ? && Utf8Path :: new ( "/root/usr" ) . try_exists ( ) ? {
684
685
tracing:: debug!( "Using supermin workaround" ) ;
685
- rustix:: process:: chroot ( "/root" ) ?;
686
+ rustix:: process:: chroot ( "/root" ) . context ( "chroot" ) ?;
686
687
}
687
- Err ( Command :: new ( cmd) . args ( args) . exec ( ) ) ?
688
+ Err ( Command :: new ( cmd) . args ( args) . exec ( ) ) . context ( "exec" ) ?
688
689
}
689
690
690
691
#[ context( "Querying skopeo version" ) ]
You can’t perform that action at this time.
0 commit comments