cli: Use grpc.WaitForReady
while initializing SDK client #1441
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1441
Loading…
Reference in a new issue
No description provided.
Delete branch "a-savchuk/frostfs-node:correct-timeout-for-cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Before, when the target RPC server was unavailable, requests made by CLI didn't wait for a timeout specified by the
--timeout
option if the timeout was more than 20 seconds. It's because of the gRPC default backoff strategy. Adding this option fixes that behavior.Before
After
grpc.WaitForReady
while initializing SDK client89d5d387fc
tod673ed73ba
d673ed73ba
to0a752752ec
WIP: [#xx] cli: Useto cli: Usegrpc.WaitForReady
while initializing SDK clientgrpc.WaitForReady
while initializing SDK client0a752752ec
to969d3ba028
grpc.CallOption
options on dial #287@ -58,6 +58,7 @@ func GetSDKClient(ctx context.Context, cmd *cobra.Command, key *ecdsa.PrivateKey
GRPCDialOptions: []grpc.DialOption{
grpc.WithChainUnaryInterceptor(tracing.NewUnaryClientInteceptor()),
grpc.WithChainStreamInterceptor(tracing.NewStreamClientInterceptor()),
grpc.WithDefaultCallOptions(grpc.WaitForReady(true)),
what about tree service and grpc clients (object, container)?
Done
Before:
After:
What about internal client in node?
It seems not only CLI is affected.
Here too:
grpcOpts := []grpc.DialOption{
I thought we've decided not to change a client in node. As for me, it's okay when a client fails as soon as it knows it can't dial connection because the target host is unavailable
The idea of the task was to make a timeout that the CLI (only CLI) waits for and a timeout specified by user equal
But what for
client -> node1 -> node2
scenario?I can do that but either way it won't work as we want
The help info for
frostfs-cli
says that a user specifies timeout for an operation. Suppose a dial timeout forclient
is specified by the user butnode1
creates its own client with timeouts configured fornode1
, so the entire operation may fail before the user specified deadline exceededSo, what's the final decision? To do or not to do?
Also added this option to the node's internal client
969d3ba028
to602c42a237
grpc.WaitForReady
option when creating client 43f7086251grpc.WaitForReady
option when creating clientNew commits pushed, approval review dismissed automatically according to repository settings
3914369e96
to65a4320c75