Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stability: add fault-trigger server #312

Merged
merged 4 commits into from
Mar 14, 2019
Merged

Conversation

cwen0
Copy link
Member

@cwen0 cwen0 commented Mar 12, 2019

  1. stop / start virtual machine
  2. stop / start etcd
  3. stop / start kubelet

@weekface @zyguan @xiaojingchen PTAL

Copy link
Contributor

@zyguan zyguan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

BTW: we need to deploy the server to both hosts and vms. would it be better to build a centralized manager server by using remote command (eg. ssh <host|vm> some_command ...) ?

data = stripEmpty(data)
lines := strings.Split(data, "\n")
for _, line := range lines {
if !strings.HasPrefix(line, "eth0") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the interface name maybe not eth0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about checking ipv4 ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check the MAC address is exist is more reasonable

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/pingcap/tidb-operator/pull/312/files#diff-cc0457c3ced0a4de0bcef6986b537b8aR72
if this check was failed, the program will check the mac address

Copy link
Contributor

@weekface weekface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

func (m *Manager) StartETCD() error {
shell := "systemctl start etcd"
cmd := exec.Command("/bin/sh", "-c", shell)
_, err := cmd.CombinedOutput()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data, err := cmd.CombinedOutput()
if err != nil {
    log.Errorf(".............")
}

?

@tennix tennix added the test/stability stability tests label Mar 13, 2019
@cwen0
Copy link
Member Author

cwen0 commented Mar 14, 2019

@weekface @xiaojingchen PTAL again, thanks!

Copy link
Contributor

@weekface weekface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@weekface weekface merged commit 4f8d71a into pingcap:stability Mar 14, 2019
weekface pushed a commit to weekface/tidb-operator that referenced this pull request Mar 21, 2019
tennix pushed a commit that referenced this pull request Mar 21, 2019
* test: add fault-trigger server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test/stability stability tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants