#grpc

/

      • forsil joined the channel
      • forsil has quit
      • lburgazzoli joined the channel
      • ams__ joined the channel
      • forsil joined the channel
      • forsil has quit
      • noonien joined the channel
      • chin-tastic joined the channel
      • g3p0 joined the channel
      • g3p0
        Hello!
      • |Pixel|_
        hey :)
      • |Pixel|_ is now known as |Pixel|
      • g3p0
        Any experience setting the lb_policy for channels in python world @Pixel?
      • |Pixel|
        I'm not a python guy, but I can poke one for you
      • what's your question ?
      • g3p0
        Hmm we are using
      • channel = grpc.insecure_channel(endpoint, [('grpc.lb_policy_name', 'round_robin')])
      • but it isn't obeying the round_robin policy
      • tedward joined the channel
      • Hi ted
      • tedward
        howdy
      • g3p0
        And/or how can we compile the python bindings with a debug flag on?
      • tedward
        i.e. view the output of gpr_log() calls invoked by the cython wrappers & set the log level thereof
      • |Pixel|
        log levels are controlled by environment variables
      • you can do for instance
      • GRPC_VERBOSITY=DEBUG GRPC_TRACE=all
      • to get an insane lot of debugging
      • like, all the things
      • tedward
        that's awesome! thanks.
      • g3p0
        What about me? =(
      • |Pixel|
        I've tried getting attention from python devs
      • but it's Friday...
      • g3p0
        THanks buddy!
      • Is google groups the best for this in reality?
      • nathanielmanista
        g3p0: Hi, I'm part of gRPC Python Team. :-)
      • g3p0
        Hooray!
      • On windows, the following lb_policy isn't obeyed.
      • channel = grpc.insecure_channel(endpoint, [('grpc.lb_policy_name', 'round_robin')])
      • nathanielmanista
        Well... maybe hooray; maybe not. gRPC Python shouldn't, and I believe doesn't, do anything with the channel arguments other than pass them to gRPC Core.
      • tedward
        nathanielmanista: the behavior we're seeing is that on linux it always round-robins, regardless of which policy it's specified, and on windows, it always picks first
      • (or it always sends requests to the same endpoint)
      • nathanielmanista
        Sadly I don't think the keys and values of channel arguments are printed with GRPC_VERBOSITY=debug GRPC_TRACE=api. Maybe with GRPC_TRACE=all?
      • g3p0
        we set GRPC_TRACE=round_robin
      • tedward
        we can see from grpc core log output that the round_robin.cc code path is being invoked
      • nathanielmanista
        This is sounding more and more like a Core problem. |Pixel|, are you feeling similarly?
      • g3p0, tedward: how are you specifying "endpoint"?
      • tedward
      • where cluster.foo.com resolves to 4 A records
      • g3p0
        Whoa. OK.
      • endpoing = 'dns:///cluster.foo.com' where cluster.foo.com resolves to four A records.
      • nathanielmanista
        As for compiling gRPC Python with a debug flag on: we don't particularly support any compilation over any other but if you find us doing something particularly obstructive please let us know about it?
      • g3p0
        Oh the environment variables were key. Thanks.
      • nathanielmanista
        g3p0: have you learned something? Something you're able to share?
      • g3p0
        Hmm here is the output from windows land https://pastebin.com/7sNbEKeF
      • tedward
        pastebin including output from both windows & linux runs: https://paste.ee/p/zg44b
      • here, i've grepped the above logs for the log line where it selects the subchannel: https://paste.ee/p/OYTbs
      • you can see that in linux it selects pretty randomly from indexs 0-3
      • and in windows it mostly selects index 1, sometimes 0
      • btw, we're only making 3 grpc requests in each of these runs, so i'm not sure why it hits the round_robin.cc select code so many times
      • g3p0
        Poking through the logs, in windows land we are seeing that the subchannel lists and channels are being canceled and unreffed, but the same code on linux land just works.
      • notcarl joined the channel
      • nathanielmanista
        d3p0, tedward: apologies for passing you along like a hot potato but we're beyond the frontiers of my familiarity with the code. I'm trying to find you another team member to come along. :-)
      • g3p0
        Thanks!
      • notcarl
        well, its friday afternoon in the bay, you might need to start a thread in our support forum
      • g3p0
        Always but who knows who will show up.
      • I think we traced it down to the round_robin policy doesn't exactly work in windows for some reason.
      • In linux land it appears to be round_robin, even though it is using pick_first. It just happens quicker so it seems like it is balanced.
      • notcarl
        rr is pretty balanced, every new rpc gets a new subchannel
      • well, the next one in the list anyways
      • g3p0
        Yeah, but on windows land the channels and channel_lists when using the rr policy end up being cancled and unreffed
      • notcarl
        cancelled because the connection is torn down, or because it was never valid to begin with?
      • g3p0
        windows and linux logs here https://paste.ee/p/OYTbs