postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

pgo df cannot find cluster as specified

Open guineveresaenger opened this issue 8 years ago • 4 comments

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)) 🦉  

guineveresaenger avatar May 24 '18 22:05 guineveresaenger

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.

xenophenes avatar May 31 '18 14:05 xenophenes

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.

pmereddy1 avatar May 31 '18 15:05 pmereddy1

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.

jmccormick2001 avatar Jun 01 '18 23:06 jmccormick2001

Using a fresh test cluster, the df command now works and I cannot reproduce the error. Thank you!

guineveresaenger avatar Jun 04 '18 21:06 guineveresaenger