示例#1
0
func restartDockerHost(node utils.TestbedNode) error {
	log.Infof("Restarting docker on %q", node.GetName())
	// note that for all these restart tasks we error out quietly to avoid other
	// hosts being cleaned up
	node.RunCommand("sudo service docker restart")
	return nil
}
示例#2
0
// DockerCleanupWithEnv kills and removes a container on a specified testbed node
// and with specified env-variables
func DockerCleanupWithEnv(t *testing.T, node stu.TestbedNode, contName string, env []string) {
	if !OkToCleanup(t.Failed()) {
		return
	}
	cmdStr := fmt.Sprintf("sudo %s docker kill %s", strings.Join(env, " "), contName)
	node.RunCommand(cmdStr)
	cmdStr = fmt.Sprintf("sudo %s docker rm %s", strings.Join(env, " "), contName)
	node.RunCommand(cmdStr)
}
示例#3
0
func (s *systemtestSuite) clearVolumeHost(node utils.TestbedNode) error {
	log.Infof("Clearing volumes on %q", node.GetName())
	node.RunCommand("docker volume ls | tail -n +2 | awk '{ print $2 }' | xargs docker volume rm")
	return nil
}
示例#4
0
func (s *systemtestSuite) clearContainerHost(node utils.TestbedNode) error {
	log.Infof("Clearing containers on %q", node.GetName())
	node.RunCommand("docker ps -aq | xargs docker rm -f")
	return nil
}
示例#5
0
func stopVolplugin(node utils.TestbedNode) error {
	log.Infof("Stopping the volplugin on %q", node.GetName())
	return node.RunCommand("sudo pkill volplugin")
}
示例#6
0
func stopVolmaster(node utils.TestbedNode) error {
	log.Infof("Stopping the volmaster on %s", node.GetName())
	return node.RunCommand("sudo pkill volmaster")
}
示例#7
0
func (s *systemtestSuite) volpluginStop(node utils.TestbedNode) error {
	log.Infof("Stopping the volplugin on %q", node.GetName())
	return node.RunCommand("sudo pkill volplugin")
}
示例#8
0
// StopNetmaster stops the netmaster on specified testbed node
func StopNetmaster(t *testing.T, node stu.TestbedNode) {
	cmdStr := "sudo pkill netmaster"
	node.RunCommand(cmdStr)
}
示例#9
0
func volpluginStop(node utils.TestbedNode) error {
	return node.RunCommand("sudo pkill volplugin")
}