pgo df cannot find cluster as specified
When I run pgo df mycluster on an existing cluster, the output is nothing found.
The help text indicates I used the correct command:
df displays disk status of Clusters
For example:
pgo df mycluster
pgo df --selector=env=research
.
Usage:
pgo df [flags]
Moreover, when I run the command on a cluster that doesn't exist, the output is the same.
Sample output:
@guin:postgres-operator ((3.0)) 🦉 pgo df mycluster
nothing found
@guin:postgres-operator ((3.0)) 🦉 pgo df -s name=mycluster
nothing found
@guin:postgres-operator ((3.0)) 🦉 pgo df thisclusterdoesnotexist
nothing found
@guin:postgres-operator ((3.0)) 🦉
I believe this must be specific to your setup - testing against a clean, freshly installed instance of the Operator version 3.0, the command works successfully as expected.
You may want to attempt re-deploying the Operator, or at least verifying the logs of the created cluster (mycluster) to ensure it was fully successfully created.
I ran into the same issue. Clusters created using operator 2.6 were not found by "pgo df" command. But, it did find the clusters created using 3.0 operator. Logs indicated the password for postgres user was incorrect.
this bug is due to a change I made in 3.0, that being the pvc names are now the same as the cluster name, and no longer include the '-pvc' suffix. What I've done is instead of assuming this naming convention, I instead read the PVC name from the pgcluster CRD which keeps the actual name being used for the PVC. This fix is merged into the autofail branch which will be used for the upcoming 3.1 release.
Using a fresh test cluster, the df command now works and I cannot reproduce the error. Thank you!