diff --git a/CHANGELOG b/CHANGELOG index 546954a..82c367b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -12,7 +12,7 @@ ### general * change Mtu range (MR: #80) -* remove 'add-path/remove-path' commands from isulad-tools (MR: #82) +* remove 'add-path/remove-path' commands from syscontainer-tools (MR: #82) * network: config net device 'tx/sg/tso' on (MR: #81) * fix some minor issue(security check, file mode...) (MR: #84) * fix when supply empty mac address, `add-nic` will panic (MR: #85) @@ -23,22 +23,22 @@ ### general -* reorginzed the isulad-tools code (MR: #75) -* use`isulad-tools` in `isulad-tools_wrapper` instead of `isula exec` (MR: #76) +* reorginzed the syscontainer-tools code (MR: #75) +* use`syscontainer-tools` in `syscontainer-tools_wrapper` instead of `isula exec` (MR: #76) * fix filelock can't lock accross the process issue (MR: #78) ### hooks -* combine 3 hooks binary to `isulad-hooks` (MR: #75) +* combine 3 hooks binary to `syscontainer-hooks` (MR: #75) ## v0.6 (2017-6-23) ### general -* isulad-tools add `add-route & del-nic & del-route` command line. (MR: #71, #68) -* isulad-tools add-nic supports network interface config. (MR: #68) -* isulad-tools supports fidsk in container. (MR: #70) -* isulad-tools could only remove the devices added by isulad-tools (MR: #66) +* syscontainer-tools add `add-route & del-nic & del-route` command line. (MR: #71, #68) +* syscontainer-tools add-nic supports network interface config. (MR: #68) +* syscontainer-tools supports fidsk in container. (MR: #70) +* syscontainer-tools could only remove the devices added by syscontainer-tools (MR: #66) ### network-hook @@ -51,11 +51,11 @@ * fix some dir permissions for potential security risk. (MR: #56, #57, #62) * move empty_systemd.sh to iSulad project. (MR: #60) -### isulad-tools +### syscontainer-tools -* fix isulad-tools subcommand display orders. (MR: #55) -* when iSulad daemon and isulad-tools are not in the same cgroup path, device-hook will fail to update cgroup permissions. (MR: #58) -* when containers specify cgroup folder (with `--cgroup-parent` flag), isulad-tools will fail to update device cgroup permissions. (MR: #64) +* fix syscontainer-tools subcommand display orders. (MR: #55) +* when iSulad daemon and syscontainer-tools are not in the same cgroup path, device-hook will fail to update cgroup permissions. (MR: #58) +* when containers specify cgroup folder (with `--cgroup-parent` flag), syscontainer-tools will fail to update device cgroup permissions. (MR: #64) ### oci-relabel-hook @@ -67,9 +67,9 @@ * fix some golang security problems based on review comments -### isulad-tools +### syscontainer-tools -* Fix find cgroup path issue when isulad-tools run in container +* Fix find cgroup path issue when syscontainer-tools run in container * Add upstart support for system container ## v0.3 (2017-1-9) @@ -84,9 +84,9 @@ * device-hook: Update cgroup permission in prestart hook not poststart * oci-relabel-hook: Use golang to refact oci-relabel-hook -### isulad-tools +### syscontainer-tools -* Add "--force" flag for `isulad-tools add-device` +* Add "--force" flag for `syscontainer-tools add-device` * can not use fdisk to partition when add a device to a container @@ -97,7 +97,7 @@ * device-hook: newly introduced device hook to save config for new added devices. * oci-relabel-hook: use container's SELinux policy to adapt various images. -### isulad-tools +### syscontainer-tools * use device-hook instead of "isula update" to keep resource persistent in container. * add syslog support, all log will be written to syslog. @@ -119,7 +119,7 @@ This is first initial release with lots of new features: * network-hook: move network interface from host to container when container starts. * oci-relabel-hook: relabel container's rootfs when container starts. -### isulad-tools +### syscontainer-tools New Commands: diff --git a/Makefile b/Makefile index e155dea..78334d4 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -# isulad-tools is licensed under the Mulan PSL v1. +# syscontainer-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 @@ -7,7 +7,7 @@ # IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR # PURPOSE. # See the Mulan PSL v1 for more details. -# Description: makefile for isulad-tools +# Description: makefile for syscontainer-tools # Author: zhangwei # Create: 2018-01-18 @@ -17,29 +17,29 @@ DEPS_LINK := $(CURDIR)/vendor/ TAGS="cgo static_build" VERSION := $(shell cat ./VERSION) -BEP_DIR=/tmp/isulad-tools-build-bep -BEP_FLAGS=-tmpdir=/tmp/isulad-tools-build-bep +BEP_DIR=/tmp/syscontainer-tools-build-bep +BEP_FLAGS=-tmpdir=/tmp/syscontainer-tools-build-bep GO_LDFLAGS="-s -w -buildid=IdByiSula -extldflags=-zrelro -extldflags=-znow $(BEP_FLAGS) -X main.gitCommit=${COMMIT} -X main.version=${VERSION}" ENV = GOPATH=${GOPATH} CGO_ENABLED=1 ## PLEASE be noticed that the vendor dir can only work with golang > 1.6 !! -all: dep isulad-tools isulad-hooks +all: dep syscontainer-tools syscontainer-hooks dep: mkdir -p $(BEP_DIR) init: sh -x apply-patch -isulad-tools: $(SOURCES) | $(DEPS_LINK) - @echo "Making isulad-tools..." - ${ENV} go build -mod=vendor -tags ${TAGS} -ldflags ${GO_LDFLAGS} -o build/isulad-tools . +syscontainer-tools: $(SOURCES) | $(DEPS_LINK) + @echo "Making syscontainer-tools..." + ${ENV} go build -mod=vendor -tags ${TAGS} -ldflags ${GO_LDFLAGS} -o build/syscontainer-tools . @echo "Done!" -isulad-hooks: $(SOURCES) | $(DEPS_LINK) - @echo "Making isulad-hooks..." - ${ENV} go build -mod=vendor -tags ${TAGS} -ldflags ${GO_LDFLAGS} -o build/isulad-hooks ./hooks/isulad-hooks +syscontainer-hooks: $(SOURCES) | $(DEPS_LINK) + @echo "Making syscontainer-hooks..." + ${ENV} go build -mod=vendor -tags ${TAGS} -ldflags ${GO_LDFLAGS} -o build/syscontainer-hooks ./hooks/syscontainer-hooks @echo "Done!" localtest: diff --git a/README.md b/README.md index 0524042..0bf8fd2 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,38 @@ -# isulad-tools +# syscontainer-tools ## Introduction -**isulad-tools** is a fully customized tool, +**syscontainer-tools** is a fully customized tool, it is a small auxiliary tool which is expected to work with isulad with hook support, and provides enhanced functions which is inappropriate to be included in isulad itself. -The project includes two main parts: `isulad-tools` and `hooks`. -`isulad-tools` is used for dynamically operating on running containers, +The project includes two main parts: `syscontainer-tools` and `hooks`. +`syscontainer-tools` is used for dynamically operating on running containers, and `hooks` is used for executing user defined program at some special timepoint of container's lifecycle. ## Hooks -We provide isulad hooks function. +We provide syscontainer hooks function. -* isulad-hooks: - 1. insert block devices added by isulad-tools into container when container restarts(prestart state). - 2. insert network interfaces and route rules added by isulad-tools into container when container restarts(prestart state). +* syscontainer-hooks: + 1. insert block devices added by syscontainer-tools into container when container restarts(prestart state). + 2. insert network interfaces and route rules added by syscontainer-tools into container when container restarts(prestart state). 3. remove udev rules and leaking network interfaces when container stops(post-stop state). 4. handling oci relabel for container in prestart and post stop state. You could use hook spec to customise your hooks. -For detailed information, See [introduction of isulad-hooks](hooks/isulad-hooks/README.md) +For detailed information, See [introduction of syscontainer-hooks](hooks/syscontainer-hooks/README.md) -## isulad-tools +## syscontainer-tools -Basic usage of `isulad-tools`: +Basic usage of `syscontainer-tools`: ``` NAME: - isulad-tools - Enhanced tools for IT isulad + syscontainer-tools - Enhanced tools for IT isulad USAGE: - isulad-tools [global options] command [command options] [arguments...] + syscontainer-tools [global options] command [command options] [arguments...] VERSION: v0.9 @@ -58,7 +58,7 @@ GLOBAL OPTIONS: --version, -v print the version ``` -For usage of each command, you can check with `--help`, e.g. `isulad-tools add-device --help` +For usage of each command, you can check with `--help`, e.g. `syscontainer-tools add-device --help` ## Contributions diff --git a/apply-patch b/apply-patch index a2c30ea..fdecd8a 100644 --- a/apply-patch +++ b/apply-patch @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -# isulad-tools is licensed under the Mulan PSL v1. +# syscontainer-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/config/config.go b/config/config.go index 742c18f..e29ebef 100644 --- a/config/config.go +++ b/config/config.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -23,14 +23,14 @@ import ( "strings" "sync" - "isula.org/isulad-tools/container" - "isula.org/isulad-tools/types" + "isula.org/syscontainer-tools/container" + "isula.org/syscontainer-tools/types" ) const ( defaultConfigFile = "device_hook.json" - // IsuladToolsDir is isulad-tools run dir - IsuladToolsDir = "/run/isulad-tools" + // IsuladToolsDir is syscontainer-tools run dir + IsuladToolsDir = "/run/syscontainer-tools" ) // QosType defines the qos type by int diff --git a/config/config_device.go b/config/config_device.go index 25c2b6d..09acda8 100644 --- a/config/config_device.go +++ b/config/config_device.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 ( "os" "strings" - "isula.org/isulad-tools/types" + "isula.org/syscontainer-tools/types" ) // HostMapping host path mapping to container path @@ -209,7 +209,7 @@ func (config *ContainerHookConfig) addBind(bind *types.Bind) (bool, error) { } func (config *ContainerHookConfig) removeBind(bind *types.Bind) (bool, error) { - // if in add array, remove it, will not restore to Rm array, as it is added by isulad-tools. + // if in add array, remove it, will not restore to Rm array, as it is added by syscontainer-tools. if index := config.bindIndexInArray(bind, config.Binds); index != -1 { config.dirty = true config.Binds = append(config.Binds[:index], config.Binds[index+1:]...) diff --git a/config/config_network.go b/config/config_network.go index 258964c..c7b1601 100644 --- a/config/config_network.go +++ b/config/config_network.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -15,12 +15,12 @@ package config import ( "fmt" - "isula.org/isulad-tools/types" + "isula.org/syscontainer-tools/types" "path/filepath" ) var ( - // IsuladToolsDirNetns is isulad-tools netns dir + // IsuladToolsDirNetns is syscontainer-tools netns dir IsuladToolsDirNetns = filepath.Join(IsuladToolsDir, "netns") ) @@ -95,7 +95,7 @@ func (config *ContainerHookConfig) UpdateNetworkInterface(nic *types.InterfaceCo return nil } -// IsRouteExist will check if the route is added by isulad-tools +// IsRouteExist will check if the route is added by syscontainer-tools func (config *ContainerHookConfig) IsRouteExist(route *types.Route) bool { for _, eRoute := range config.NetworkRoutes { if types.IsSameRoute(route, eRoute) { diff --git a/container/container.go b/container/container.go index 0760fd0..ff98899 100644 --- a/container/container.go +++ b/container/container.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -194,7 +194,7 @@ func getIsuladContainerSpec(id string) (spec *specs.Spec, err error) { if err != nil { return nil, err } - configPath := fmt.Sprintf("%s/engines/lcr/%s/ociconfig.json", graphDriverPath, id) + configPath := fmt.Sprintf("%s/engines/lcr/%s/config.json", graphDriverPath, id) config, err := os.Open(configPath) if err != nil { if os.IsNotExist(err) { diff --git a/device.go b/device.go index a5c7513..ab4e637 100644 --- a/device.go +++ b/device.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -20,10 +20,10 @@ import ( "fmt" "os" - hconfig "isula.org/isulad-tools/config" - "isula.org/isulad-tools/container" - "isula.org/isulad-tools/libdevice" - "isula.org/isulad-tools/types" + hconfig "isula.org/syscontainer-tools/config" + "isula.org/syscontainer-tools/container" + "isula.org/syscontainer-tools/libdevice" + "isula.org/syscontainer-tools/types" "github.com/sirupsen/logrus" "github.com/urfave/cli" diff --git a/go.mod b/go.mod index 699cf75..b1d0ec4 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module isula.org/isulad-tools +module isula.org/syscontainer-tools replace ( golang.org/x/crypto => github.com/golang/crypto v0.0.0-20190701094942-4def268fd1a4 diff --git a/hack/install.sh b/hack/install.sh index 913bc67..96a1390 100644 --- a/hack/install.sh +++ b/hack/install.sh @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -# isulad-tools is licensed under the Mulan PSL v1. +# syscontainer-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,10 +16,10 @@ HOOK_DIR=/var/lib/isulad/hooks ISULAD_TOOLS_DIR=/usr/local/bin ISULAD_TOOLS_WRAPPER="/lib/udev" -HOOK_SPEC="/etc/isulad-tools" +HOOK_SPEC="/etc/syscontainer-tools" echo "Hooks will be installed to $HOOK_DIR" -echo "isulad_tools will be installed to $ISULAD_TOOLS_DIR" +echo "syscontainer_tools will be installed to $ISULAD_TOOLS_DIR" mkdir -p -m 0700 ${HOOK_DIR} mkdir -p -m 0750 ${ISULAD_TOOLS_DIR} @@ -27,29 +27,29 @@ mkdir -p -m 0750 ${ISULAD_TOOLS_WRAPPER} mkdir -p -m 0750 ${HOOK_SPEC} install -m 0755 -p ../build/*-hooks ${HOOK_DIR} -install -m 0755 -p ../build/isulad-tools ${ISULAD_TOOLS_DIR} -install -m 0750 isulad-tools_wrapper ${ISULAD_TOOLS_WRAPPER}/isulad-tools_wrapper +install -m 0755 -p ../build/syscontainer-tools ${ISULAD_TOOLS_DIR} +install -m 0750 syscontainer-tools_wrapper ${ISULAD_TOOLS_WRAPPER}/syscontainer-tools_wrapper cat << EOF > ${HOOK_SPEC}/hookspec.json { "prestart": [ { - "path": "${HOOK_DIR}/isulad-hooks", - "args": ["isulad-hooks", "--state", "prestart"], + "path": "${HOOK_DIR}/syscontainer-hooks", + "args": ["syscontainer-hooks", "--state", "prestart"], "env": [] } ], "poststart":[ { - "path": "${HOOK_DIR}/isulad-hooks", - "args": ["isulad-hooks", "--state", "poststart"], + "path": "${HOOK_DIR}/syscontainer-hooks", + "args": ["syscontainer-hooks", "--state", "poststart"], "env": [] } ], "poststop":[ { - "path": "${HOOK_DIR}/isulad-hooks", - "args": ["isulad-hooks", "--state", "poststop"], + "path": "${HOOK_DIR}/syscontainer-hooks", + "args": ["syscontainer-hooks", "--state", "poststop"], "env": [] } ] diff --git a/hack/isulad-tools.spec b/hack/syscontainer-tools.spec similarity index 68% rename from hack/isulad-tools.spec rename to hack/syscontainer-tools.spec index f00e9ea..4845e40 100644 --- a/hack/isulad-tools.spec +++ b/hack/syscontainer-tools.spec @@ -2,12 +2,12 @@ %define debug_package %{nil} #Basic Information -Name: isulad-tools +Name: syscontainer-tools Version: v0.9 -Release: 34 -Summary: isulad tools for IT, work with iSulad +Release: 35 +Summary: syscontainer tools for IT, work with iSulad License: Mulan PSL v1 -URL: https://gitee.com/src-openeuler/iSulad-tools +URL: https://gitee.com/src-openeuler/syscontainer-tools Source0: %{name}-src.tar.gz BuildRoot: %{_tmppath}/%{name}-root @@ -18,11 +18,11 @@ Requires: iSulad Requires: util-linux %description -This is isulad tools, to make it work, you need a isulad and util-linux +This is syscontainer tools, to make it work, you need a isulad and util-linux #Build sections %prep -%setup -q -c -n src/isula.org/isulad-tools +%setup -q -c -n src/isula.org/syscontainer-tools %build make init && make @@ -36,9 +36,9 @@ mkdir -p -m 0700 ${HOOK_DIR} mkdir -p -m 0750 ${ISULAD_TOOLS_DIR} mkdir -p -m 0750 ${ISULAD_TOOLS_WRAPPER} -install -m 0750 build/isulad-hooks ${HOOK_DIR} -install -m 0750 build/isulad-tools ${ISULAD_TOOLS_DIR} -install -m 0750 hack/isulad-tools_wrapper ${ISULAD_TOOLS_WRAPPER}/isulad-tools_wrapper +install -m 0750 build/syscontainer-hooks ${HOOK_DIR} +install -m 0750 build/syscontainer-tools ${ISULAD_TOOLS_DIR} +install -m 0750 hack/syscontainer-tools_wrapper ${ISULAD_TOOLS_WRAPPER}/syscontainer-tools_wrapper #Install and uninstall scripts %pre @@ -53,15 +53,15 @@ fi if [[ "$GRAPH" != "/var/lib/isulad" ]]; then mkdir -p -m 0550 $GRAPH/hooks - install -m 0550 -p /var/lib/isulad/hooks/isulad-hooks $GRAPH/hooks + install -m 0550 -p /var/lib/isulad/hooks/syscontainer-hooks $GRAPH/hooks echo echo "=================== WARNING! ================================================" - echo " 'iSulad Root Dir' is $GRAPH, move /var/lib/isulad/hooks/isulad-hooks to $GRAPH/hooks" + echo " 'iSulad Root Dir' is $GRAPH, move /var/lib/isulad/hooks/syscontainer-hooks to $GRAPH/hooks" echo "=============================================================================" echo fi -HOOK_SPEC=/etc/isulad-tools +HOOK_SPEC=/etc/syscontainer-tools HOOK_DIR=${GRAPH}/hooks mkdir -p -m 0750 ${HOOK_SPEC} mkdir -p -m 0550 ${HOOK_DIR} @@ -69,22 +69,22 @@ cat << EOF > ${HOOK_SPEC}/hookspec.json { "prestart": [ { - "path": "${HOOK_DIR}/isulad-hooks", - "args": ["isulad-hooks", "--state", "prestart"], + "path": "${HOOK_DIR}/syscontainer-hooks", + "args": ["syscontainer-hooks", "--state", "prestart"], "env": [] } ], "poststart":[ { - "path": "${HOOK_DIR}/isulad-hooks", - "args": ["isulad-hooks", "--state", "poststart"], + "path": "${HOOK_DIR}/syscontainer-hooks", + "args": ["syscontainer-hooks", "--state", "poststart"], "env": [] } ], "poststop":[ { - "path": "${HOOK_DIR}/isulad-hooks", - "args": ["isulad-hooks", "--state", "poststop"], + "path": "${HOOK_DIR}/syscontainer-hooks", + "args": ["syscontainer-hooks", "--state", "poststop"], "env": [] } ] @@ -97,10 +97,10 @@ chmod 0640 ${HOOK_SPEC}/hookspec.json #Files list %files %defattr(0550,root,root,0550) -/usr/local/bin/isulad-tools +/usr/local/bin/syscontainer-tools %attr(0550,root,root) /var/lib/isulad/hooks -%attr(0550,root,root) /var/lib/isulad/hooks/isulad-hooks -%attr(0550,root,root) /lib/udev/isulad-tools_wrapper +%attr(0550,root,root) /var/lib/isulad/hooks/syscontainer-hooks +%attr(0550,root,root) /lib/udev/syscontainer-tools_wrapper #Clean section @@ -108,6 +108,12 @@ chmod 0640 ${HOOK_SPEC}/hookspec.json rm -rfv %{buildroot} %changelog +* Tue Jan 07 2020 Zhangsong - 0.9.35 +- Type:enhancement +- ID:NA +- SUG:restart +- DESC:update package + * Tue Dec 26 2019 Zhangsong - 0.9.34 - Type:enhancement - ID:NA @@ -124,7 +130,7 @@ rm -rfv %{buildroot} - Type:enhancement - ID:NA - SUG:restart -- DESC:rebuild patches for isulad-tools +- DESC:rebuild patches for syscontainer-tools * Fri Nov 02 2018 Zhangsong - 0.9.7-1 - Type:enhancement diff --git a/hack/isulad-tools_wrapper b/hack/syscontainer-tools_wrapper similarity index 78% rename from hack/isulad-tools_wrapper rename to hack/syscontainer-tools_wrapper index 2b88e6f..fa8626f 100644 --- a/hack/isulad-tools_wrapper +++ b/hack/syscontainer-tools_wrapper @@ -1,6 +1,6 @@ #!/bin/sh # Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -# isulad-tools is licensed under the Mulan PSL v1. +# syscontainer-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 @@ -8,12 +8,12 @@ # IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR # PURPOSE. # See the Mulan PSL v1 for more details. -# Description: isulad tools wrapper -# Author: zhangwei -# Create: 2018-01-18 +# Description: syscontainer tools wrapper +# Author: zhangsong234 +# Create: 2020-01-17 LOG_DIR=/var/log/hyperagent -LOG_FILE=${LOG_DIR}/isulad-tools.log +LOG_FILE=${LOG_DIR}/syscontainer-tools.log ## by default, isulad is installed in /usr/bin, ## but udevd do not have this path in PATH env @@ -25,10 +25,10 @@ run_cmd() { $@ } add_node() { - run_cmd isulad-tools --log $LOG_FILE add-device $id /dev/$o_dev:$devname + run_cmd syscontainer-tools --log $LOG_FILE add-device $id /dev/$o_dev:$devname } remove_node() { - run_cmd isulad-tools --log $LOG_FILE remove-device $id /dev/$o_dev:$devname + run_cmd syscontainer-tools --log $LOG_FILE remove-device $id /dev/$o_dev:$devname } diff --git a/hooks/isulad-hooks/example/hookspec.json b/hooks/isulad-hooks/example/hookspec.json deleted file mode 100644 index 158d11c..0000000 --- a/hooks/isulad-hooks/example/hookspec.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "prestart": [ - { - "path": "/var/lib/isulad/hooks/isulad-hooks", - "args": ["isulad-hooks", "--state", "prestart", "--log", "/var/log/device-hook.log"], - "env": [] - } - ], - "poststart":[ - { - "path": "/var/lib/isulad/hooks/isulad-hooks", - "args": ["isulad-hooks", "--state", "prestart", "--log", "/var/log/device-hook.log"], - "env": [] - } - ], - "poststop":[ - { - "path": "/var/lib/isulad/hooks/isulad-hooks", - "args": ["isulad-hooks", "--state", "poststop", "--log", "/var/log/device-hook.log"], - "env": [] - } - ] -} diff --git a/hooks/isulad-hooks/README.md b/hooks/syscontainer-hooks/README.md similarity index 74% rename from hooks/isulad-hooks/README.md rename to hooks/syscontainer-hooks/README.md index a33a12d..ed6d44d 100644 --- a/hooks/isulad-hooks/README.md +++ b/hooks/syscontainer-hooks/README.md @@ -1,16 +1,16 @@ -# isulad-hooks +# syscontainer-hooks -This is a simple custom isulad hook for our own need, +This is a simple custom syscontainer hook for our own need, it interacts with isulad as a multifunctional hook. 1. allow user to add your own devices or binds into the container and update device Qos for container(device hook in prestart state). - 2. allow user to remove udev rule which added by isulad-tools when container is exiting(device hook in post-stop state). + 2. allow user to remove udev rule which added by syscontainer-tools when container is exiting(device hook in post-stop state). 3. allow user to add network interface and route rule to container(network hook in prestart state). 4. allow user to remove network interface on host when container is exiting(network hook in post-stop state). 5. allow user to do oci relabel for container in both prestart and post-stop state for container. -Actually, this hook only handles the container restart process, we use isulad-tools to -add device/binds/network interface/route rule to container. And isulad-tools will save the device/network config to disk. +Actually, this hook only handles the container restart process, we use syscontainer-tools to +add device/binds/network interface/route rule to container. And syscontainer-tools will save the device/network config to disk. And the hook will make sure the resources you added to container will be persistent after restart. Rename it to your favourite name afterwards. @@ -30,15 +30,15 @@ it's not a mandatory step, make your own choice for your convenience :) ## customise hook service -We could use `isulad-hooks` to customise the hook service. +We could use `syscontainer-hooks` to customise the hook service. ``` -Usage of isulad-hooks: +Usage of syscontainer-hooks: -log string set output log file -state string - set isulad hook state mode: prestart or poststop + set syscontainer hook state mode: prestart or poststop -with-relabel - isulad hook enable oci relabel hook function + syscontainer hook enable oci relabel hook function ``` As block device and network interface are both in our requirement, so these two function are mandantory. @@ -46,7 +46,7 @@ We could use `--with-relabel=true` to add oci-relabel hook service for container We could use `--state` to specify which state the hook will be running in. Full hook config: -[hook spec example of isulad-hooks](hooks/isulad-hooks/example/hookspec.json) +[hook spec example of syscontainer-hooks](hooks/syscontainer-hooks/example/hookspec.json) ## Try it! @@ -58,10 +58,10 @@ after that, you can run it like this: ``` $ isula run -d --name test_device --hook-spec $PWD/example/hookspec.json busybox sleep 20000 ``` -2.use isulad-tools to add device or binds to container +2.use syscontainer-tools to add device or binds to container ``` -isulad-tools add-device test_device /dev/zero:/dev/test_zero:rwm /dev/zero:/dev/test_zero2:rwm +syscontainer-tools add-device test_device /dev/zero:/dev/test_zero:rwm /dev/zero:/dev/test_zero2:rwm ``` 3.restart the container. to check the device is still in container. diff --git a/hooks/syscontainer-hooks/example/hookspec.json b/hooks/syscontainer-hooks/example/hookspec.json new file mode 100644 index 0000000..9066ed4 --- /dev/null +++ b/hooks/syscontainer-hooks/example/hookspec.json @@ -0,0 +1,23 @@ +{ + "prestart": [ + { + "path": "/var/lib/isulad/hooks/syscontainer-hooks", + "args": ["syscontainer-hooks", "--state", "prestart", "--log", "/var/log/device-hook.log"], + "env": [] + } + ], + "poststart":[ + { + "path": "/var/lib/isulad/hooks/syscontainer-hooks", + "args": ["syscontainer-hooks", "--state", "prestart", "--log", "/var/log/device-hook.log"], + "env": [] + } + ], + "poststop":[ + { + "path": "/var/lib/isulad/hooks/syscontainer-hooks", + "args": ["syscontainer-hooks", "--state", "poststop", "--log", "/var/log/device-hook.log"], + "env": [] + } + ] +} diff --git a/hooks/isulad-hooks/main.go b/hooks/syscontainer-hooks/main.go similarity index 90% rename from hooks/isulad-hooks/main.go rename to hooks/syscontainer-hooks/main.go index f116b07..ce193b2 100644 --- a/hooks/isulad-hooks/main.go +++ b/hooks/syscontainer-hooks/main.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -7,7 +7,7 @@ // IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR // PURPOSE. // See the Mulan PSL v1 for more details. -// Description: isulad hook main function +// Description: syscontainer hook main function // Author: zhangwei // Create: 2018-01-18 @@ -27,15 +27,15 @@ import ( _ "github.com/opencontainers/runc/libcontainer/nsenter" "github.com/opencontainers/runtime-spec/specs-go" "github.com/sirupsen/logrus" - hconfig "isula.org/isulad-tools/config" - "isula.org/isulad-tools/container" - "isula.org/isulad-tools/utils" + hconfig "isula.org/syscontainer-tools/config" + "isula.org/syscontainer-tools/container" + "isula.org/syscontainer-tools/utils" ) var ( defaultHookConfigFile = "device_hook.json" syslogTag = "hook " - bundleConfigFile = "ociconfig.json" + bundleConfigFile = "config.json" ) type hookData struct { @@ -140,7 +140,7 @@ func prepareHookData() (*hookData, error) { func main() { if reexec.Init() { - // `reexec routine` was registered in isulad-tools/libdevice + // `reexec routine` was registered in syscontainer-tools/libdevice // Sub nsenter process will come here. // Isulad reexec package do not handle errors. // And sub device-hook nsenter init process will send back the error message to parenet through pipe. @@ -150,9 +150,9 @@ func main() { signal.Ignore(syscall.SIGINT, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM) flLogfile := flag.String("log", "", "set output log file") - flMode := flag.String("state", "", "set isulad hook state mode: prestart or poststop") + flMode := flag.String("state", "", "set syscontainer hook state mode: prestart or poststop") // No requirements at present, by default don't enable this function. - flWithRelabel := flag.Bool("with-relabel", false, "isulad hook enable oci relabel hook function") + flWithRelabel := flag.Bool("with-relabel", false, "syscontainer hook enable oci relabel hook function") flag.Parse() @@ -163,7 +163,7 @@ func main() { } if err := os.MkdirAll(hconfig.IsuladToolsDir, 0666); err != nil { - logrus.Errorf("failed to set isulad-tools dir: %v", err) + logrus.Errorf("failed to set syscontainer-tools dir: %v", err) } switch *flMode { diff --git a/hooks/isulad-hooks/poststart.go b/hooks/syscontainer-hooks/poststart.go similarity index 94% rename from hooks/isulad-hooks/poststart.go rename to hooks/syscontainer-hooks/poststart.go index f9daa0f..838f876 100644 --- a/hooks/isulad-hooks/poststart.go +++ b/hooks/syscontainer-hooks/poststart.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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/hooks/isulad-hooks/poststop.go b/hooks/syscontainer-hooks/poststop.go similarity index 93% rename from hooks/isulad-hooks/poststop.go rename to hooks/syscontainer-hooks/poststop.go index 74106cb..3cac3a0 100644 --- a/hooks/isulad-hooks/poststop.go +++ b/hooks/syscontainer-hooks/poststop.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -20,12 +20,12 @@ import ( "path/filepath" "github.com/opencontainers/runc/libcontainer/configs" - hconfig "isula.org/isulad-tools/config" - "isula.org/isulad-tools/libdevice" - "isula.org/isulad-tools/libnetwork" - "isula.org/isulad-tools/pkg/udevd" - "isula.org/isulad-tools/types" - "isula.org/isulad-tools/utils" + hconfig "isula.org/syscontainer-tools/config" + "isula.org/syscontainer-tools/libdevice" + "isula.org/syscontainer-tools/libnetwork" + "isula.org/syscontainer-tools/pkg/udevd" + "isula.org/syscontainer-tools/types" + "isula.org/syscontainer-tools/utils" "github.com/opencontainers/runtime-spec/specs-go" "github.com/sirupsen/logrus" diff --git a/hooks/isulad-hooks/prestart.go b/hooks/syscontainer-hooks/prestart.go similarity index 97% rename from hooks/isulad-hooks/prestart.go rename to hooks/syscontainer-hooks/prestart.go index 52a11f3..43ef6e3 100644 --- a/hooks/isulad-hooks/prestart.go +++ b/hooks/syscontainer-hooks/prestart.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -28,13 +28,13 @@ import ( "github.com/opencontainers/runtime-spec/specs-go" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" - hconfig "isula.org/isulad-tools/config" - "isula.org/isulad-tools/libdevice" - "isula.org/isulad-tools/libdevice/nsexec" - "isula.org/isulad-tools/libnetwork" - "isula.org/isulad-tools/pkg/udevd" - "isula.org/isulad-tools/types" - "isula.org/isulad-tools/utils" + hconfig "isula.org/syscontainer-tools/config" + "isula.org/syscontainer-tools/libdevice" + "isula.org/syscontainer-tools/libdevice/nsexec" + "isula.org/syscontainer-tools/libnetwork" + "isula.org/syscontainer-tools/pkg/udevd" + "isula.org/syscontainer-tools/types" + "isula.org/syscontainer-tools/utils" ) const ( diff --git a/hooks/isulad-hooks/relabel.go b/hooks/syscontainer-hooks/relabel.go similarity index 97% rename from hooks/isulad-hooks/relabel.go rename to hooks/syscontainer-hooks/relabel.go index fbd11f2..d5d870b 100644 --- a/hooks/isulad-hooks/relabel.go +++ b/hooks/syscontainer-hooks/relabel.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -34,9 +34,9 @@ import ( "github.com/opencontainers/runtime-spec/specs-go" "github.com/sirupsen/logrus" "github.com/vishvananda/netlink/nl" - hconfig "isula.org/isulad-tools/config" - "isula.org/isulad-tools/libdevice/nsexec" - "isula.org/isulad-tools/utils" + hconfig "isula.org/syscontainer-tools/config" + "isula.org/syscontainer-tools/libdevice/nsexec" + "isula.org/syscontainer-tools/utils" ) var ( diff --git a/libdevice/binds_unix.go b/libdevice/binds_unix.go index f855496..be63176 100644 --- a/libdevice/binds_unix.go +++ b/libdevice/binds_unix.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -24,8 +24,8 @@ import ( "github.com/sirupsen/logrus" "github.com/opencontainers/runtime-spec/specs-go" - "isula.org/isulad-tools/types" - "isula.org/isulad-tools/utils" + "isula.org/syscontainer-tools/types" + "isula.org/syscontainer-tools/utils" ) // ParseBind will parse host path to Bind structure diff --git a/libdevice/cgroup.go b/libdevice/cgroup.go index 730820e..3feaae7 100644 --- a/libdevice/cgroup.go +++ b/libdevice/cgroup.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 ( "path/filepath" "github.com/opencontainers/runc/libcontainer/cgroups" - "isula.org/isulad-tools/types" + "isula.org/syscontainer-tools/types" ) var ( diff --git a/libdevice/container_work.go b/libdevice/container_work.go index ca719bb..0d4edbe 100644 --- a/libdevice/container_work.go +++ b/libdevice/container_work.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -26,10 +26,10 @@ import ( "syscall" "github.com/docker/docker/pkg/reexec" - "isula.org/isulad-tools/libdevice/nsexec" - "isula.org/isulad-tools/pkg/mount" - "isula.org/isulad-tools/types" - "isula.org/isulad-tools/utils" + "isula.org/syscontainer-tools/libdevice/nsexec" + "isula.org/syscontainer-tools/pkg/mount" + "isula.org/syscontainer-tools/types" + "isula.org/syscontainer-tools/utils" ) func init() { diff --git a/libdevice/devices_unix.go b/libdevice/devices_unix.go index 5366e49..4fe3a33 100644 --- a/libdevice/devices_unix.go +++ b/libdevice/devices_unix.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -24,7 +24,7 @@ import ( "strings" "syscall" - "isula.org/isulad-tools/types" + "isula.org/syscontainer-tools/types" "github.com/sirupsen/logrus" ) diff --git a/libdevice/libdevice.go b/libdevice/libdevice.go index 9d67791..b957d49 100644 --- a/libdevice/libdevice.go +++ b/libdevice/libdevice.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -22,12 +22,12 @@ import ( "github.com/opencontainers/runtime-spec/specs-go" "github.com/sirupsen/logrus" - hconfig "isula.org/isulad-tools/config" - "isula.org/isulad-tools/container" - "isula.org/isulad-tools/libdevice/nsexec" - "isula.org/isulad-tools/pkg/udevd" - "isula.org/isulad-tools/types" - "isula.org/isulad-tools/utils" + hconfig "isula.org/syscontainer-tools/config" + "isula.org/syscontainer-tools/container" + "isula.org/syscontainer-tools/libdevice/nsexec" + "isula.org/syscontainer-tools/pkg/udevd" + "isula.org/syscontainer-tools/types" + "isula.org/syscontainer-tools/utils" ) func checkDevice(config hconfig.ContainerConfig, devs []*types.Device, opts *types.AddDeviceOptions) error { @@ -279,7 +279,7 @@ func RemoveDevice(c *container.Container, devices []*types.Device, followPartiti for _, device := range devices { newDevice := config.FindDeviceByMapping(device) if newDevice == nil { - errinfo := fmt.Sprint("Device pair(", device.PathOnHost, ":", device.Path, ") is not added by isulad-tools, can not remove it, please check input parameter.") + errinfo := fmt.Sprint("Device pair(", device.PathOnHost, ":", device.Path, ") is not added by syscontainer-tools, can not remove it, please check input parameter.") retErr = append(retErr, errors.New(errinfo)) continue } @@ -288,7 +288,7 @@ func RemoveDevice(c *container.Container, devices []*types.Device, followPartiti if followPartition { subDevices := config.FindSubPartition(newDevice) for _, subDev := range subDevices { - // check the sub partition is added by isulad-tools + // check the sub partition is added by syscontainer-tools if found := config.FindDeviceByMapping(subDev); found == nil { continue } @@ -474,7 +474,7 @@ func RemovePath(c *container.Container, binds []*types.Bind) error { } if mp == nil { - errinfo := fmt.Sprint("Path pair(", bind.HostPath, ":", bind.ContainerPath, ") is not added by isulad-tools, can not remove it, please check input parameter") + errinfo := fmt.Sprint("Path pair(", bind.HostPath, ":", bind.ContainerPath, ") is not added by syscontainer-tools, can not remove it, please check input parameter") retErr = append(retErr, errors.New(errinfo)) continue } diff --git a/libdevice/nsexec/driver.go b/libdevice/nsexec/driver.go index eae61ca..1249171 100644 --- a/libdevice/nsexec/driver.go +++ b/libdevice/nsexec/driver.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ import ( "fmt" "os" - "isula.org/isulad-tools/types" + "isula.org/syscontainer-tools/types" ) var ( diff --git a/libdevice/nsexec/nsexec.go b/libdevice/nsexec/nsexec.go index 00098f5..e6bd0ac 100644 --- a/libdevice/nsexec/nsexec.go +++ b/libdevice/nsexec/nsexec.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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,8 +21,8 @@ import ( "os" "os/exec" - "isula.org/isulad-tools/types" - "isula.org/isulad-tools/utils" + "isula.org/syscontainer-tools/types" + "isula.org/syscontainer-tools/utils" "github.com/opencontainers/runc/libcontainer" "github.com/vishvananda/netlink/nl" diff --git a/libdevice/number.go b/libdevice/number.go index 64dcf2d..3403fb8 100644 --- a/libdevice/number.go +++ b/libdevice/number.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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/libdevice/options.go b/libdevice/options.go index 1ed8fbd..6b8a783 100644 --- a/libdevice/options.go +++ b/libdevice/options.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 ( "strconv" "strings" - "isula.org/isulad-tools/types" + "isula.org/syscontainer-tools/types" ) const ( diff --git a/libnetwork/bridge/api/bridge_api.go b/libnetwork/bridge/api/bridge_api.go index c64ba67..403173e 100644 --- a/libnetwork/bridge/api/bridge_api.go +++ b/libnetwork/bridge/api/bridge_api.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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/libnetwork/bridge/bridge.go b/libnetwork/bridge/bridge.go index e257d0d..58583a5 100644 --- a/libnetwork/bridge/bridge.go +++ b/libnetwork/bridge/bridge.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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,9 +16,9 @@ package bridge import ( "os/exec" - "isula.org/isulad-tools/libnetwork/bridge/api" - "isula.org/isulad-tools/libnetwork/bridge/linux" - "isula.org/isulad-tools/libnetwork/bridge/ovs" + "isula.org/syscontainer-tools/libnetwork/bridge/api" + "isula.org/syscontainer-tools/libnetwork/bridge/linux" + "isula.org/syscontainer-tools/libnetwork/bridge/ovs" ) var supportedDrivers map[string]api.BridgeDriver = make(map[string]api.BridgeDriver) diff --git a/libnetwork/bridge/linux/driver.go b/libnetwork/bridge/linux/driver.go index 66d26fb..ee5ff46 100644 --- a/libnetwork/bridge/linux/driver.go +++ b/libnetwork/bridge/linux/driver.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 linux import ( "fmt" - "isula.org/isulad-tools/libnetwork/bridge/api" + "isula.org/syscontainer-tools/libnetwork/bridge/api" "github.com/vishvananda/netlink" ) diff --git a/libnetwork/bridge/ovs/driver.go b/libnetwork/bridge/ovs/driver.go index 33fe0eb..d110d76 100644 --- a/libnetwork/bridge/ovs/driver.go +++ b/libnetwork/bridge/ovs/driver.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -18,7 +18,7 @@ import ( "os/exec" "github.com/vishvananda/netlink" - "isula.org/isulad-tools/libnetwork/bridge/api" + "isula.org/syscontainer-tools/libnetwork/bridge/api" ) type ovsBridgeDriver struct { diff --git a/libnetwork/drivers/common/driver.go b/libnetwork/drivers/common/driver.go index c55045b..86e8eb1 100644 --- a/libnetwork/drivers/common/driver.go +++ b/libnetwork/drivers/common/driver.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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,8 +16,8 @@ package common import ( "net" - "isula.org/isulad-tools/libnetwork/bridge" - "isula.org/isulad-tools/libnetwork/bridge/api" + "isula.org/syscontainer-tools/libnetwork/bridge" + "isula.org/syscontainer-tools/libnetwork/bridge/api" ) // Driver implement the network driver common options diff --git a/libnetwork/drivers/driver.go b/libnetwork/drivers/driver.go index 1d0cb43..97a6e8d 100644 --- a/libnetwork/drivers/driver.go +++ b/libnetwork/drivers/driver.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -20,9 +20,9 @@ import ( // "github.com/Sirupsen/logrus" "github.com/vishvananda/netlink" - "isula.org/isulad-tools/libnetwork/drivers/common" - "isula.org/isulad-tools/libnetwork/drivers/eth" - "isula.org/isulad-tools/libnetwork/drivers/veth" + "isula.org/syscontainer-tools/libnetwork/drivers/common" + "isula.org/syscontainer-tools/libnetwork/drivers/eth" + "isula.org/syscontainer-tools/libnetwork/drivers/veth" ) var ( diff --git a/libnetwork/drivers/eth/driver.go b/libnetwork/drivers/eth/driver.go index f300270..6d5c41f 100644 --- a/libnetwork/drivers/eth/driver.go +++ b/libnetwork/drivers/eth/driver.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -22,9 +22,9 @@ import ( "github.com/sirupsen/logrus" "github.com/vishvananda/netlink" - "isula.org/isulad-tools/libnetwork/drivers/common" - "isula.org/isulad-tools/libnetwork/nsutils" - "isula.org/isulad-tools/pkg/ethtool" + "isula.org/syscontainer-tools/libnetwork/drivers/common" + "isula.org/syscontainer-tools/libnetwork/nsutils" + "isula.org/syscontainer-tools/pkg/ethtool" ) type ethDriver struct { diff --git a/libnetwork/drivers/veth/driver.go b/libnetwork/drivers/veth/driver.go index 62af9ae..5ac958c 100644 --- a/libnetwork/drivers/veth/driver.go +++ b/libnetwork/drivers/veth/driver.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -22,9 +22,9 @@ import ( "github.com/sirupsen/logrus" "github.com/vishvananda/netlink" - "isula.org/isulad-tools/libnetwork/drivers/common" - "isula.org/isulad-tools/libnetwork/nsutils" - "isula.org/isulad-tools/pkg/ethtool" + "isula.org/syscontainer-tools/libnetwork/drivers/common" + "isula.org/syscontainer-tools/libnetwork/nsutils" + "isula.org/syscontainer-tools/pkg/ethtool" ) type vethDriver struct { @@ -96,7 +96,7 @@ func (d *vethDriver) DeleteIf() error { veth, err := netlink.LinkByName(d.GetHostNicName()) if err != nil { // As add-nic supports 'update-config-only' option, - // With this flag, isulad-tools will update config only, don't add device to container. + // With this flag, syscontainer-tools will update config only, don't add device to container. // So if device dose not exist on host, ignore it. if strings.Contains(err.Error(), "Link not found") { return nil diff --git a/libnetwork/interfaces.go b/libnetwork/interfaces.go index ed6a882..c3c71c1 100644 --- a/libnetwork/interfaces.go +++ b/libnetwork/interfaces.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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,10 +19,10 @@ import ( "strings" "github.com/sirupsen/logrus" - hconfig "isula.org/isulad-tools/config" - "isula.org/isulad-tools/container" - "isula.org/isulad-tools/libnetwork/drivers" - "isula.org/isulad-tools/types" + hconfig "isula.org/syscontainer-tools/config" + "isula.org/syscontainer-tools/container" + "isula.org/syscontainer-tools/libnetwork/drivers" + "isula.org/syscontainer-tools/types" ) // AddNic will add a network interface to container, it will update the config for container diff --git a/libnetwork/nsutils/ns_utils.go b/libnetwork/nsutils/ns_utils.go index 44764bb..5a2f746 100644 --- a/libnetwork/nsutils/ns_utils.go +++ b/libnetwork/nsutils/ns_utils.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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/libnetwork/route.go b/libnetwork/route.go index 0cd2f74..87aa76f 100644 --- a/libnetwork/route.go +++ b/libnetwork/route.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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,10 +21,10 @@ import ( "strings" "github.com/sirupsen/logrus" - hconfig "isula.org/isulad-tools/config" - "isula.org/isulad-tools/container" - "isula.org/isulad-tools/libnetwork/nsutils" - "isula.org/isulad-tools/types" + hconfig "isula.org/syscontainer-tools/config" + "isula.org/syscontainer-tools/container" + "isula.org/syscontainer-tools/libnetwork/nsutils" + "isula.org/syscontainer-tools/types" "github.com/vishvananda/netlink" ) @@ -140,7 +140,7 @@ func DelRoutes(ctr *container.Container, routes []*types.Route, updateConfigOnly var retErr []error for _, r := range routes { if exist := hConfig.IsRouteExist(r); !exist { - errinfo := fmt.Sprint("Route(", r, ") is not added by isulad-tools, can not remove it, please check input parameter.") + errinfo := fmt.Sprint("Route(", r, ") is not added by syscontainer-tools, can not remove it, please check input parameter.") retErr = append(retErr, errors.New(errinfo)) continue } diff --git a/main.go b/main.go index a5d46a2..63850f1 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -22,8 +22,8 @@ import ( "syscall" "github.com/docker/docker/pkg/reexec" - "isula.org/isulad-tools/config" - "isula.org/isulad-tools/utils" + "isula.org/syscontainer-tools/config" + "isula.org/syscontainer-tools/utils" _ "github.com/opencontainers/runc/libcontainer/nsenter" "github.com/sirupsen/logrus" @@ -55,7 +55,7 @@ func fatalf(t string, v ...interface{}) { func mainWork() { app := cli.NewApp() - app.Name = "isulad-tools" + app.Name = "syscontainer-tools" app.Usage = usage v := []string{ version, @@ -111,7 +111,7 @@ func mainWork() { app.Before = func(context *cli.Context) error { if err := os.MkdirAll(config.IsuladToolsDir, 0666); err != nil { - logrus.Errorf("failed to set isulad-tools dir: %v", err) + logrus.Errorf("failed to set syscontainer-tools dir: %v", err) } if logpath := context.GlobalString("log"); logpath != "" { @@ -155,10 +155,10 @@ func mainWork() { } func main() { if reexec.Init() { - // `reexec routine` was registered in isulad-tools/libdevice + // `reexec routine` was registered in syscontainer-tools/libdevice // Sub nsenter process will come here. // Isulad reexec package do not handle errors. - // And sub isulad-tools nsenter init process will send back the error message to parenet through pipe. + // And sub syscontainer-tools nsenter init process will send back the error message to parenet through pipe. // So here do not need to handle errors. return } diff --git a/network.go b/network.go index eddfe64..809aaa5 100644 --- a/network.go +++ b/network.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -24,9 +24,9 @@ import ( "github.com/docker/libnetwork/netutils" "github.com/sirupsen/logrus" - "isula.org/isulad-tools/container" - "isula.org/isulad-tools/libnetwork" - "isula.org/isulad-tools/types" + "isula.org/syscontainer-tools/container" + "isula.org/syscontainer-tools/libnetwork" + "isula.org/syscontainer-tools/types" ) var addNicCommand = cli.Command{ diff --git a/pkg/ethtool/ethtool.c b/pkg/ethtool/ethtool.c index 764ebbc..7754efb 100644 --- a/pkg/ethtool/ethtool.c +++ b/pkg/ethtool/ethtool.c @@ -1,6 +1,6 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2017-2019. All rights reserved. - * isulad-tools is licensed under the Mulan PSL v1. + * syscontainer-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/pkg/ethtool/ethtool.go b/pkg/ethtool/ethtool.go index 50fbf76..3da4739 100644 --- a/pkg/ethtool/ethtool.go +++ b/pkg/ethtool/ethtool.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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/pkg/ethtool/ethtool.h b/pkg/ethtool/ethtool.h index a34580b..23d14e6 100644 --- a/pkg/ethtool/ethtool.h +++ b/pkg/ethtool/ethtool.h @@ -1,6 +1,6 @@ /****************************************************************************** * Copyright (c) Huawei Technologies Co., Ltd. 2017-2019. All rights reserved. - * isulad-tools is licensed under the Mulan PSL v1. + * syscontainer-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/pkg/mount/mount.go b/pkg/mount/mount.go index ed39652..66c909e 100644 --- a/pkg/mount/mount.go +++ b/pkg/mount/mount.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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/pkg/mount/mounter_linux.go b/pkg/mount/mounter_linux.go index 4b48e58..767d2f9 100644 --- a/pkg/mount/mounter_linux.go +++ b/pkg/mount/mounter_linux.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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/pkg/mount/mountinfo.go b/pkg/mount/mountinfo.go index 8a952cd..92dab8a 100644 --- a/pkg/mount/mountinfo.go +++ b/pkg/mount/mountinfo.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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/pkg/udevd/udevd.go b/pkg/udevd/udevd.go index a9fda76..882795d 100644 --- a/pkg/udevd/udevd.go +++ b/pkg/udevd/udevd.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -42,7 +42,7 @@ func saveRules(path string, rules []*Rule) error { return err } - f.WriteString("## This File is auto-generated by isulad-tools.\n") + f.WriteString("## This File is auto-generated by syscontainer-tools.\n") f.WriteString("## DO NOT EDIT IT\n\n") for _, r := range rules { if _, err := f.WriteString(fmt.Sprintf("%s\n", r.ToUdevRuleString())); err != nil { diff --git a/pkg/udevd/udevd_controller.go b/pkg/udevd/udevd_controller.go index a10b41e..eab5918 100644 --- a/pkg/udevd/udevd_controller.go +++ b/pkg/udevd/udevd_controller.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -18,14 +18,14 @@ import ( "os" "path/filepath" - hconfig "isula.org/isulad-tools/config" + hconfig "isula.org/syscontainer-tools/config" "golang.org/x/sys/unix" ) var ( - programe = "/lib/udev/isulad-tools_wrapper" + programe = "/lib/udev/syscontainer-tools_wrapper" lockFile = "udevd_config_locker" - configPath = "/etc/udev/rules.d/99-isulad-tools.rules" + configPath = "/etc/udev/rules.d/99-syscontainer-tools.rules" ) // Rule defines an udev rule which used to capture the partition udev event diff --git a/relabel.go b/relabel.go index d863fa5..36975c3 100644 --- a/relabel.go +++ b/relabel.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 ( "io/ioutil" "os/exec" - "isula.org/isulad-tools/utils" + "isula.org/syscontainer-tools/utils" "github.com/opencontainers/runc/libcontainer/selinux" "github.com/sirupsen/logrus" diff --git a/route.go b/route.go index 545e0ce..d9db73a 100644 --- a/route.go +++ b/route.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -20,9 +20,9 @@ import ( "os" "strings" - "isula.org/isulad-tools/container" - "isula.org/isulad-tools/libnetwork" - "isula.org/isulad-tools/types" + "isula.org/syscontainer-tools/container" + "isula.org/syscontainer-tools/libnetwork" + "isula.org/syscontainer-tools/types" "github.com/sirupsen/logrus" "github.com/urfave/cli" diff --git a/test/devices_many_test.sh b/test/devices_many_test.sh index 01a29e1..bb08797 100644 --- a/test/devices_many_test.sh +++ b/test/devices_many_test.sh @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -# isulad-tools is licensed under the Mulan PSL v1. +# syscontainer-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/test/devices_test.sh b/test/devices_test.sh index df870d4..5e79e07 100644 --- a/test/devices_test.sh +++ b/test/devices_test.sh @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -# isulad-tools is licensed under the Mulan PSL v1. +# syscontainer-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/test/env.sh b/test/env.sh index 46219f8..ed6bc56 100644 --- a/test/env.sh +++ b/test/env.sh @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -# isulad-tools is licensed under the Mulan PSL v1. +# syscontainer-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 @@ -13,8 +13,8 @@ #!/bin/bash -## isulad-tools paths. -ISULAD_TOOLS="$CUR/../build/isulad-tools" +## syscontainer-tools paths. +ISULAD_TOOLS="$CUR/../build/syscontainer-tools" ## Ubuntu image UBUNTU_IMAGE="ubuntu" diff --git a/test/main.sh b/test/main.sh index f35d3b1..0515919 100644 --- a/test/main.sh +++ b/test/main.sh @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -# isulad-tools is licensed under the Mulan PSL v1. +# syscontainer-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 @@ -41,8 +41,8 @@ setupImage(){ setup_device_hook(){ mkdir -p /var/lib/isulad/hooks - cp $CUR/../hooks/isulad-hooks/example/hookspec.json /var/lib/isulad/hooks/ - cp $CUR/../build/isulad-hooks /var/lib/isulad/hooks/ + cp $CUR/../hooks/syscontainer-hooks/example/hookspec.json /var/lib/isulad/hooks/ + cp $CUR/../build/syscontainer-hooks /var/lib/isulad/hooks/ } main_test(){ diff --git a/test/network_test.sh b/test/network_test.sh index 37ceacb..00b2a12 100644 --- a/test/network_test.sh +++ b/test/network_test.sh @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -# isulad-tools is licensed under the Mulan PSL v1. +# syscontainer-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 @@ -24,7 +24,7 @@ test_001(){ #testcase01 CONTAINER_ID=`isula run -d $BUSYBOX_IMAGE top` - $ISULAD_TOOLS --debug --log $TMP/isulad-tools.log add-nic \ + $ISULAD_TOOLS --debug --log $TMP/syscontainer-tools.log add-nic \ --type veth --name eth10 --ip 192.168.182.2/24 \ --mac "aa:bb:cc:dd:ee:aa" --bridge "docker0" --mtu 1350 \ $CONTAINER_ID @@ -83,7 +83,7 @@ test_002(){ fail "02-1:FAIL" fi CONTAINER_ID=`isula run -d $BUSYBOX_IMAGE top` - $ISULAD_TOOLS --debug --log $TMP/isulad-tools.log add-nic \ + $ISULAD_TOOLS --debug --log $TMP/syscontainer-tools.log add-nic \ --type veth --name eth11 --ip 192.168.182.2/24 \ --mac "aa:bb:cc:dd:ee:aa" --bridge $OVS_BR --mtu 1350 \ $CONTAINER_ID diff --git a/test/network_wrapper.sh b/test/network_wrapper.sh index 8005886..9e67426 100644 --- a/test/network_wrapper.sh +++ b/test/network_wrapper.sh @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -# isulad-tools is licensed under the Mulan PSL v1. +# syscontainer-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/test/path_many_test.sh b/test/path_many_test.sh index 948be49..2a4f284 100644 --- a/test/path_many_test.sh +++ b/test/path_many_test.sh @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -# isulad-tools is licensed under the Mulan PSL v1. +# syscontainer-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/test/path_test.sh b/test/path_test.sh index 4f4ddc4..ca2ba5d 100644 --- a/test/path_test.sh +++ b/test/path_test.sh @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -# isulad-tools is licensed under the Mulan PSL v1. +# syscontainer-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/test/route_test.sh b/test/route_test.sh index a7f314f..d86d233 100644 --- a/test/route_test.sh +++ b/test/route_test.sh @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -# isulad-tools is licensed under the Mulan PSL v1. +# syscontainer-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 @@ -24,7 +24,7 @@ test_001(){ ip a a 192.168.182.1/24 dev $BR CONTAINER_ID=`isula run -d --net none $BUSYBOX_IMAGE top` - $ISULAD_TOOLS --debug --log $TMP/isulad-tools.log add-nic \ + $ISULAD_TOOLS --debug --log $TMP/syscontainer-tools.log add-nic \ --type veth --name eth0 --ip 192.168.182.2/24 \ --mac "aa:bb:cc:dd:ee:aa" --bridge $BR --mtu 1450 \ $CONTAINER_ID diff --git a/test/tools.sh b/test/tools.sh index 8d608dc..45f8367 100644 --- a/test/tools.sh +++ b/test/tools.sh @@ -1,5 +1,5 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -# isulad-tools is licensed under the Mulan PSL v1. +# syscontainer-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/types/config.go b/types/config.go index 045b593..dcb8d16 100644 --- a/types/config.go +++ b/types/config.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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/types/device.go b/types/device.go index 06e49e2..f913763 100644 --- a/types/device.go +++ b/types/device.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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/types/network.go b/types/network.go index c4b914b..34a5a48 100644 --- a/types/network.go +++ b/types/network.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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/utils/hooks.go b/utils/hooks.go index 1ddd54a..21550b9 100644 --- a/utils/hooks.go +++ b/utils/hooks.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -33,7 +33,7 @@ func getGraphDriverPath() (string, error) { return "", err } - // get /var/lib/isulad from /var/lib/isulad/hooks/isulad-hooks + // get /var/lib/isulad from /var/lib/isulad/hooks/syscontainer-hooks dir := filepath.Dir(filepath.Dir(path)) return dir, nil } diff --git a/utils/selinux.go b/utils/selinux.go index 0098416..f432b24 100644 --- a/utils/selinux.go +++ b/utils/selinux.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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/utils/transfer.go b/utils/transfer.go index a1b24c7..9c6d527 100644 --- a/utils/transfer.go +++ b/utils/transfer.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -20,10 +20,10 @@ import ( "path/filepath" "syscall" - mymount "isula.org/isulad-tools/pkg/mount" + mymount "isula.org/syscontainer-tools/pkg/mount" "github.com/docker/docker/pkg/mount" - "isula.org/isulad-tools/types" + "isula.org/syscontainer-tools/types" "github.com/sirupsen/logrus" ) @@ -36,7 +36,7 @@ const ( /* Add path to container when it is running We use mount propagation mechanism to do it. Take - isulad tools add-path /hostpath1:/guest1 for example. + syscontainer tools add-path /hostpath1:/guest1 for example. 1. Add a sharing path using hook as belowing. Then every diff --git a/utils/utils.go b/utils/utils.go index 09b066d..c774da0 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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/volume.go b/volume.go index efec32a..a4a3399 100644 --- a/volume.go +++ b/volume.go @@ -1,5 +1,5 @@ // Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved. -// isulad-tools is licensed under the Mulan PSL v1. +// syscontainer-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 @@ -20,9 +20,9 @@ import ( "fmt" "os" - "isula.org/isulad-tools/container" - "isula.org/isulad-tools/libdevice" - "isula.org/isulad-tools/types" + "isula.org/syscontainer-tools/container" + "isula.org/syscontainer-tools/libdevice" + "isula.org/syscontainer-tools/types" "github.com/sirupsen/logrus" "github.com/urfave/cli"