]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
pybind/ceph_volume_client: use cephfs mkdirs api 42162/head
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 2 Jul 2021 16:07:34 +0000 (09:07 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 2 Jul 2021 17:16:11 +0000 (10:16 -0700)
commit80b635be63902048622e6a6093cac5ae8a324643
tree9286b24b16d135aff63487d46f5067166dbbc90c
parentca74598065096e6fcbd8433c8779a2be0c889351
pybind/ceph_volume_client: use cephfs mkdirs api

This _mkdir_p should never have worked as the first directory it tries
to stat/mkdir is "", the empty string. This causes an assertion in the
client. I'm not sure how this code ever functioned without causing
faults. They look like:

    2021-07-01 02:15:04.449 7f7612b5ab80  3 client.178735 statx enter (relpath  want 2047)

The assertion is caused by a C++ exception:

/usr/include/c++/8/string_view:172: constexpr const _CharT& std::basic_string_view<_CharT, _Traits>::operator[](std::basic_string_view<_CharT, _Traits>::size_type) const [with _CharT = char$_Traits = std::char_traits<char>; std::basic_string_view<_CharT, _Traits>::size_type = long unsigned int]: Assertion '__pos < this->_M_len' failed.
        Aborted (core dumped)

Where relpath is just the path passed to Client::stat.

This commit only applies to Pacific and older because master no longer
has this library.

Fixes: https://tracker.ceph.com/issues/51492
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 0fb05aea8a6e12c37a9b54641715a9a94ae1366f)
src/pybind/ceph_volume_client.py