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

Store peer address provided during peer add #761

Merged
merged 2 commits into from
May 23, 2018

Conversation

Madhu-1
Copy link
Member

@Madhu-1 Madhu-1 commented May 17, 2018

store peer addresses provided during peer add in ETCD.

if peer address already present in the store
update configuration on startup

this allows the users to use peer address
provided during peer add, for any other
operations(ex:- volume create,expand)

Fixes: #725
Fixes: #758
Fixes: #724
Fixes: #721
Signed-off-by: Madhu Rajanna mrajanna@redhat.com

@prashanthpai
Copy link
Contributor

The commit message and PR description is ambiguous can be more clearer. You mention peer details multiple times, but this change is limited to peer addresses only.

@Madhu-1
Copy link
Member Author

Madhu-1 commented May 22, 2018

@prashanthpai updated commit message and PR description

@prashanthpai prashanthpai changed the title store peer details provided during peer add Store peer address provided during peer add May 22, 2018
@prashanthpai
Copy link
Contributor

@Madhu-1 Needs a rebase as #603 got merged

@Madhu-1 Madhu-1 force-pushed the issue_725 branch 3 times, most recently from dd6b85d to b55d6a7 Compare May 23, 2018 05:26
@Madhu-1
Copy link
Member Author

Madhu-1 commented May 23, 2018

@prashanthpai rebased

Copy link
Contributor

@prashanthpai prashanthpai left a comment

Choose a reason for hiding this comment

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

LGTM 👍

I'll wait for inputs from @aravindavk too as he filed a similar issue.

//if not found prepend the remotePeerAddress to peer details
if !found {
newpeer.PeerAddresses = append([]string{remotePeerAddress}, newpeer.PeerAddresses...)
}
Copy link
Member

Choose a reason for hiding this comment

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

if found, we can move that address as first address in the list?

Copy link
Contributor

Choose a reason for hiding this comment

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

if not found, right ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@prashanthpai if found, and if it's not in the index 0, we need to move it to index 0

Copy link
Member Author

Choose a reason for hiding this comment

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

@aravindavk, done

peer add in ETCD.

if peer address already present in store
update configuration on startup

this allows the users to use peer address
provided during peer add, for any other
operations(ex:- volume create,expand)

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
@aravindavk
Copy link
Member

retest this please

@prashanthpai prashanthpai merged commit 18a7e7b into gluster:master May 23, 2018
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.

3 participants