Project

General

Profile

Bug #53611

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

Added by xinyu wang 12 months ago. Updated 3 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.

History

#1 Updated by Venky Shankar 11 months ago

  • Category set to Correctness/Safety
  • Status changed from New to Triaged
  • Assignee set to Milind Changire
  • Target version set to v17.0.0
  • Backport set to pacific,octopus

#2 Updated by Venky Shankar 11 months ago

  • Source set to Community (dev)

#3 Updated by Patrick Donnelly 5 months ago

  • Target version deleted (v17.0.0)

#4 Updated by Venky Shankar 3 months ago

  • Target version set to v18.0.0
  • Backport changed from pacific,octopus to pacific,quincy

Also available in: Atom PDF