Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Streaming] node-meta is not filtering anymore when streaming is used #9730

Closed
pierresouchay opened this issue Feb 8, 2021 · 0 comments
Closed
Labels
theme/streaming Related to Streaming connections between server and client type/bug Feature does not function as expected

Comments

@pierresouchay
Copy link
Contributor

Overview of the Issue

In a similar way as #9695 streaming enabled nodes do not filter on node-meta anymore.

Reproduction Steps

consul agent -dev -hcl 'rpc{enable_streaming=true}' -hcl use_streaming_backend=true -hcl 'dns_config{ allow_stale=true, max_stale="3h", use_cache=true, "cache_max_age"="3h"}'

Run Query without streaming:

curl "http://localhost:8500/v1/health/service/consul?node-meta=os:unlikelyos&wait=1s"
[]

=> expected result => 0 nodes => OK

Run query with streaming:

curl "http://localhost:8500/v1/health/service/consul?node-meta=os:unlikelyos&wait=1s&index=13"
[
    {
        "Node": {
            "ID": "a12804aa-62d7-573e-b9d9-d0249a135f7c",
            "Node": "C02VM19CHTDD",
            "Address": "127.0.0.1",
            "Datacenter": "dc1",
            "TaggedAddresses": {
                "lan": "127.0.0.1",
                "lan_ipv4": "127.0.0.1",
                "wan": "127.0.0.1",
                "wan_ipv4": "127.0.0.1"
            },
            "Meta": {
                "consul-network-segment": ""
            },
            "CreateIndex": 11,
            "ModifyIndex": 12
        },
        "Service": {
            "ID": "consul",
            "Service": "consul",
            "Tags": [],
            "Address": "",
            "Meta": {
                "non_voter": "false",
                "raft_version": "3",
                "read_replica": "false",
                "serf_protocol_current": "2",
                "serf_protocol_max": "5",
                "serf_protocol_min": "1",
                "version": "1.10.0"
            },
            "Port": 8300,
            "Weights": {
                "Passing": 1,
                "Warning": 1
            },
            "EnableTagOverride": false,
            "Proxy": {
                "MeshGateway": {},
                "Expose": {}
            },
            "Connect": {},
            "CreateIndex": 11,
            "ModifyIndex": 11
        },
        "Checks": [
            {
                "Node": "C02VM19CHTDD",
                "CheckID": "serfHealth",
                "Name": "Serf Health Status",
                "Status": "passing",
                "Notes": "",
                "Output": "Agent alive and reachable",
                "ServiceID": "",
                "ServiceName": "",
                "ServiceTags": [],
                "Type": "",
                "Definition": {},
                "CreateIndex": 11,
                "ModifyIndex": 11
            }
        ]
    }
]

=> Nodes are not filtered anymore (seen with Prometheus node filtering)

Note: this is still working with the new way of filtering

pierresouchay added a commit to criteo-forks/consul that referenced this issue Feb 8, 2021
@dnephin dnephin added theme/streaming Related to Streaming connections between server and client type/bug Feature does not function as expected labels Feb 8, 2021
criteoconsul pushed a commit to criteo-forks/consul that referenced this issue Apr 22, 2021
criteoconsul pushed a commit to criteo-forks/consul that referenced this issue Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/streaming Related to Streaming connections between server and client type/bug Feature does not function as expected
Projects
None yet
Development

No branches or pull requests

2 participants