--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/scratch/workspaces/workspace/pit-debug-tests-debug-other-tests-463-1679261215469-1550440051/pyrock ________________________________________________________________________________ [19/Mar/2023 21:30:01] Enable_prometheus_admin_api pre : N/A ________________________________________________________________________________ ________________________________________________________________________________ [19/Mar/2023 21:30:01] Enable_prometheus_admin_api step1 : Discover the prometheus pod ________________________________________________________________________________ [19/Mar/2023 21:30:01] - 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": "2023-03-19T21:22:06Z", "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.37.0", "controller-revision-hash": "prometheus-prometheus-operator-kube-p-prometheus-7c7999b4c9", "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": "cb3618ac-5064-49db-a04b-14203dd1afc6" } ], "resourceVersion": "514587150", "uid": "01e980d1-c9eb-4e11-9246-e6b008e0c9f0" }, "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.37.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": "2023-03-19T21:22:59Z", "status": "True", "type": "Initialized" }, { "lastProbeTime": null, "lastTransitionTime": "2023-03-19T21:26:47Z", "status": "True", "type": "Ready" }, { "lastProbeTime": null, "lastTransitionTime": "2023-03-19T21:26:47Z", "status": "True", "type": "ContainersReady" }, { "lastProbeTime": null, "lastTransitionTime": "2023-03-19T21:22:34Z", "status": "True", "type": "PodScheduled" } ], "containerStatuses": [ { "containerID": "containerd://97f2a6adb42abde7c9f2c20a70a6d7fa117397e44292b7caa35b92fc266f4ee1", "image": "quay.io/prometheus-operator/prometheus-config-reloader:v0.58.0", "imageID": "quay.io/prometheus-operator/prometheus-config-reloader@sha256:1a6125ca1f0eca550e86857608082738ba350bf60d6fbc8c55892318447fd5d8", "lastState": {}, "name": "config-reloader", "ready": true, "restartCount": 0, "started": true, "state": { "running": { "startedAt": "2023-03-19T21:23:02Z" } } }, { "containerID": "containerd://a931bf337c9a792f9882e25f8721e44b2c0d36ad5e9b785c0ab0b4e50ee77d17", "image": "quay.io/prometheus/prometheus:v2.37.0", "imageID": "quay.io/prometheus/prometheus@sha256:56e7f18e05dd567f96c05046519760b356f52450c33f6e0055a110a493a41dc4", "lastState": {}, "name": "prometheus", "ready": true, "restartCount": 0, "started": true, "state": { "running": { "startedAt": "2023-03-19T21:23:02Z" } } } ], "hostIP": "10.128.0.4", "initContainerStatuses": [ { "containerID": "containerd://42184414b4ceb42b688db2fee831d2d13b98f2fcce12131e69354447d53c8d01", "image": "quay.io/prometheus-operator/prometheus-config-reloader:v0.58.0", "imageID": "quay.io/prometheus-operator/prometheus-config-reloader@sha256:1a6125ca1f0eca550e86857608082738ba350bf60d6fbc8c55892318447fd5d8", "lastState": {}, "name": "init-config-reloader", "ready": true, "restartCount": 0, "state": { "terminated": { "containerID": "containerd://42184414b4ceb42b688db2fee831d2d13b98f2fcce12131e69354447d53c8d01", "exitCode": 0, "finishedAt": "2023-03-19T21:22:52Z", "reason": "Completed", "startedAt": "2023-03-19T21:22:52Z" } } } ], "phase": "Running", "podIP": "10.108.1.22", "podIPs": [ { "ip": "10.108.1.22" } ], "qosClass": "Burstable", "startTime": "2023-03-19T21:22:34Z" } } ], "kind": "List", "metadata": { "resourceVersion": "", "selfLink": "" } } --- stderr --- ________________________________________________________________________________ [19/Mar/2023 21:30:02] Enable_prometheus_admin_api step2 : Enable the API if disabled ________________________________________________________________________________ [19/Mar/2023 21:30:02] - INFO: REST API is enabled: True ________________________________________________________________________________ [19/Mar/2023 21:30:02] Enable_prometheus_admin_api post : Post method ________________________________________________________________________________ Setting result to PASS Task has been successfully stopped