Include extended attributes in preload tarballs
parent
a3f4dc452d
commit
2d60f09ce8
|
@ -188,7 +188,7 @@ func createImageTarball(tarballFilename, containerRuntime string) error {
|
|||
dirs = append(dirs, "./lib/containers")
|
||||
}
|
||||
|
||||
args := []string{"exec", profile, "sudo", "tar", "-I", "lz4", "-C", "/var", "-cf", tarballFilename}
|
||||
args := []string{"exec", profile, "sudo", "tar", "--xattrs", "--xattrs-include", "security.capability", "-I", "lz4", "-C", "/var", "-cf", tarballFilename}
|
||||
args = append(args, dirs...)
|
||||
cmd := exec.Command("docker", args...)
|
||||
cmd.Stdout = os.Stdout
|
||||
|
|
|
@ -548,7 +548,7 @@ func (r *Containerd) Preload(cc config.ClusterConfig) error {
|
|||
|
||||
t = time.Now()
|
||||
// extract the tarball to /var in the VM
|
||||
if rr, err := r.Runner.RunCmd(exec.Command("sudo", "tar", "-I", "lz4", "-C", "/var", "-xf", dest)); err != nil {
|
||||
if rr, err := r.Runner.RunCmd(exec.Command("sudo", "tar", "--xattrs", "--xattrs-include", "security.capability", "-I", "lz4", "-C", "/var", "-xf", dest)); err != nil {
|
||||
return errors.Wrapf(err, "extracting tarball: %s", rr.Output())
|
||||
}
|
||||
klog.Infof("Took %f seconds to extract the tarball", time.Since(t).Seconds())
|
||||
|
|
|
@ -445,7 +445,7 @@ func (r *CRIO) Preload(cc config.ClusterConfig) error {
|
|||
|
||||
t = time.Now()
|
||||
// extract the tarball to /var in the VM
|
||||
if rr, err := r.Runner.RunCmd(exec.Command("sudo", "tar", "-I", "lz4", "-C", "/var", "-xf", dest)); err != nil {
|
||||
if rr, err := r.Runner.RunCmd(exec.Command("sudo", "tar", "--xattrs", "--xattrs-include", "security.capability", "-I", "lz4", "-C", "/var", "-xf", dest)); err != nil {
|
||||
return errors.Wrapf(err, "extracting tarball: %s", rr.Output())
|
||||
}
|
||||
klog.Infof("Took %f seconds to extract the tarball", time.Since(t).Seconds())
|
||||
|
|
|
@ -635,7 +635,7 @@ func (r *Docker) Preload(cc config.ClusterConfig) error {
|
|||
klog.Infof("Took %f seconds to copy over tarball", time.Since(t).Seconds())
|
||||
|
||||
// extract the tarball to /var in the VM
|
||||
if rr, err := r.Runner.RunCmd(exec.Command("sudo", "tar", "-I", "lz4", "-C", "/var", "-xf", dest)); err != nil {
|
||||
if rr, err := r.Runner.RunCmd(exec.Command("sudo", "tar", "--xattrs", "--xattrs-include", "security.capability", "-I", "lz4", "-C", "/var", "-xf", dest)); err != nil {
|
||||
return errors.Wrapf(err, "extracting tarball: %s", rr.Output())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue