ansible / ansible/eda-server-operator
Kind=PodList err-Index with name field:status.phase does not exist
- Dominant language
- Jinja
- Stars
- 45
- Forks
- 41
- Avg merge
- 2d
- Merged PRs (30d)
- 1
Description
Error that field:status.phase does not exist
KUBE Information
kubectl version
Client Version: v1.29.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.12+vmware.1
Error Log Snippet
TASK [Get the postgres pod information] ****************************************
task path: /opt/ansible/roles/postgres/tasks/create_managed_postgres.yml:21
-------------------------------------------------------------------------------
{"level":"info","ts":1719495681.4041488,"logger":"logging_event_handler","msg":"[playbook task start]","name":"eda","namespace":"eda","gvk":"eda.ansible.com/v1alpha1, Kind=EDA","event_type":"playbook_on_task_start","job":"3076361852053160124","EventData.Name":"Get the postgres pod information"}
{"level":"info","ts":1719495683.3174007,"logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
--------------------------- Ansible Task StdOut -------------------------------
TASK [postgres : Wait for Database to initialize if managed DB] ****************
task path: /opt/ansible/roles/postgres/tasks/create_managed_postgres.yml:31
-------------------------------------------------------------------------------
{"level":"info","ts":1719495683.5076895,"logger":"logging_event_handler","msg":"[playbook task start]","name":"eda","namespace":"eda","gvk":"eda.ansible.com/v1alpha1, Kind=EDA","event_type":"playbook_on_task_start","job":"3076361852053160124","EventData.Name":"postgres : Wait for Database to initialize if managed DB"}
{"level":"info","ts":1719495685.1001055,"logger":"proxy","msg":"cache miss: /v1, Kind=PodList err-Index with name field:status.phase does not exist"}
Looks like we have what its looking for
kubectl get pods -n eda --field-selector status.phase=Running
NAME READY STATUS RESTARTS AGE
eda-operator-controller-manager-55d6fbf6dc-r6zkn 2/2 Running 0 10m
eda-postgres-0 1/1 Running 0 11h
eda-redis-5bc54f4b6d-rt5sd 1/1 Running 0 11h
I did notice in the play, the task is labeled
"Wait for Database to initialize if managed DB"
We are using an unmanaged DB, so I would expect that to skip
Contributor guide
Research direction
Start with /opt/ansible/roles/postgres/tasks/create_managed_postgres.yml, especially the tasks at lines 21 and 31, and reproduce the selector with kubectl get pods -n eda --field-selector status.phase=Running. Determine why the PodList index reports that status.phase does not exist and whether the managed-database condition is being skipped; done means the unmanaged-DB path no longer emits this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible, kubernetes, postgres
- Domain
- databases, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100