Ejemplo 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
}
Ejemplo n.º 2
0
// StartNetmasterWithFlags starts netplugin on specified testbed nodes with specified flags
func StartNetmasterWithFlags(t *testing.T, node stu.TestbedNode, flags map[string]string) {
	time.Sleep(5 * time.Second)

	var (
		cmdStr   string
		flagsStr string
	)

	for k, v := range flags {
		flagsStr += fmt.Sprintf("%s=%s", k, v)
	}

	if os.Getenv("CONTIV_TESTBED") == "DIND" {
		cmdStr = fmt.Sprintf("netmaster %s 1>/tmp/netmaster.log 2>&1", flagsStr)
	} else {
		cmdStr = fmt.Sprintf("nohup netmaster %s 0<&- &>/tmp/netmaster.log", flagsStr)
	}
	output, err := node.RunCommandBackground(cmdStr)
	if err != nil {
		t.Fatalf("Failed to launch netplugin. Error: %s\nCmd:%q\n Output : %s\n",
			err, cmdStr, output)
	}

	time.Sleep(5 * time.Second)
}
Ejemplo n.º 3
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
}
Ejemplo n.º 4
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
}
Ejemplo n.º 5
0
func volpluginStart(node utils.TestbedNode) error {
	// 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 --master 192.168.24.10:8080 tenant1 &>/tmp/volplugin.log &")
	return err
}