Project

General

Profile

Actions

Bug #36327

closed

Broken parameter parsing in /etc/ceph/rbdmap

Added by Marc Schöchlin over 5 years ago. Updated about 5 years ago.

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

0%

Source:
Community (dev)
Tags:
Backport:
luminous,mimic
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I would like to add a queue_depth parameter on mapping rbd devices using /etc/ceph/rbdmap.

rbd map rbd_hdd/foo-001_srv --id foo --keyring /etc/ceph/ceph.client.foo.keyring --options lock_on_read,queue_depth=1024

Add added the following line to g /etc/ceph/rbdmap:

rbd_hdd/archiv-001_srv id=archiv,keyring=/etc/ceph/ceph.client.archiv.keyring,options=lock_on_read,queue_depth=1024

This does not work, because the options parsing of "/usr/bin/rbdmap" (https://github.com/ceph/ceph/blob/master/src/rbdmap) is too simple.
Placing a "set -x" before the "rbd map" command results to a broken command:

# rbdmap map
++ rbd map rbd_hdd/foo-001_srv --id foo --keyring /etc/ceph/ceph.client.foo.keyring --options '"lock_on_read' --queue_depth '1024"'
+ MAP_RV='rbd: unrecognised option '\''--queue_depth'\'''
+ '[' 1 -eq 0 ']'
+ RET=1

Related issues 2 (0 open2 closed)

Copied to rbd - Backport #37925: mimic: Broken parameter parsing in /etc/ceph/rbdmapResolvedAshish SinghActions
Copied to rbd - Backport #37926: luminous: Broken parameter parsing in /etc/ceph/rbdmapResolvedPrashant DActions
Actions #1

Updated by Marc Schöchlin over 5 years ago

Wrote a (hopefully better) parsing function.

Sent a pull request: https://github.com/ceph/ceph/pull/24446

Actions #2

Updated by Marc Schöchlin over 5 years ago

Test expressions:

    PARAMS="options='lock_on_read,queue_depth=1024',id=archiv,keyring=/etc/ceph/ceph.client.archiv.keyring" 
    echo -e " ORIGINAL PARAM: >>>$PARAMS<<<\nCONVERTED PARAM: >>>$(create_cmd_params "$PARAMS")<<<" 

    PARAMS="id=archiv,keyring=/etc/ceph/ceph.client.archiv.keyring,options='lock_on_read,queue_depth=1024'" 
    echo -e " ORIGINAL PARAM: >>>$PARAMS<<<\nCONVERTED PARAM: >>>$(create_cmd_params "$PARAMS")<<<" 

    PARAMS="" 
    echo -e " ORIGINAL PARAM: >>>$PARAMS<<<\nCONVERTED PARAM: >>>$(create_cmd_params "$PARAMS")<<<" 

    PARAMS=",keyring=/etc/ceph/ceph.client.archiv.keyring,options='lock_on_read,queue_depth=1024',id=archiv," 
    echo -e " ORIGINAL PARAM: >>>$PARAMS<<<\nCONVERTED PARAM: >>>$(create_cmd_params "$PARAMS")<<<" 

    PARAMS="'keyring'=/etc/ceph/ceph.client.archiv.keyring,options='lock_on_read,queue_depth=1024',id=archiv," 
    echo -e " ORIGINAL PARAM: >>>$PARAMS<<<\nCONVERTED PARAM: >>>$(create_cmd_params "$PARAMS")<<<" 

    PARAMS="--keyring=/etc/ceph/ceph.client.archiv.keyring,options='lock_on_read,queue_depth=1024',id=archiv, # a comment" 
    echo -e " ORIGINAL PARAM: >>>$PARAMS<<<\nCONVERTED PARAM: >>>$(create_cmd_params "$PARAMS")<<<" 

Actions #3

Updated by Greg Farnum over 5 years ago

  • Project changed from Ceph to rbd
  • Category deleted (common)
Actions #4

Updated by Mykola Golub over 5 years ago

  • Status changed from New to Fix Under Review
Actions #5

Updated by Jason Dillaman over 5 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Target version deleted (v12.2.9)
  • Backport set to luminous,mimic
Actions #6

Updated by Nathan Cutler over 5 years ago

  • Copied to Backport #37925: mimic: Broken parameter parsing in /etc/ceph/rbdmap added
Actions #7

Updated by Nathan Cutler over 5 years ago

  • Copied to Backport #37926: luminous: Broken parameter parsing in /etc/ceph/rbdmap added
Actions #8

Updated by Nathan Cutler about 5 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF