--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 ________________________________________________________________________________ [28/May/2023 05:49:19] Enable_prometheus_admin_api pre : N/A ________________________________________________________________________________ ________________________________________________________________________________ [28/May/2023 05:49:19] Enable_prometheus_admin_api step1 : Discover the prometheus pod ________________________________________________________________________________ [28/May/2023 05:49:19] - 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 (521 lines): ----- output ----- { "apiVersion": "v1", "items": [ { "apiVersion": "v1", "kind": "Pod", "metadata": { "annotations": { "kubectl.kubernetes.io/default-container": "prometheus", "seccomp.security.alpha.kubernetes.io/pod": "runtime/default" }, "creationTimestamp": "2023-05-27T02:43:54Z", "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.44.0", "controller-revision-hash": "prometheus-prometheus-operator-kube-p-prometheus-7b495c798d", "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": "af636164-e309-4214-abfb-69e4f4ed19ff" } ], "resourceVersion": "13148", "uid": "b55a2771-5d0a-4ee4-9b8c-fb9d45cf8f9a" }, "spec": { "automountServiceAccountToken": true, "containers": [ { "args": [ "--web.console.templates=/etc/prometheus/consoles", "--web.console.libraries=/etc/prometheus/console_libraries", "--config.file=/etc/prometheus/config_out/prometheus.env.yaml", "--web.enable-lifecycle", "--web.external-url=http://prometheus-operator-kube-p-prometheus.monitoring:9090", "--web.route-prefix=/", "--storage.tsdb.wal-compression", "--storage.tsdb.retention.time=10d", "--storage.tsdb.path=/prometheus", "--web.enable-admin-api", "--web.config.file=/etc/prometheus/web_config/web-config.yaml" ], "image": "quay.io/prometheus/prometheus:v2.44.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, [...] ] }, "status": { "conditions": [ { "lastProbeTime": null, "lastTransitionTime": "2023-05-27T02:44:02Z", "status": "True", "type": "Initialized" }, { "lastProbeTime": null, "lastTransitionTime": "2023-05-27T02:44:16Z", "status": "True", "type": "Ready" }, { "lastProbeTime": null, "lastTransitionTime": "2023-05-27T02:44:16Z", "status": "True", "type": "ContainersReady" }, { "lastProbeTime": null, "lastTransitionTime": "2023-05-27T02:43:54Z", "status": "True", "type": "PodScheduled" } ], "containerStatuses": [ { "containerID": "containerd://4e0492eedc96572770cda26ca3867f63e7d1e3e944e7df469febed0e32294b4e", "image": "quay.io/prometheus-operator/prometheus-config-reloader:v0.65.1", "imageID": "quay.io/prometheus-operator/prometheus-config-reloader@sha256:ca8684fd1e35ae73c9d497ea37cf5216a32e88f1d0e2eeab22247b532f1e508f", "lastState": {}, "name": "config-reloader", "ready": true, "restartCount": 0, "started": true, "state": { "running": { "startedAt": "2023-05-27T02:44:04Z" } } }, { "containerID": "containerd://a50708853e59822142229159e9554fd28cde1d9d505b6ebd4459fcb361d753eb", "image": "quay.io/prometheus/prometheus:v2.44.0", "imageID": "quay.io/prometheus/prometheus@sha256:0f0b7feb6f02620df7d493ad7437b6ee95b6d16d8d18799f3607124e501444b1", "lastState": {}, "name": "prometheus", "ready": true, "restartCount": 0, "started": true, "state": { "running": { "startedAt": "2023-05-27T02:44:03Z" } } } ], "hostIP": "10.142.15.204", "initContainerStatuses": [ { "containerID": "containerd://16d55558ebacd32aeba6aca6f977e469a6cb74d898030a197c9ea045a2d1d10f", "image": "quay.io/prometheus-operator/prometheus-config-reloader:v0.65.1", "imageID": "quay.io/prometheus-operator/prometheus-config-reloader@sha256:ca8684fd1e35ae73c9d497ea37cf5216a32e88f1d0e2eeab22247b532f1e508f", "lastState": {}, "name": "init-config-reloader", "ready": true, "restartCount": 0, "state": { "terminated": { "containerID": "containerd://16d55558ebacd32aeba6aca6f977e469a6cb74d898030a197c9ea045a2d1d10f", "exitCode": 0, "finishedAt": "2023-05-27T02:44:02Z", "reason": "Completed", "startedAt": "2023-05-27T02:44:02Z" } } } ], "phase": "Running", "podIP": "10.106.42.133", "podIPs": [ { "ip": "10.106.42.133" } ], "qosClass": "Burstable", "startTime": "2023-05-27T02:43:54Z" } } ], "kind": "List", "metadata": { "resourceVersion": "", "selfLink": "" } } --- stderr --- ________________________________________________________________________________ [28/May/2023 05:49:19] Enable_prometheus_admin_api step2 : Enable the API if disabled ________________________________________________________________________________ [28/May/2023 05:49:19] - INFO: REST API is enabled: True ________________________________________________________________________________ [28/May/2023 05:49:19] Enable_prometheus_admin_api post : Post method ________________________________________________________________________________ Setting result to PASS Task has been successfully stopped