--Task-- name: Enable_prometheus_admin_api enabled: True class_name: EnablePrometheusAdminAPI source_name: controller source_namespace: >default< target_name: controller target_namespace: >default< start: 0 stop: None timeout: no timeout loop: False interval: None dependencies: [] wait_for: [] options: {} group_name: None Current dir: /mnt/disks/data/xslou/lodestar-fork/pyrock ________________________________________________________________________________ [05/Feb/2023 17:01:39] Enable_prometheus_admin_api pre : N/A ________________________________________________________________________________ ________________________________________________________________________________ [05/Feb/2023 17:01:39] Enable_prometheus_admin_api step1 : Discover the prometheus pod ________________________________________________________________________________ [05/Feb/2023 17:01:39] - INFO: Discovering prometheus pods [loop_until]: kubectl --namespace=monitoring get pods --output json --field-selector metadata.name=prometheus-prometheus-operator-kube-p-prometheus-0 [loop_until]: (max_time=180, interval=5, expected_rc=[0] [loop_until]: OK (rc = 0) --- stdout --- [print_head_tail]: Print head (100 lines) and tail (100 lines) of input string (515 lines): ----- output ----- { "apiVersion": "v1", "items": [ { "apiVersion": "v1", "kind": "Pod", "metadata": { "annotations": { "kubectl.kubernetes.io/default-container": "prometheus" }, "creationTimestamp": "2023-02-03T21:04:23Z", "generateName": "prometheus-prometheus-operator-kube-p-prometheus-", "labels": { "app.kubernetes.io/instance": "prometheus-operator-kube-p-prometheus", "app.kubernetes.io/managed-by": "prometheus-operator", "app.kubernetes.io/name": "prometheus", "app.kubernetes.io/version": "2.41.0", "controller-revision-hash": "prometheus-prometheus-operator-kube-p-prometheus-69549d9cf8", "operator.prometheus.io/name": "prometheus-operator-kube-p-prometheus", "operator.prometheus.io/shard": "0", "prometheus": "prometheus-operator-kube-p-prometheus", "statefulset.kubernetes.io/pod-name": "prometheus-prometheus-operator-kube-p-prometheus-0" }, "name": "prometheus-prometheus-operator-kube-p-prometheus-0", "namespace": "monitoring", "ownerReferences": [ { "apiVersion": "apps/v1", "blockOwnerDeletion": true, "controller": true, "kind": "StatefulSet", "name": "prometheus-prometheus-operator-kube-p-prometheus", "uid": "a1760618-e57a-4a79-ae3f-55f53fe4d922" } ], "resourceVersion": "15492", "uid": "9746d7ae-05c6-4cd0-a2dd-63802ff732db" }, "spec": { "automountServiceAccountToken": true, "containers": [ { "args": [ "--web.console.templates=/etc/prometheus/consoles", "--web.console.libraries=/etc/prometheus/console_libraries", "--storage.tsdb.retention.time=10d", "--config.file=/etc/prometheus/config_out/prometheus.env.yaml", "--storage.tsdb.path=/prometheus", "--web.enable-lifecycle", "--web.enable-admin-api", "--web.external-url=http://prometheus-operator-kube-p-prometheus.monitoring:9090", "--web.route-prefix=/", "--storage.tsdb.wal-compression", "--web.config.file=/etc/prometheus/web_config/web-config.yaml" ], "image": "quay.io/prometheus/prometheus:v2.41.0", "imagePullPolicy": "IfNotPresent", "livenessProbe": { "failureThreshold": 6, "httpGet": { "path": "/-/healthy", "port": "http-web", "scheme": "HTTP" }, "periodSeconds": 5, "successThreshold": 1, "timeoutSeconds": 3 }, "name": "prometheus", "ports": [ { "containerPort": 9090, "name": "http-web", "protocol": "TCP" } ], "readinessProbe": { "failureThreshold": 3, "httpGet": { "path": "/-/ready", "port": "http-web", "scheme": "HTTP" }, "periodSeconds": 5, "successThreshold": 1, "timeoutSeconds": 3 }, "resources": {}, "securityContext": { "allowPrivilegeEscalation": false, "capabilities": { "drop": [ "ALL" ] }, "readOnlyRootFilesystem": true }, "startupProbe": { "failureThreshold": 60, "httpGet": { [...] ] }, "status": { "conditions": [ { "lastProbeTime": null, "lastTransitionTime": "2023-02-03T21:04:42Z", "status": "True", "type": "Initialized" }, { "lastProbeTime": null, "lastTransitionTime": "2023-02-03T21:04:55Z", "status": "True", "type": "Ready" }, { "lastProbeTime": null, "lastTransitionTime": "2023-02-03T21:04:55Z", "status": "True", "type": "ContainersReady" }, { "lastProbeTime": null, "lastTransitionTime": "2023-02-03T21:04:23Z", "status": "True", "type": "PodScheduled" } ], "containerStatuses": [ { "containerID": "containerd://4c88c248d0694f630d371e3a019177c8c11a386735ff24b843f21b5c7d862449", "image": "quay.io/prometheus-operator/prometheus-config-reloader:v0.62.0", "imageID": "quay.io/prometheus-operator/prometheus-config-reloader@sha256:267b12235d10a810e49b2d40a3deda6256f92690b26997a199601a47283821b9", "lastState": {}, "name": "config-reloader", "ready": true, "restartCount": 0, "started": true, "state": { "running": { "startedAt": "2023-02-03T21:04:45Z" } } }, { "containerID": "containerd://59c583fd47f35caeaed97f37b5855f6a5cde2683ca9e8ad19105010aa16a01ab", "image": "quay.io/prometheus/prometheus:v2.41.0", "imageID": "quay.io/prometheus/prometheus@sha256:1a3e9a878e50cd339ae7cf5718fda08381dda2d4ccd28e94bbaa3190d1a566c2", "lastState": {}, "name": "prometheus", "ready": true, "restartCount": 0, "started": true, "state": { "running": { "startedAt": "2023-02-03T21:04:45Z" } } } ], "hostIP": "10.142.0.49", "initContainerStatuses": [ { "containerID": "containerd://0dd8f9269545cb58a9a95ca2010830bfea4fb4d621c1f4505e2a01c4aed59ba7", "image": "quay.io/prometheus-operator/prometheus-config-reloader:v0.62.0", "imageID": "quay.io/prometheus-operator/prometheus-config-reloader@sha256:267b12235d10a810e49b2d40a3deda6256f92690b26997a199601a47283821b9", "lastState": {}, "name": "init-config-reloader", "ready": true, "restartCount": 0, "state": { "terminated": { "containerID": "containerd://0dd8f9269545cb58a9a95ca2010830bfea4fb4d621c1f4505e2a01c4aed59ba7", "exitCode": 0, "finishedAt": "2023-02-03T21:04:41Z", "reason": "Completed", "startedAt": "2023-02-03T21:04:41Z" } } } ], "phase": "Running", "podIP": "10.56.49.4", "podIPs": [ { "ip": "10.56.49.4" } ], "qosClass": "Burstable", "startTime": "2023-02-03T21:04:23Z" } } ], "kind": "List", "metadata": { "resourceVersion": "", "selfLink": "" } } --- stderr --- ________________________________________________________________________________ [05/Feb/2023 17:01:39] Enable_prometheus_admin_api step2 : Enable the API if disabled ________________________________________________________________________________ [05/Feb/2023 17:01:39] - INFO: REST API is enabled: True ________________________________________________________________________________ [05/Feb/2023 17:01:39] Enable_prometheus_admin_api post : Post method ________________________________________________________________________________ Setting result to PASS Task has been successfully stopped