示例#1
0
func (s *systemtestSuite) rebootstrap() error {
	s.clearContainers()
	s.clearVolumes()
	s.clearRBD()
	s.stopVolplugin()
	s.stopVolmaster()
	utils.StopEtcd(s.vagrant.GetNode("mon0"))

	if err := utils.StartEtcd(s.vagrant.GetNode("mon0")); err != nil {
		return err
	}

	if err := s.startVolmaster(); err != nil {
		return err
	}

	if err := s.startVolplugin(); err != nil {
		return err
	}

	_, err := s.uploadIntent("tenant1", "intent1")
	if err != nil {
		return err
	}

	return nil
}
示例#2
0
func (s *systemtestSuite) TearDownSuite(c *C) {
	if os.Getenv("NO_TEARDOWN") != "" {
		os.Exit(0)
	}

	log.Infof("Tearing down system test facilities")

	s.clearContainers()
	s.clearVolumes()
	s.restartDocker()

	c.Assert(s.stopVolplugin(), IsNil)
	c.Assert(s.stopVolmaster(), IsNil)
	c.Assert(utils.StopEtcd(s.vagrant.GetNode("mon0")), IsNil)
}
示例#3
0
func (s *systemtestSuite) TearDownSuite(c *C) {
	if os.Getenv("NO_TEARDOWN") != "" || os.Getenv("CONTIV_SOE") != "" {
		os.Exit(0)
	}

	log.Infof("Tearing down system test facilities")

	s.clearContainers()
	s.clearVolumes()
	s.restartDocker()

	c.Assert(s.vagrant.IterateNodes(stopVolplugin), IsNil)
	c.Assert(stopVolmaster(s.vagrant.GetNode("mon0")), IsNil)

	reversedNodes := []utils.TestbedNode{}

	for i := len(orderedNodes) - 1; i > -1; i-- {
		reversedNodes = append(reversedNodes, orderedNodes[i])
	}

	c.Assert(utils.StopEtcd(reversedNodes), IsNil)
}