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

pgo show pvc does not work from non-root location

Open pmereddy1 opened this issue 8 years ago • 3 comments

Describe the bug A clear and concise description of what the bug is. pgo show pvc does not work from non-root location

To Reproduce Steps to reproduce the behavior: pgo show pvc test340-2-xlog --pvc-root / //pgdata// //pgdata//lost+found //pgdata//test340-2-wal //pgdata//test340-2-wal/000000010000000000000002 //pgdata//test340-2-wal/000000010000000000000001 //pgdata//test340-2-wal/000000010000000000000003 Mac2018:quickstart ford$ Mac2018:quickstart ford$ pgo show pvc test340-2-xlog --pvc-root /pgdata/test340-2-wal /find: '/pgdata//pgdata/test340-2-wal': No such file or directory Mac2018:quickstart ford$ pgo show pvc test340-2-xlog --pvc-root /pgdata/test340-2-wal/ /find: '/pgdata//pgdata/test340-2-wal/': No such file or directory Mac2018:quickstart ford$ pgo show pvc test340-2-xlog --pvc-root '/pgdata/test340-2-wal/' /find: '/pgdata//pgdata/test340-2-wal/': No such file or directory

However, this works

pgo show pvc test340-2-xlog --pvc-root 'test340-2-wal/' //pgdata/test340-2-wal/ //pgdata/test340-2-wal/000000010000000000000002 //pgdata/test340-2-wal/000000010000000000000001 //pgdata/test340-2-wal/000000010000000000000003

pgo show pvc --help shows --pvc-root string The PVC directory to list.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Please tell us about your environment:

  • Operating System:
  • Where is this running ( Local, Cloud Provider)
  • Storage being used (NFS, Hostpath, Gluster, etc):
  • Container Image Tag: 10.6-2.2.0
  • PostgreSQL Version:
  • Platform (Docker, Kubernetes, OpenShift):
  • Platform Version: OCP-3.11

Additional context Add any other context about the problem here.

pmereddy1 avatar Nov 28 '18 14:11 pmereddy1

Remove pgdata and it should work. You don't need quotes.

cahoonpwork avatar Nov 28 '18 14:11 cahoonpwork

Correct. Absolute path other than / was not working because of the automatic prefixing of pgdata. It was not clear in the help of pgo show pvc command

pmereddy1 avatar Nov 28 '18 17:11 pmereddy1

I added a new example to the 'pgo show pvc' CLI help, but this will probably be replaced soon with a 'pgo show volume' command that will be probably more useful to people for poking into mounted volumes.

jmccormick2001 avatar Jan 12 '19 22:01 jmccormick2001