Bug 1478798 - [RBD]: "rbd trash list -a" looks for the default rbd pool
[RBD]: "rbd trash list -a" looks for the default rbd pool
Status: CLOSED NOTABUG
Product: Red Hat Ceph Storage
Classification: Red Hat
Component: RBD (Show other bugs)
3.0
Unspecified Linux
medium Severity medium
: rc
: 3.0
Assigned To: Jason Dillaman
ceph-qe-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-07 02:53 EDT by Tejas
Modified: 2017-08-09 08:40 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-09 08:40:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tejas 2017-08-07 02:53:33 EDT
Description of problem:
   the rbd trash commands hav a --all option to look for all the pools. This command fails as the default rbd pools is not available. "rbd" pool is not created by default in luminous, so we should not be checking for this, and work on all existing pools instead.

havoc ~]# rbd trash list -a
rbd: error opening default pool 'rbd'
Ensure that the default pool has been created or specify an alternate pool name.

havoc ~]# rados df
POOL_NAME           USED OBJECTS CLONES COPIES MISSING_ON_PRIMARY UNFOUND DEGRADED RD_OPS RD    WR_OPS WR    
.rgw.root           1113       4      0     12                  0       0        0    108 73728      4  4096 
default.rgw.control    0       8      0     24                  0       0        0      0     0      0     0 
default.rgw.log        0     207      0    621                  0       0        0 194359  189M 129466     0 
default.rgw.meta       0       0      0      0                  0       0        0      0     0      0     0 
p1                  2173      17      0     51                  0       0        0   1569 1275k     79 15360 
p2                     0       0      0      0                  0       0        0      0     0      0     0

havoc ~]# ceph -s
  cluster:
    id:     2057393b-ce5e-4821-9eb0-96519e801921
    health: HEALTH_OK
 
  services:
    mon: 3 daemons, quorum havoc,mustang,skytrain
    mgr: mustang(active)
    osd: 12 osds: 12 up, 12 in
    rgw: 1 daemon active
 
  data:
    pools:   6 pools, 160 pgs
    objects: 236 objects, 3286 bytes
    usage:   1313 MB used, 13345 GB / 13347 GB avail
    pgs:     160 active+clean


Version-Release number of selected component (if applicable):
ceph version 12.1.2-1.el7cp (b661348f156f148d764b998b65b90451f096cb27) luminous (rc)

How reproducible:
always
Comment 2 Jason Dillaman 2017-08-07 09:58:12 EDT
@Tejas: The "--all" command just includes internally trashed images instead of the default of only showing user-deleted images. There isn't a mechanism to list the trash of all pools. This is the same as if you just ran "rbd ls" w/o a default pool being available.
Comment 3 Tejas 2017-08-08 02:55:28 EDT
Jason,

   Thanks, got it.
But is there anything that can be done for the rbd cli for this error message.
"Ensure that the default pool has been created or specify an alternate pool name." The default pool is just not created in Luminous, so we see this error message is most of the commands.

Thanks,
Tejas
Comment 4 Jason Dillaman 2017-08-08 07:42:17 EDT
@Tejas: that error message was specifically added for Luminous to prevent confusion (and is correct). There is still a concept of a default pool -- it's just not auto-created for you anymore.

Note You need to log in before you can comment on or make changes to this bug.