-
Notifications
You must be signed in to change notification settings - Fork 500
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
Conversation
There was a problem hiding this 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") { |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about checking ipv4
?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this 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() |
There was a problem hiding this comment.
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(".............")
}
?
@weekface @xiaojingchen PTAL again, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* test: add fault-trigger server
* test: add fault-trigger server
@weekface @zyguan @xiaojingchen PTAL