Fill APE Request proprties with source IP in services #1142
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#1142
Loading…
Reference in a new issue
No description provided.
Delete branch "aarifullin/frostfs-node:feat/ape_sourceip"
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?
356c6c1cb7
to80f28b82a7
@ -378,2 +386,4 @@
return nil, nil, err
}
if p, ok := peer.FromContext(ctx); ok {
reqProps[commonschema.PropertyKeyFrostFSSourceIP] = p.Addr.String()
net.Addr
is an interface and it can contain port. The port is random for outgoing connections and we are probably interested in the IP only.Is it explicit in the spec?
@dkirillov
We need only IP
I have fixed that. Please, check this out
Since, tcp-address is parsed and IP is put to the property
Have you checked what type is returned here? I believe it shoud be
TCPAddr
as we provide TCP listener to the gRPC server.ResolveTCPAddr
can consult DNS, which is definitely what we do not want to do.Sorry, I don't get your point. Let it be able to consult DNS, but
so,
peer.Addr
is coming within context as tcp192.92.9.2:4032
. So, it successfully parses the tcp address and we keepIP
inaddr.IP
Okay, I got it. Fixed as you requested 👍
80f28b82a7
to409c3ae2ff
LGTM
409c3ae2ff
to297e4b4984
@ -133,3 +134,3 @@
t.Run("missing signature, no panic", func(t *testing.T) {
require.Error(t, s.verifyClient(req, cid2, nil, op))
require.Error(t, s.verifyClient(context.TODO(), req, cid2, nil, op))
You are planning to extend these tests with proper context? Why not to use
Background()
here?Fixed
297e4b4984
to75881cf908