--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/Aug/2022 06:03:43] Enable_prometheus_admin_api step1 : Discover the prometheus pod ________________________________________________________________________________ [05/Aug/2022 06:03:43] - 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 (514 lines): ----- output ----- { "apiVersion": "v1", "items": [ { "apiVersion": "v1", "kind": "Pod", "metadata": { "annotations": { "kubectl.kubernetes.io/default-container": "prometheus" }, "creationTimestamp": "2022-08-04T18:19:25Z", "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.35.0", "controller-revision-hash": "prometheus-prometheus-operator-kube-p-prometheus-7c7f5b567c", "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": "e731ea74-90e0-45ce-b85b-169fd1880eb9" } ], "resourceVersion": "39904625", "uid": "50e0364a-bcf4-4cba-b6c5-6ebba05761f4" }, "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=/", "--web.config.file=/etc/prometheus/web_config/web-config.yaml" ], "image": "quay.io/prometheus/prometheus:v2.35.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": { "path": "/-/ready", [...] ] }, "status": { "conditions": [ { "lastProbeTime": null, "lastTransitionTime": "2022-08-04T18:20:00Z", "status": "True", "type": "Initialized" }, { "lastProbeTime": null, "lastTransitionTime": "2022-08-04T18:20:30Z", "status": "True", "type": "Ready" }, { "lastProbeTime": null, "lastTransitionTime": "2022-08-04T18:20:30Z", "status": "True", "type": "ContainersReady" }, { "lastProbeTime": null, "lastTransitionTime": "2022-08-04T18:19:25Z", "status": "True", "type": "PodScheduled" } ], "containerStatuses": [ { "containerID": "containerd://b5f19a1183acc6e92427df6a07f345e064ce6b1a64b1862cdf4bddb8f4e1a6b9", "image": "quay.io/prometheus-operator/prometheus-config-reloader:v0.56.3", "imageID": "quay.io/prometheus-operator/prometheus-config-reloader@sha256:d0aee3f816725cb130121f3ea67979160bdc79fe616efa077c9b15cab4689504", "lastState": {}, "name": "config-reloader", "ready": true, "restartCount": 0, "started": true, "state": { "running": { "startedAt": "2022-08-04T18:20:06Z" } } }, { "containerID": "containerd://04d2177c5c367aa945d62302fed8c8c9965f0039d2391b9ca742c86c315b12d3", "image": "quay.io/prometheus/prometheus:v2.35.0", "imageID": "quay.io/prometheus/prometheus@sha256:2acfab1966f0dbecc6afbead13eca7f47062cfe8726bb9db25e39e0c0b88e9c3", "lastState": {}, "name": "prometheus", "ready": true, "restartCount": 0, "started": true, "state": { "running": { "startedAt": "2022-08-04T18:20:06Z" } } } ], "hostIP": "10.142.0.122", "initContainerStatuses": [ { "containerID": "containerd://002e37f7b83d9eedec1247c2c40582b83e60e407d7d1960816a641bb41649b11", "image": "quay.io/prometheus-operator/prometheus-config-reloader:v0.56.3", "imageID": "quay.io/prometheus-operator/prometheus-config-reloader@sha256:d0aee3f816725cb130121f3ea67979160bdc79fe616efa077c9b15cab4689504", "lastState": {}, "name": "init-config-reloader", "ready": true, "restartCount": 0, "state": { "terminated": { "containerID": "containerd://002e37f7b83d9eedec1247c2c40582b83e60e407d7d1960816a641bb41649b11", "exitCode": 0, "finishedAt": "2022-08-04T18:20:00Z", "reason": "Completed", "startedAt": "2022-08-04T18:20:00Z" } } } ], "phase": "Running", "podIP": "10.0.6.22", "podIPs": [ { "ip": "10.0.6.22" } ], "qosClass": "Burstable", "startTime": "2022-08-04T18:19:25Z" } } ], "kind": "List", "metadata": { "resourceVersion": "", "selfLink": "" } } --- stderr --- ________________________________________________________________________________ [05/Aug/2022 06:03:43] Enable_prometheus_admin_api step2 : Enable the API if disabled ________________________________________________________________________________ [05/Aug/2022 06:03:43] - INFO: REST API is enabled: True ________________________________________________________________________________ [05/Aug/2022 06:03:43] Enable_prometheus_admin_api post : Post method ________________________________________________________________________________ Setting result to PASS Task has been successfully stopped