Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

cluster: handle invalid member name #567

Merged
merged 1 commit into from
Jan 1, 2017
Merged

Conversation

hongchaodeng
Copy link
Member

No description provided.

@@ -17,5 +17,6 @@ package cluster
import "errors"

var (
errNoBackupExist = errors.New("no backup exist for disaster recovery")
errNoBackupExist = errors.New("no backup exist for disaster recovery")
errInvalidMemberName = errors.New("member's Name has the wrong format")
Copy link
Collaborator

Choose a reason for hiding this comment

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

the format of member's name is invalid.

@@ -64,3 +71,12 @@ func podsToMemberSet(pods []*api.Pod, selfHosted *spec.SelfHostedPolicy) etcduti
}
return members
}

func findID(name string) (int, error) {
Copy link
Collaborator

@xiang90 xiang90 Jan 1, 2017

Choose a reason for hiding this comment

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

probably move this to etcdutil/member

member.NameID()

Copy link
Member Author

@hongchaodeng hongchaodeng Jan 1, 2017

Choose a reason for hiding this comment

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

The logic of naming convention all sits in pkg/cluster:

https://github.com/coreos/etcd-operator/blob/master/pkg/cluster/cluster.go#L297

Can we put it in the same pkg right now? I have another PR ontop.
We would centralize such logic, probably in etcdutil/member later.

@hongchaodeng
Copy link
Member Author

fix error message.

@hongchaodeng
Copy link
Member Author

@etcd-bot retest this please

An etcd pod keeps pending. Seems like a normal cluster flake:

skip reconciliation: running ([test-etcd-lz1z2-0000 test-etcd-lz1z2-0001]), pending ([test-etcd-lz1z2-0002])

@hongchaodeng
Copy link
Member Author

Merging this.
I will fix the member name parsing thing later.

@hongchaodeng hongchaodeng merged commit 57aeb90 into coreos:master Jan 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants