Bug 1478798 - [RBD]: "rbd trash list -a" looks for the default rbd pool
Summary: [RBD]: "rbd trash list -a" looks for the default rbd pool
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: RBD
Version: 3.0
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: 3.0
Assignee: Jason Dillaman
QA Contact: ceph-qe-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-07 06:53 UTC by Tejas
Modified: 2017-08-09 12:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-09 12:40:34 UTC
Embargoed:


Attachments (Terms of Use)

Description Tejas 2017-08-07 06:53:33 UTC
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 13:58:12 UTC
@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 06:55:28 UTC
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 11:42:17 UTC
@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.