Exemplo n.º 1
0
func startVolmaster(node utils.TestbedNode) error {
	log.Infof("Starting the volmaster on %s", node.GetName())
	_, err := node.RunCommandBackground("sudo -E nohup `which volmaster` --debug </dev/null &>/tmp/volmaster.log &")
	log.Infof("Waiting for volmaster startup")
	time.Sleep(10 * time.Millisecond)
	return err
}
Exemplo n.º 2
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
}
Exemplo n.º 3
0
// DumpNetpluginLogs prints netplugin logs from the specified testbed node
func DumpNetpluginLogs(node stu.TestbedNode) {
	cmdStr := fmt.Sprintf("sudo cat /tmp/netplugin.log")
	output, err := node.RunCommandWithOutput(cmdStr)
	if err == nil {
		log.Debugf("logs on node %s: \n%s\n", node.GetName(), output)
	}
}
Exemplo n.º 4
0
func startVolplugin(node utils.TestbedNode) error {
	log.Infof("Starting the volplugin on %q", node.GetName())
	defer time.Sleep(10 * time.Millisecond)

	// FIXME this is hardcoded because it's simpler. If we move to
	// multimaster or change the monitor subnet, we will have issues.
	_, err := node.RunCommandBackground("sudo -E `which volplugin` --debug &>/tmp/volplugin.log &")
	return err
}
Exemplo n.º 5
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
}
Exemplo n.º 6
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
}
Exemplo n.º 7
0
func stopVolplugin(node utils.TestbedNode) error {
	log.Infof("Stopping the volplugin on %q", node.GetName())
	return node.RunCommand("sudo pkill volplugin")
}
Exemplo n.º 8
0
func stopVolmaster(node utils.TestbedNode) error {
	log.Infof("Stopping the volmaster on %s", node.GetName())
	return node.RunCommand("sudo pkill volmaster")
}
Exemplo n.º 9
0
func startVolsupervisor(node utils.TestbedNode) error {
	log.Infof("Starting the volsupervisor on %s", node.GetName())
	_, err := node.RunCommandBackground("sudo -E nohup `which volsupervisor` --debug </dev/null &>/tmp/volsupervisor.log &")
	return err
}
Exemplo n.º 10
0
func (s *systemtestSuite) volpluginStop(node utils.TestbedNode) error {
	log.Infof("Stopping the volplugin on %q", node.GetName())
	return node.RunCommand("sudo pkill volplugin")
}
Exemplo n.º 11
0
// OvsDumpInfo dumps the ovs state on the specified testbed node
func OvsDumpInfo(node stu.TestbedNode) {
	cmdStr := "sudo ovs-vsctl show"
	output, _ := node.RunCommandWithOutput(cmdStr)
	log.Debugf("ovs-vsctl on node %s: \n%s\n", node.GetName(), output)
}