Example #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
}
Example #2
0
func (s *systemtestSuite) SetUpSuite(c *C) {
	log.Infof("Bootstrapping system tests")

	s.nodeMap = map[string]utils.TestbedNode{}
	s.vagrant = utils.Vagrant{}
	c.Assert(s.vagrant.Setup(false, "", 3), IsNil)
	for _, node := range s.vagrant.GetNodes() {
		s.nodeMap[node.GetName()] = node
	}

	orderedNodes = []utils.TestbedNode{s.vagrant.GetNode("mon0"), s.vagrant.GetNode("mon1"), s.vagrant.GetNode("mon2")}

	c.Assert(s.restartDocker(), IsNil)
	err := s.clearContainers()
	if err != nil && !strings.Contains(err.Error(), "Process exited with: 123") {
		c.Fatal(err)
	}

	c.Assert(s.pullUbuntu(), IsNil)
	c.Assert(utils.StartEtcd(orderedNodes), IsNil)
	c.Assert(s.rebootstrap(), IsNil)

	_, err = s.uploadIntent("tenant1", "intent1")
	c.Assert(err, IsNil)
}