diff --git a/Makefile b/Makefile index 4629bbbebb5c12bcab5e0611694a1a7b64fb6750..e0cacd0ea0dee3dbe65d688ddd8421148573e874 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved. -# iSulad-lxcfs-toolkit is licensed under the Mulan PSL v1. +# lxcfs-tools is licensed under the Mulan PSL v1. # You can use this software according to the terms and conditions of the Mulan PSL v1. # You may obtain a copy of Mulan PSL v1 at: # http://license.coscl.org.cn/MulanPSL @@ -29,8 +29,8 @@ all: toolkit lxcfs-hook local: toolkit lxcfs-hook toolkit: $(SOURCES) | $(DEPS_LINK) - @echo "Making isulad-lxcfs-tools..." - ${ENV} go build -mod=vendor -tags ${TAGS} -ldflags ${GO_LDFLAGS} -o build/isulad-lxcfs-toolkit . + @echo "Making lxcfs-tools..." + ${ENV} go build -mod=vendor -tags ${TAGS} -ldflags ${GO_LDFLAGS} -o build/lxcfs-tools . @echo "Done!" lxcfs-hook: $(SOURCES) | $(DEPS_LINK) diff --git a/go.mod b/go.mod index 2dbdc468c2564c5b836fd472c1da185d1adee69f..7eda40082e81a4cd49a9fe814782e519b36739ca 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module isulad-lxcfs-toolkit +module lxcfs-tools replace ( github.com/docker/docker => github.com/docker/engine v0.0.0-20181106193140-f5749085e9cb diff --git a/hack/install.sh b/hack/install.sh index 385369a676869431be9678b2beaf5f297b495cfc..1ec1dfb6b064bccadfb4d14327948f446eee3635 100644 --- a/hack/install.sh +++ b/hack/install.sh @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved. -# iSulad-lxcfs-toolkit is licensed under the Mulan PSL v1. +# lxcfs-tools is licensed under the Mulan PSL v1. # You can use this software according to the terms and conditions of the Mulan PSL v1. # You may obtain a copy of Mulan PSL v1 at: # http://license.coscl.org.cn/MulanPSL @@ -14,10 +14,10 @@ #!/bin/bash -ISULAD_LXCFS_TOOLKIT_DIR=/usr/local/bin +LXCFS_TOOLS_DIR=/usr/local/bin -echo "isulad_lxcfs_toolkit will be installed to $ISULAD_LXCFS_TOOLKIT_DIR" +echo "lxcfs-tools will be installed to $LXCFS_TOOLS_DIR" -install -m 0755 -p ../build/isulad_lxcfs_toolkit ${ISULAD_LXCFS_TOOLKIT_DIR} +install -m 0755 -p ../build/lxcfs-tools ${LXCFS_TOOLS_DIR} -echo "isulad_lxcfs_toolkit install done" +echo "lxcfs-tools install done" diff --git a/hack/isulad-lxcfs-toolkit.spec b/hack/lxcfs-tools.spec similarity index 79% rename from hack/isulad-lxcfs-toolkit.spec rename to hack/lxcfs-tools.spec index 8d48ea631ed1ed28121568f08d13fb68989c7b93..f4292c28ca97285026e8230c2ba33d0017d7717f 100644 --- a/hack/isulad-lxcfs-toolkit.spec +++ b/hack/lxcfs-tools.spec @@ -2,12 +2,12 @@ %define debug_package %{nil} #Basic Information -Name: isulad-lxcfs-toolkit +Name: lxcfs-tools Version: 0.3 -Release: 15 +Release: 16 Summary: toolkit for lxcfs to remount a running isulad License: Mulan PSL v1 -URL: https://gitee.com/src-openeuler/iSulad-lxcfs-toolkit +URL: https://gitee.com/src-openeuler/lxcfs-tools Source0: %{name}.tar.gz BuildRoot: %{_tmppath}/%{name}-root @@ -26,23 +26,23 @@ export RPM_BUILD_SOURCE=%_topdir/SOURCES cd $RPM_BUILD_DIR -mkdir -p $RPM_BUILD_DIR/src/isula.org/isulad-lxcfs-toolkit && cd $RPM_BUILD_DIR/src/isula.org/isulad-lxcfs-toolkit +mkdir -p $RPM_BUILD_DIR/src/isula.org/lxcfs-tools && cd $RPM_BUILD_DIR/src/isula.org/lxcfs-tools gzip -dc $RPM_BUILD_SOURCE/%{name}.tar.gz | tar -xvvf - %build -cd $RPM_BUILD_DIR/src/isula.org/isulad-lxcfs-toolkit +cd $RPM_BUILD_DIR/src/isula.org/lxcfs-tools make %install HOOK_DIR=$RPM_BUILD_ROOT/var/lib/isulad/hooks -ISULAD_LXCFS_TOOLKIT_DIR=$RPM_BUILD_ROOT/usr/local/bin +LXCFS_TOOLS_DIR=$RPM_BUILD_ROOT/usr/local/bin -cd $RPM_BUILD_DIR/src/isula.org/isulad-lxcfs-toolkit +cd $RPM_BUILD_DIR/src/isula.org/lxcfs-tools mkdir -p -m 0700 ${HOOK_DIR} -mkdir -p -m 0700 ${ISULAD_LXCFS_TOOLKIT_DIR} +mkdir -p -m 0700 ${LXCFS_TOOLS_DIR} install -m 0750 build/lxcfs-hook ${HOOK_DIR} -install -m 0750 build/isulad-lxcfs-toolkit ${ISULAD_LXCFS_TOOLKIT_DIR} +install -m 0750 build/lxcfs-tools ${LXCFS_TOOLS_DIR} #Install and uninstall scripts %pre @@ -89,7 +89,7 @@ chmod 0640 ${HOOK_SPEC}/hookspec.json #Files list %files %defattr(0550,root,root,0550) -/usr/local/bin/isulad-lxcfs-toolkit +/usr/local/bin/lxcfs-tools %attr(0550,root,root) /var/lib/isulad/hooks %attr(0550,root,root) /var/lib/isulad/hooks/lxcfs-hook @@ -99,5 +99,8 @@ rm -rfv %{buildroot} %changelog +* Tue Jan 7 2020 Zhangsong - 0.3.16 +- update package + * Thu Feb 1 2018 Tanzhe - add require version diff --git a/hooks/lxcfs-hook/example/hookspec.json b/hooks/lxcfs-hook/example/hookspec.json index d3038e3ea7c8762ad7278fd97ca1e5803329c319..898e1be3cbb41a784883145edb8810113a20c4a2 100644 --- a/hooks/lxcfs-hook/example/hookspec.json +++ b/hooks/lxcfs-hook/example/hookspec.json @@ -1,11 +1,11 @@ -{ - "prestart": [ - { - "path": "/var/lib/isulad/hooks/lxcfs-hook", - "args": ["lxcfs-hook", "--log", "/var/log/lxcfs-hook.log"], - "env": [] - } - ], - "poststart":[], - "poststop":[] -} +{ + "prestart": [ + { + "path": "/var/lib/isulad/hooks/lxcfs-hook", + "args": ["lxcfs-hook", "--log", "/var/log/lxcfs-hook.log"], + "env": [] + } + ], + "poststart":[], + "poststop":[] +} diff --git a/hooks/lxcfs-hook/execmount.go b/hooks/lxcfs-hook/execmount.go index 76194f75fd1c9e13b9bdca24f33696fc7f6a2a73..73149f7f80ac44fc3d09324c61089ec2299f4e78 100644 --- a/hooks/lxcfs-hook/execmount.go +++ b/hooks/lxcfs-hook/execmount.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved. -// iSulad-lxcfs-toolkit is licensed under the Mulan PSL v1. +// lxcfs-tools is licensed under the Mulan PSL v1. // You can use this software according to the terms and conditions of the Mulan PSL v1. // You may obtain a copy of Mulan PSL v1 at: // http://license.coscl.org.cn/MulanPSL @@ -17,17 +17,17 @@ package main import ( "fmt" "io/ioutil" - "isulad-lxcfs-toolkit/libmount" + "lxcfs-tools/libmount" "os" "strconv" - isulad_lxcfs_log "github.com/sirupsen/logrus" + lxcfs_log "github.com/sirupsen/logrus" ) func prestartMountHook(pid int, rootfs string) error { lxcfssubpath, err := ioutil.ReadDir("/var/lib/lxc/lxcfs/proc") if err != nil { - isulad_lxcfs_log.Errorf("Prase lxcfs dir failed: %v", err) + lxcfs_log.Errorf("Prase lxcfs dir failed: %v", err) return err } @@ -51,7 +51,7 @@ func prestartMountHook(pid int, rootfs string) error { } if err := libmount.NsExecMount(strconv.Itoa(pid), rootfs, valueMountPaths, valuePaths); err != nil { - isulad_lxcfs_log.Errorf("mount %v into container error: %v", valueMountPaths, err) + lxcfs_log.Errorf("mount %v into container error: %v", valueMountPaths, err) return err } return nil diff --git a/hooks/lxcfs-hook/main.go b/hooks/lxcfs-hook/main.go index f4225c95199709c5eb8cf183b3c0233fe044a94a..f23a4458a7575033d756d59ff44a035d637126ad 100644 --- a/hooks/lxcfs-hook/main.go +++ b/hooks/lxcfs-hook/main.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved. -// iSulad-lxcfs-toolkit is licensed under the Mulan PSL v1. +// lxcfs-tools is licensed under the Mulan PSL v1. // You can use this software according to the terms and conditions of the Mulan PSL v1. // You may obtain a copy of Mulan PSL v1 at: // http://license.coscl.org.cn/MulanPSL @@ -17,7 +17,7 @@ package main import ( "flag" "fmt" - "isulad-lxcfs-toolkit/hooks/lxcfs-hook/utils" + "lxcfs-tools/hooks/lxcfs-hook/utils" "os" "github.com/docker/docker/pkg/reexec" diff --git a/hooks/lxcfs-hook/utils/utils.go b/hooks/lxcfs-hook/utils/utils.go index db741ab126481074f9d60cd661e056acd8999198..cee4523bf5e22a2f2e54d0c282b04313472a6f55 100644 --- a/hooks/lxcfs-hook/utils/utils.go +++ b/hooks/lxcfs-hook/utils/utils.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved. -// iSulad-lxcfs-toolkit is licensed under the Mulan PSL v1. +// lxcfs-tools is licensed under the Mulan PSL v1. // You can use this software according to the terms and conditions of the Mulan PSL v1. // You may obtain a copy of Mulan PSL v1 at: // http://license.coscl.org.cn/MulanPSL diff --git a/libmount/container_work.go b/libmount/container_work.go index bcdef6f4e0c799324b0b1d98e92abb845a3fb7de..f10a547b25e07d86baa22bba6dd118e7b340bda6 100644 --- a/libmount/container_work.go +++ b/libmount/container_work.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved. -// iSulad-lxcfs-toolkit is licensed under the Mulan PSL v1. +// lxcfs-tools is licensed under the Mulan PSL v1. // You can use this software according to the terms and conditions of the Mulan PSL v1. // You may obtain a copy of Mulan PSL v1 at: // http://license.coscl.org.cn/MulanPSL @@ -16,7 +16,7 @@ package libmount import ( "encoding/json" "fmt" - "isulad-lxcfs-toolkit/libmount/nsexec" + "lxcfs-tools/libmount/nsexec" "os" "strconv" "strings" diff --git a/libmount/libmount.go b/libmount/libmount.go index edf6f4c6015b2ec5228156e159c702f1473a7d0b..3cbde7796411067f1bd005aa03aafb6b1ed65ba0 100644 --- a/libmount/libmount.go +++ b/libmount/libmount.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved. -// iSulad-lxcfs-toolkit is licensed under the Mulan PSL v1. +// lxcfs-tools is licensed under the Mulan PSL v1. // You can use this software according to the terms and conditions of the Mulan PSL v1. // You may obtain a copy of Mulan PSL v1 at: // http://license.coscl.org.cn/MulanPSL @@ -14,7 +14,7 @@ package libmount import ( - "isulad-lxcfs-toolkit/libmount/nsexec" + "lxcfs-tools/libmount/nsexec" ) // NsExecMount exec mount in container namespace diff --git a/libmount/nsexec/driver.go b/libmount/nsexec/driver.go index f390bb5d016420ac7d7f997476a8a54c5572552a..787df850c5855f73ce66c314a8f23104d824179d 100644 --- a/libmount/nsexec/driver.go +++ b/libmount/nsexec/driver.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved. -// iSulad-lxcfs-toolkit is licensed under the Mulan PSL v1. +// lxcfs-tools is licensed under the Mulan PSL v1. // You can use this software according to the terms and conditions of the Mulan PSL v1. // You may obtain a copy of Mulan PSL v1 at: // http://license.coscl.org.cn/MulanPSL diff --git a/libmount/nsexec/nsexec.go b/libmount/nsexec/nsexec.go index 683e2e22976a1c613d66300765924e63eb6f8719..0d4b7783b3852e7eb6828c5a088e5e6035e76d56 100644 --- a/libmount/nsexec/nsexec.go +++ b/libmount/nsexec/nsexec.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved. -// iSulad-lxcfs-toolkit is licensed under the Mulan PSL v1. +// lxcfs-tools is licensed under the Mulan PSL v1. // You can use this software according to the terms and conditions of the Mulan PSL v1. // You may obtain a copy of Mulan PSL v1 at: // http://license.coscl.org.cn/MulanPSL diff --git a/main.go b/main.go index eb3d642d5cc3a3a37d10f7f722141440d0c0fbd2..ec26c70f8babe55e716c744ece59f2e096a047d2 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved. -// iSulad-lxcfs-toolkit is licensed under the Mulan PSL v1. +// lxcfs-tools is licensed under the Mulan PSL v1. // You can use this software according to the terms and conditions of the Mulan PSL v1. // You may obtain a copy of Mulan PSL v1 at: // http://license.coscl.org.cn/MulanPSL @@ -21,19 +21,19 @@ import ( "github.com/docker/docker/pkg/reexec" _ "github.com/opencontainers/runc/libcontainer/nsenter" - isulad_lxcfs_log "github.com/sirupsen/logrus" + lxcfs_log "github.com/sirupsen/logrus" "github.com/urfave/cli" ) const ( usage = `Toolkit for reconnet to a running isulad using lxcfs` - syslogTag = "isulad-lxcfs-tools" + syslogTag = "lxcfs-tools" ) var version = "0.1" func onfail(err error) { - isulad_lxcfs_log.Error(err) + lxcfs_log.Error(err) fmt.Fprint(os.Stderr, err) os.Exit(1) } @@ -44,7 +44,7 @@ func onfailf(t string, v ...interface{}) { func runToolkit() { app := cli.NewApp() - app.Name = "isulad-lxcfs-toolkit" + app.Name = "lxcfs-tools" app.Usage = usage v := []string{ diff --git a/remountcmd.go b/remountcmd.go index 3a6d8922e492a5bb8185149e3e887fe961ee3ec6..db1cab31816a80e5913e14963d24188f45dfa2c2 100644 --- a/remountcmd.go +++ b/remountcmd.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved. -// iSulad-lxcfs-toolkit is licensed under the Mulan PSL v1. +// lxcfs-tools is licensed under the Mulan PSL v1. // You can use this software according to the terms and conditions of the Mulan PSL v1. // You may obtain a copy of Mulan PSL v1 at: // http://license.coscl.org.cn/MulanPSL @@ -19,7 +19,7 @@ import ( "fmt" "io" "io/ioutil" - "isulad-lxcfs-toolkit/libmount" + "lxcfs-tools/libmount" "os" "os/exec" "strings" @@ -27,7 +27,7 @@ import ( "syscall" "time" - isulad_lxcfs_log "github.com/sirupsen/logrus" + lxcfs_log "github.com/sirupsen/logrus" "github.com/urfave/cli" ) @@ -66,7 +66,7 @@ var recmountContainer = cli.Command{ onfail(fmt.Errorf("read init user namespace fail: %v", err)) } if context.Bool("all") { - isulad_lxcfs_log.Info("remount to all containers") + lxcfs_log.Info("remount to all containers") if err := remountAll(initMountns, initUserns); err != nil { onfail(err) } @@ -101,7 +101,7 @@ var checklxcfs = cli.Command{ if err := waitForLxcfs(); err != nil { onfail(err) } else { - isulad_lxcfs_log.Info("lxcfs is running") + lxcfs_log.Info("lxcfs is running") } }, } @@ -119,20 +119,20 @@ var execprestart = cli.Command{ if err := doprestart(); err != nil { onfail(err) } else { - isulad_lxcfs_log.Info("prestart done") + lxcfs_log.Info("prestart done") } }, } func doprestart() error { - isulad_lxcfs_log.Info("do prestart") + lxcfs_log.Info("do prestart") if err := syscall.Unmount("/var/lib/lxc/lxcfs", syscall.MNT_DETACH); err == nil { - isulad_lxcfs_log.Warning("releaseMountpoint: umount /var/lib/lxc/lxcfs") + lxcfs_log.Warning("releaseMountpoint: umount /var/lib/lxc/lxcfs") } if err := syscall.Unmount("/var/lib/lxc", syscall.MNT_DETACH); err == nil { - isulad_lxcfs_log.Warning("releaseMountpoint: umount /var/lib/lxc") + lxcfs_log.Warning("releaseMountpoint: umount /var/lib/lxc") } prestartparm1 := []string{ @@ -170,7 +170,7 @@ func waitForLxcfs() error { if count == maxCount { err := fmt.Errorf("lxcfs is not ready") - isulad_lxcfs_log.Errorf("%v", err) + lxcfs_log.Errorf("%v", err) return err } @@ -178,7 +178,7 @@ func waitForLxcfs() error { } func remountAll(initMountns, initUserns string) error { - isulad_lxcfs_log.Info("begin remount All runing container...") + lxcfs_log.Info("begin remount All runing container...") out, err := execCommond("isula", []string{"ps", "--format", "{{.ID}} {{.Pid}}"}) if err != nil { return err @@ -196,19 +196,19 @@ func remountAll(initMountns, initUserns string) error { res := make(chan struct{}, 1) go func() { if err := remountToContainer(initMountns, initUserns, containerslice[0], containerslice[1], true); err != nil { - isulad_lxcfs_log.Errorf("remount lxcfs dir to container(%s) failed: %v", containerslice[0], err) + lxcfs_log.Errorf("remount lxcfs dir to container(%s) failed: %v", containerslice[0], err) } res <- struct{}{} }() select { case <-res: case <-time.After(30 * time.Second): // 30s timeout - isulad_lxcfs_log.Errorf("remount lxcfs dir to container(%s) timeout", containerslice[0]) + lxcfs_log.Errorf("remount lxcfs dir to container(%s) timeout", containerslice[0]) } }() } wg.Wait() - isulad_lxcfs_log.Info(" remount All done...") + lxcfs_log.Info(" remount All done...") return nil } @@ -221,7 +221,7 @@ func remountToContainer(initMountns, initUserns, containerid string, pid string, } } - isulad_lxcfs_log.Infof("begin remount container,container id: %s, pid: %s", containerid, pid) + lxcfs_log.Infof("begin remount container,container id: %s, pid: %s", containerid, pid) lxcfssubpath, err := ioutil.ReadDir("/var/lib/lxc/lxcfs/proc") if err != nil { @@ -244,18 +244,18 @@ func remountToContainer(initMountns, initUserns, containerid string, pid string, } if err := libmount.NsExecUmount(pid, valuePaths); err != nil { - isulad_lxcfs_log.Errorf("unmount %v for container error: %v", valuePaths, err) + lxcfs_log.Errorf("unmount %v for container error: %v", valuePaths, err) } if err := libmount.NsExecMount(pid, "", valueMountPaths, valuePaths); err != nil { - isulad_lxcfs_log.Errorf("mount %v into container %s error: %v", valueMountPaths, containerid, err) + lxcfs_log.Errorf("mount %v into container %s error: %v", valueMountPaths, containerid, err) return err } return nil } func isContainerExsit(containerid string) (string, error) { - isulad_lxcfs_log.Info("begin isContainerExsit...") + lxcfs_log.Info("begin isContainerExsit...") if containerid == "" { return "", fmt.Errorf("Containerid mustn't be empty") } @@ -283,7 +283,7 @@ func execCommond(command string, params []string) ([]string, error) { res := []string{ " ", } - isulad_lxcfs_log.Info("exec cmd :", cmd.Args) + lxcfs_log.Info("exec cmd :", cmd.Args) stdout, err := cmd.StdoutPipe() diff --git a/umountcmd.go b/umountcmd.go index 2c49d4c5e3d8919b51daa1276722e4f9bd28b710..8fd08eaa6a1338c9957e0acb9ff134cdc3dca5ef 100644 --- a/umountcmd.go +++ b/umountcmd.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved. -// iSulad-lxcfs-toolkit is licensed under the Mulan PSL v1. +// lxcfs-tools is licensed under the Mulan PSL v1. // You can use this software according to the terms and conditions of the Mulan PSL v1. // You may obtain a copy of Mulan PSL v1 at: // http://license.coscl.org.cn/MulanPSL @@ -17,13 +17,13 @@ package main import ( "fmt" "io/ioutil" - "isulad-lxcfs-toolkit/libmount" + "lxcfs-tools/libmount" "os" "strings" "sync" "time" - isulad_lxcfs_log "github.com/sirupsen/logrus" + lxcfs_log "github.com/sirupsen/logrus" "github.com/urfave/cli" ) @@ -62,7 +62,7 @@ var umountContainer = cli.Command{ onfail(fmt.Errorf("read init user namespace fail: %v", err)) } if context.Bool("all") { - isulad_lxcfs_log.Info("umount for all containers") + lxcfs_log.Info("umount for all containers") if err := umountAll(initMountns, initUserns); err != nil { onfail(err) } @@ -84,7 +84,7 @@ var umountContainer = cli.Command{ } func umountAll(initMountns, initUserns string) error { - isulad_lxcfs_log.Info("begin umount All runing container...") + lxcfs_log.Info("begin umount All runing container...") out, err := execCommond("isula", []string{"ps", "--format", "{{.ID}} {{.Pid}}"}) if err != nil { return err @@ -102,20 +102,20 @@ func umountAll(initMountns, initUserns string) error { res := make(chan struct{}, 1) go func() { if err := umountForContainer(initMountns, initUserns, containerslice[0], containerslice[1], true); err != nil { - isulad_lxcfs_log.Errorf("umount lxcfs dir from container(%s) failed: %v", containerslice[0], err) + lxcfs_log.Errorf("umount lxcfs dir from container(%s) failed: %v", containerslice[0], err) } res <- struct{}{} }() select { case <-res: case <-time.After(30 * time.Second): // 30s timeout - isulad_lxcfs_log.Errorf("umount lxcfs dir from container(%s) timeout", containerslice[0]) + lxcfs_log.Errorf("umount lxcfs dir from container(%s) timeout", containerslice[0]) } }() } wg.Wait() - isulad_lxcfs_log.Info(" umount All done...") + lxcfs_log.Info(" umount All done...") return nil } @@ -128,7 +128,7 @@ func umountForContainer(initMountns, initUserns, containerid string, pid string, } } - isulad_lxcfs_log.Infof("begin umount container,container id: %s, pid: %s", containerid, pid) + lxcfs_log.Infof("begin umount container,container id: %s, pid: %s", containerid, pid) lxcfssubpath, err := ioutil.ReadDir("/var/lib/lxc/lxcfs/proc") if err != nil { @@ -149,7 +149,7 @@ func umountForContainer(initMountns, initUserns, containerid string, pid string, } if err := libmount.NsExecUmount(pid, valuePaths); err != nil { - isulad_lxcfs_log.Errorf("unmount %v for container %s error: %v", valuePaths, containerid, err) + lxcfs_log.Errorf("unmount %v for container %s error: %v", valuePaths, containerid, err) return err } return nil