mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(glance): donot umount s3fs on glance exit (#22037)
This commit is contained in:
@@ -176,9 +176,9 @@ func StartService() {
|
||||
if options.Options.EnableTorrentService {
|
||||
torrent.StopTorrents()
|
||||
}
|
||||
if options.Options.StorageDriver == api.IMAGE_STORAGE_DRIVER_S3 {
|
||||
procutils.NewCommand("umount", options.Options.S3MountPoint).Run()
|
||||
}
|
||||
//if options.Options.StorageDriver == api.IMAGE_STORAGE_DRIVER_S3 {
|
||||
// procutils.NewCommand("umount", options.Options.S3MountPoint).Run()
|
||||
//}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,10 @@
|
||||
package procutils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"yunion.io/x/executor/client"
|
||||
)
|
||||
@@ -37,9 +39,19 @@ func cmdSetEnv(cmd *exec.Cmd) {
|
||||
)
|
||||
}
|
||||
|
||||
var paths = []string{
|
||||
"/usr/bin",
|
||||
"/usr/sbin",
|
||||
"/usr/local/sbin",
|
||||
"/usr/local/bin",
|
||||
"/sbin",
|
||||
"/bin",
|
||||
"/opt/yunion/bin",
|
||||
}
|
||||
|
||||
func remoteCmdSetEnv(cmd *client.Cmd) {
|
||||
cmd.Env = append(
|
||||
os.Environ(),
|
||||
presetEnv...,
|
||||
)
|
||||
envs := []string{
|
||||
fmt.Sprintf("PATH=%s", strings.Join(paths, ":")),
|
||||
}
|
||||
cmd.Env = append(envs, presetEnv...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user