Bug #20452
closedAdding pool with id smaller then existing data pool ids breaks MDSMap::is_data_pool
0%
Description
To reproduce:
Setup ceph cluster with mds but don't create fs yet (nor the necessary pools). Equivalent to the result of MON=1 MDS=2 OSD=1 CEPH_NUM_FS=0 ../src/vstart.sh -d -n
Then add three pools:
ceph osd pool create foo 8 8
ceph osd pool create fs_data 8 8
ceph osd pool create fs_metadata 8 8
Create a fs instance with the 2 latter pools (or any pools with id !=1):
ceph fs new fs fs_metadata fs_data
Add pool with id 1 to fs:
ceph fs add_data_pool fs 1
Now mount the fs and create a file:
sudo ceph-fuse fs
touch fs/file
touch: setting times of 'fs/file': No such file or directory
Other operations will fail too , e.g. setting xattr ceph.dir.layout.pool to pool 1. Creating directories works.
Updated by Jan Fajerski almost 7 years ago
removing pool 1 fixes the issues
ceph fs rm_data_pool fs 1
Creating files now works again.
Updated by Jan Fajerski almost 7 years ago
Seems like the implementation of MDSMap::is_data_pool makes a wrong assumption by using binary_search.
data_pools is a vector and add_data_pool does push_back to the vector, so it can't be assumed ordered.
Will propose a fix.
Updated by Jan Fajerski almost 7 years ago
- Subject changed from Adding pool with id 1 corrupts MDSMap to Adding pool with id smaller then existing data pool ids breaks MDSMap::is_data_pool
Updated by Jan Fajerski almost 7 years ago
- Description updated (diff)
- Status changed from New to Fix Under Review
Updated by Nathan Cutler almost 7 years ago
Updated by Patrick Donnelly almost 7 years ago
- Status changed from Fix Under Review to Resolved
Updated by Patrick Donnelly almost 7 years ago
- Status changed from Resolved to Pending Backport
Updated by Nathan Cutler almost 7 years ago
@Patrick - backport to which stable versions?
Updated by Patrick Donnelly almost 7 years ago
Kraken is EOL right? Just jewel I think.
Updated by Nathan Cutler almost 7 years ago
- Copied to Backport #20714: jewel: Adding pool with id smaller then existing data pool ids breaks MDSMap::is_data_pool added
Updated by Patrick Donnelly about 6 years ago
- Status changed from Pending Backport to Resolved
- Backport deleted (
jewel)