Project

General

Profile

Bug #23805

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

Added by Nathan Cutler over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
04/20/2018
Due date:
% Done:

0%

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

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

Copied to Ceph - Backport #24979: luminous: ceph-helpers.sh tries to use dirname without mandatory parameter Resolved

History

#1 Updated by Nathan Cutler over 1 year ago

  • Backport set to luminous

#2 Updated by Nathan Cutler over 1 year ago

  • Status changed from New to Need Review

#3 Updated by Nathan Cutler over 1 year ago

  • Status changed from Need Review to Pending Backport

#4 Updated by Nathan Cutler over 1 year ago

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

#5 Updated by Nathan Cutler about 1 year ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF