Project

General

Profile

Actions

Bug #20452

closed

Adding pool with id smaller then existing data pool ids breaks MDSMap::is_data_pool

Added by Jan Fajerski almost 7 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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.

PR: https://github.com/ceph/ceph/pull/15982


Related issues 1 (0 open1 closed)

Copied to CephFS - Backport #20714: jewel: Adding pool with id smaller then existing data pool ids breaks MDSMap::is_data_poolRejectedActions
Actions #1

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.

Actions #2

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.

Actions #3

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
Actions #4

Updated by Jan Fajerski almost 7 years ago

  • Description updated (diff)
  • Status changed from New to Fix Under Review
Actions #6

Updated by Patrick Donnelly almost 7 years ago

  • Status changed from Fix Under Review to Resolved
Actions #7

Updated by Patrick Donnelly almost 7 years ago

  • Status changed from Resolved to Pending Backport
Actions #8

Updated by Nathan Cutler almost 7 years ago

@Patrick - backport to which stable versions?

Actions #9

Updated by Patrick Donnelly almost 7 years ago

Kraken is EOL right? Just jewel I think.

Actions #10

Updated by Nathan Cutler almost 7 years ago

  • Backport set to jewel

Kraken is soon-to-be-EOL, yes.

Actions #11

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
Actions #12

Updated by Patrick Donnelly about 6 years ago

  • Status changed from Pending Backport to Resolved
  • Backport deleted (jewel)
Actions

Also available in: Atom PDF