Project

General

Profile

Actions

Bug #53611

open

mds,client: can not identify pool id if pool name is positive integer when set layout.pool

Added by xinyu wang over 2 years ago. Updated 8 months ago.

Status:
Triaged
Priority:
Normal
Category:
Correctness/Safety
Target version:
-
% Done:

0%

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

Description

    int64_t pool;
    try {
      pool = boost::lexical_cast<unsigned>(tmp);
      if (!osdmap->have_pg_pool(pool))
        return -ENOENT;
    } catch (boost::bad_lexical_cast const&) {
      pool = osdmap->lookup_pg_pool_name(tmp);
      if (pool < 0) {
        return -ENOENT;
      }
    }

Client and MDS will check data pool based on the above code.
If pool name is a positive integer and can be cast to unsigned.
And then, use this name as id to ckeck the pool in osdmap.
If there is no pool with this id, it will return -ENOENT and no longer check as a pool name.

Actions

Also available in: Atom PDF