[#114] Add remove-node IR control command #310

Merged
fyrchik merged 1 commit from ale64bit/frostfs-node:feature/114-control-ir-remove-node into master 2023-05-10 14:31:45 +00:00
Member

Signed-off-by: Alejandro Lopez a.lopez@yadro.com

Close #114

Signed-off-by: Alejandro Lopez <a.lopez@yadro.com> Close #114
ale64bit requested review from storage-core-committers 2023-05-03 13:28:00 +00:00
ale64bit requested review from storage-core-developers 2023-05-03 13:28:01 +00:00
acid-ant approved these changes 2023-05-03 15:26:10 +00:00
dstepanov-yadro reviewed 2023-05-04 14:22:33 +00:00
@ -0,0 +48,4 @@
return fmt.Errorf("peer can be forcefully removed only in notary environment")
}
prm := UpdatePeerPrm{}

NodeState = Offline ?

NodeState = Offline ?

Oh, my mistake:

	if p.state == 0 {
		p.state = netmap.NodeStateOffline
	}
Oh, my mistake: ``` if p.state == 0 { p.state = netmap.NodeStateOffline } ```
dstepanov-yadro marked this conversation as resolved
dstepanov-yadro reviewed 2023-05-04 14:24:44 +00:00
@ -60,0 +82,4 @@
break
}
}
if len(nodeInfo.PublicKey()) == 0 {

Maybe validate node state too? What if state already Offline?

Maybe validate node state too? What if state already Offline?
Author
Member

would it appear in the list if it was offline?

would it appear in the list if it was offline?

I don't know)

I don't know)
Author
Member

Added the check just in case.

Added the check just in case.
dstepanov-yadro marked this conversation as resolved
ale64bit force-pushed feature/114-control-ir-remove-node from f605f970fd to 229bb24cc7 2023-05-05 07:15:35 +00:00 Compare
dstepanov-yadro approved these changes 2023-05-05 08:51:24 +00:00
fyrchik approved these changes 2023-05-05 16:11:01 +00:00
@ -0,0 +30,4 @@
pk := key.Get(cmd)
c := getClient(cmd, pk)
nodeKeyStr, _ := cmd.Flags().GetString("node")
Owner

Can we just make a flag required? I know, you still can provide empty value, but hey, control service should still return an error.

Can we just make a flag required? I know, you still can provide empty value, but hey, control service should still return an error.
Author
Member

done

done
fyrchik marked this conversation as resolved
@ -175,3 +175,3 @@
}
// SetArgs sets arguments of the contact call.
// SetArgs sets arguments of the contract call.
Owner

Unrelated to the commit.

Unrelated to the commit.
Author
Member

done

done
fyrchik marked this conversation as resolved
ale64bit force-pushed feature/114-control-ir-remove-node from 229bb24cc7 to 8e5b7cb98e 2023-05-10 06:55:32 +00:00 Compare
fyrchik approved these changes 2023-05-10 14:31:21 +00:00
fyrchik merged commit 90799497d3 into master 2023-05-10 14:31:45 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#310
No description provided.