splunk / splunk-ansible

Ansible playbooks for configuring and managing Splunk Enterprise and Universal Forwarder deployments
357 stars 186 forks source link

CM wait for peer before applying bundle #861

Closed jmeixensperger closed 3 weeks ago

jmeixensperger commented 1 month ago

Issue was found in multisite scenario (2 indexer clusters). 1 cluster master fails with the following error:

2024-10-17 22:10:43,748 p=8688 u=ansible n=ansible | TASK [splunk_cluster_master : Apply cluster bundle] ****************************
2024-10-17 22:10:43,749 p=8688 u=ansible n=ansible | fatal: [localhost]: FAILED! => {
    "changed": false,
    "cmd": [
        "/opt/splunk/bin/splunk",
        "apply",
        "cluster-bundle",
        "-auth",
        "admin:Chang3d!",
        "--skip-validation",
        "--answer-yes"
    ],
    "delta": "0:00:00.750903",
    "end": "2024-10-17 22:10:43.718065",
    "failed_when_result": true,
    "rc": 0,
    "start": "2024-10-17 22:10:42.967162"
}

STDOUT:

Encountered some errors while applying the bundle.

STDERR:

Cannot set location using location=auto, error=Error code="Cgroups detection error", function=detectMount, error="Expected non-empty cpcontroller mount point in file=/proc/self/mountinfo"
WARNING: Server Certificate Hostname Validation is disabled. Please see server.conf/[sslConfig]/cliVerifyServerName for details.
Cannot apply bundle, because replication factor number of peers are not up

In multisite scenarios, the list of indexers in groups['splunk_indexers'] only includes the indexers in the site local to the CM.