Skip to content
This repository was archived by the owner on Oct 7, 2021. It is now read-only.
This repository was archived by the owner on Oct 7, 2021. It is now read-only.

agents with conflicting group membership #143

Open
@namachieli

Description

@namachieli

Looks like agents that match the criteria for multiple groups (one by subnet, the other by name) will flap between those groups.

You can see below the agent flip-flops between the groups "poc" and "poc2"


toddserver@toddserver$ todd groups
UUID            GROUP NAME
970cd6779780    poc2

toddserver@toddserver$ todd groups
UUID            GROUP NAME
970cd6779780    poc

toddserver@toddserver$ todd groups
UUID            GROUP NAME
970cd6779780    poc2

toddserver@toddserver$ todd objects group
LABEL   TYPE    SPEC
poc2    group   {poc2 [map[within_subnet:10.17.0.0/16]]}
poc     group   {poc [map[hostname:toddclient1]]}

toddserver@toddserver$ todd agents 970cd6779780
Agent UUID:  970cd67797805126393e808f8a9a5615292d06915720060d019299366ea428c8
Expires:  22s
Collector Summary: get_addresses, get_hostname
Facts:
{
    "Addresses": [
        "127.0.0.1",
        "::1",
        "10.17.9.50",
        "fe80::a00:27ff:fe46:e395",
        "172.17.0.1",
        "172.18.0.1",
        "fe80::42:23ff:feec:25ce",
        "fe80::2028:aaff:fe9a:9363",
        "fe80::bcdd:87ff:fe4c:dfd8",
        "fe80::1008:aaff:fe15:8f22",
        "fe80::94b5:55ff:fe92:a369"
    ],
    "Hostname": [
        "toddclient1"
    ]
}

Fix: Preferring a most specific match over a least specific, where hostname is preferred over all. In the case of an exact match conflict (like hostnames in two groups), prefer not changing group membership, requiring the admin to remediate.

Feature Request: Multi-group membership :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions