Project

General

Profile

Actions

Bug #23805

closed

ceph-helpers.sh tries to use dirname without mandatory parameter

Added by Nathan Cutler about 6 years ago. Updated over 5 years ago.

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

0%

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

Description

/home/smithfarm/ceph/qa/standalone/ceph-helpers.sh:161: teardown:  dirname
dirname: missing operand
Try 'dirname --help' for more information.

The problem is in this code:

    local pattern="$(sysctl -n $KERNCORE)" 
    # See if we have apport core handling
    if [ "${pattern:0:1}" = "|" ]; then
      # TODO: Where can we get the dumps?
      # Not sure where the dumps really are so this will look in the CWD
      pattern="" 
    fi
    # Local we start with core and teuthology ends with core
    if ls $(dirname $pattern) | grep -q '^core\|core$' ; then

pattern gets set to "", which triggers the error. Interestingly, if we do dirname "" explicitly, it works.


Related issues 1 (0 open1 closed)

Copied to Ceph - Backport #24979: luminous: ceph-helpers.sh tries to use dirname without mandatory parameterResolvedNathan CutlerActions
Actions #1

Updated by Nathan Cutler about 6 years ago

  • Backport set to luminous
Actions #2

Updated by Nathan Cutler about 6 years ago

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

Updated by Nathan Cutler almost 6 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #4

Updated by Nathan Cutler almost 6 years ago

  • Copied to Backport #24979: luminous: ceph-helpers.sh tries to use dirname without mandatory parameter added
Actions #5

Updated by Nathan Cutler over 5 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF