Project

General

Profile

Bug #22841

Be resilient to PATH issues

Added by Alfredo Deza about 5 years ago. Updated almost 5 years ago.

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

0%

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

Description

In some situations the $PATH might not be set correctly, so executables will not be found when calling them from internal API's like the lsblk interface

root@e740d1b89a57:/# python
Python 2.7.12 (default, Dec  4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ceph_volume.util import disk
>>> disk.lsblk('/dev/sda2')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/ceph_volume/util/disk.py", line 113, in lsblk
    out, err, rc = process.call(command)
  File "/usr/lib/python2.7/dist-packages/ceph_volume/process.py", line 172, in call
    **kw
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
>>>
root@e740d1b89a57:/# which lsblk
/bin/lsblk

History

#1 Updated by Alfredo Deza almost 5 years ago

  • Status changed from New to Fix Under Review

#2 Updated by Alfredo Deza almost 5 years ago

  • Status changed from Fix Under Review to Pending Backport

merged commit d14e4e6 into master

#3 Updated by Alfredo Deza almost 5 years ago

  • Status changed from Pending Backport to Resolved

Backport https://github.com/ceph/ceph/pull/20716

merged commit 15c4a1a into luminous

Also available in: Atom PDF