orb icon indicating copy to clipboard operation
orb copied to clipboard

Policies are being applied without agent being subscribed to any group

Open manrodrigues opened this issue 3 years ago • 2 comments

Running tests in parallelized processes, i'm getting a intermittent problem (it fails in different scenarios and I cannot identify the pattern yet).

The problem is: The agent is not subscribed to the group with the correct tags, but policies applied to that group are applied on the agent.

I'm opening this issue to investigate it better.. I will update or even close the card when I get more information.

PS: I never had this problem running the same scenarios without multiple process.

{
    "id": "fd86f3ca-8b01-418f-b32e-b8435f477c6f",
    "name": "test_agent_name_NvrLADCDHB",
    "state": "online",
    "channel_id": "7b90080e-db38-40b2-b8e0-278ca8bf3358",
    "agent_tags": {},
    "orb_tags": {
        "test_tag_yusFBQ": "test_tag_TUfl"
    },
    "agent_metadata": {
        "backends": {
            "pktvisor": {
                "data": {
                    "taps": {
                        "default_pcap": {
                            "config": {
                                "iface": "wlo1"
                            },
                            "input_type": "pcap",
                            "interface": "visor.module.input/1.0"
                        }
                    }
                },
                "version": "4.2.0-develop-7afa4bb"
            }
        },
        "orb_agent": {
            "version": "0.16.0-develop"
        }
    },
    "last_hb_data": {
        "backend_state": {
            "pktvisor": {
                "state": "running"
            }
        },
        "group_state": {},
        "policy_state": {
            "be88bdc7-cd52-4df2-9550-e9b58312edef": {
                "datasets": [
                    "31a22e29-5885-452c-a06d-f447e3031695"
                ],
                "name": "test_policy_name_xqGjssHGob",
                "state": "running"
            },
            "cfcd2573-4191-475d-8a7b-ff53e18946f8": {
                "datasets": [
                    "6c50f6ea-4918-416d-ab95-df9df935c680"
                ],
                "name": "test_policy_name_EUMVTDQvTx",
                "state": "running"
            }
        }
    },
    "ts_created": "2022-06-01T15:37:18.6281Z",
    "ts_last_hb": "2022-06-01T15:41:23.299521Z"
}

image.png

image.png

image.png

image.png

image.png

image.png

Check that logs do not contain any "RPC subscription" message, but contain the log of policies.

Full logs:

https://app.zenhub.com/files/340174841/4567c5c5-dbe5-475b-a779-0d7961771143/download

manrodrigues avatar Jun 01 '22 15:06 manrodrigues

I'm still seeing this behavior using this agent image: docker pull ns1labs/orb-agent:0.16.0-develop-8679ef0

image

{
    "id": "1168930c-f16f-4a09-a73a-8348b69f4330",
    "name": "test_agent_name_rDstuuScGX",
    "state": "online",
    "channel_id": "b6150da8-8429-4bfa-b0d2-9612aa5cafac",
    "agent_tags": {},
    "orb_tags": {
        "test_tag_HPRCQB": "test_tag_kHww",
        "test_tag_LAQObR": "test_tag_MrYp"
    },
    "agent_metadata": {
        "backends": {
            "pktvisor": {
                "data": {
                    "taps": {
                        "default_pcap": {
                            "config": {
                                "iface": "wlo1"
                            },
                            "input_type": "pcap",
                            "interface": "visor.module.input/1.0"
                        }
                    }
                },
                "version": "4.2.0-develop-5f5b487"
            }
        },
        "orb_agent": {
            "version": "0.16.0-develop-8679ef0"
        }
    },
    "last_hb_data": {
        "backend_state": {
            "pktvisor": {
                "state": "running"
            }
        },
        "group_state": {},
        "policy_state": {
            "79ee8e2f-9c25-4be4-86b2-a3f0942d0b7d": {
                "datasets": [
                    "bb5068ee-5f27-4b5b-bd22-d45cd420c109"
                ],
                "name": "test_policy_name_bKztpDGPBd",
                "state": "running"
            }
        }
    },
    "ts_created": "2022-06-23T14:56:36.032035Z",
    "ts_last_hb": "2022-06-23T15:05:48.589568Z"
}

Full logs:

1168930c-f16f-4a09-a73a-8348b69f4330.log

manrodrigues avatar Jun 23 '22 15:06 manrodrigues

This lost priority since the MQTT issues were solved, we will keep this in Icebox if this ever re-occurs.

lpegoraro avatar Jul 29 '22 18:07 lpegoraro