Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ceph/files/, sys-cluster/ceph/
Date: Sat, 27 Jun 2020 20:00:40
Message-Id: 1593287954.e98b9305296a9f98342559a50e29834ad12b1c0b.chutzpah@gentoo
1 commit: e98b9305296a9f98342559a50e29834ad12b1c0b
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Sat Jun 27 07:47:57 2020 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 27 19:59:14 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e98b9305
7
8 sys-cluster/ceph-14.2.10: Version bump
9
10 This release includes the diskprediction code, so add the USE flag for
11 that. Also move from cmake-utils.eclass to cmake.eclass.
12
13 Copyright: Sony Interactive Entertainment Inc.
14 Package-Manager: Portage-2.3.103, Repoman-2.3.23
15 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
16
17 sys-cluster/ceph/Manifest | 1 +
18 sys-cluster/ceph/ceph-14.2.10.ebuild | 392 +++++++++++++++++++++
19 .../ceph/files/ceph-14.2.10-missing-includes.patch | 26 ++
20 .../ceph/files/ceph-14.2.10-python-warnings.patch | 31 ++
21 4 files changed, 450 insertions(+)
22
23 diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest
24 index f3022f2a86f..8c2cc97fb01 100644
25 --- a/sys-cluster/ceph/Manifest
26 +++ b/sys-cluster/ceph/Manifest
27 @@ -1,3 +1,4 @@
28 DIST ceph-12.2.12.tar.gz 77467762 BLAKE2B a5224432121db9ef49c1e22771d847399df2f7881cd9c2e185eca12096efb79d21578659d248eb5bae678924983d57452d370e23ab7e78663764d7bea834a461 SHA512 e694c9a8c1f9836c08fb74b54423bdc16d4900252e34643c56cf1a615d4dacddfb13df06a6a9f68bb9d438f5f07069ed358f9fa4b5a362640a3046f9c7722dcc
29 +DIST ceph-14.2.10.tar.gz 129274835 BLAKE2B b3f14897db478418b982281bf367a0c497cdfa8991a73e277b5582663c159550f3eff5bdc78a506e267eae8d59c59b19b8a9294802cb532fd7dfa9f612ed0e53 SHA512 5ec95b933a360183f89404446c5e1912a81853dfb1134bb8868bc6675a0185420c2bf1eba72308014a008f617aeb8733d51eb8c8eea5d472c32514cf483f4ea6
30 DIST ceph-14.2.9.tar.gz 128419205 BLAKE2B bace7469d9066a3da7320a0eb894013fae5b7139c15679dddae7df28c593a1029956234a1ba0d3bbdf1639e3a975aa776c695efefb915113a16099c80d563675 SHA512 0a26372d0037c32fe1d24be880e272fcce5089b02adfb0e791e0406155f6e66c913fa43762028f49c1fa3f30c6c8d819c521dd11702a37cc7040dfd3097c068e
31 DIST ceph-15.2.3.tar.gz 147807898 BLAKE2B ff5e9707cf05e22af718ee177cce87ea9913b1b78d7ba17589f2c7fdaea0a7a27dd1f7b8e9947a095ed74106b6b19258fd8be259100624032f3a6e8ce5243390 SHA512 0378365863bcb86e62d64a2eff91e39a91218eabfb126dae74185e1fe52b21a3d5113f885ddb8076551f2f069435e18b24417bf70f29f23e21fac7065e412912
32
33 diff --git a/sys-cluster/ceph/ceph-14.2.10.ebuild b/sys-cluster/ceph/ceph-14.2.10.ebuild
34 new file mode 100644
35 index 00000000000..b9bca5dfb76
36 --- /dev/null
37 +++ b/sys-cluster/ceph/ceph-14.2.10.ebuild
38 @@ -0,0 +1,392 @@
39 +# Copyright 1999-2020 Gentoo Authors
40 +# Distributed under the terms of the GNU General Public License v2
41 +
42 +EAPI=7
43 +PYTHON_COMPAT=( python3_{6,7,8} )
44 +CMAKE_MAKEFILE_GENERATOR=emake
45 +
46 +DISTUTILS_OPTIONAL=1
47 +
48 +inherit check-reqs bash-completion-r1 cmake-utils distutils-r1 flag-o-matic \
49 + multiprocessing python-r1 udev readme.gentoo-r1 toolchain-funcs \
50 + systemd tmpfiles
51 +
52 +if [[ ${PV} == *9999* ]]; then
53 + inherit git-r3
54 + EGIT_REPO_URI="https://github.com/ceph/ceph.git"
55 + SRC_URI=""
56 +else
57 + SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz"
58 + KEYWORDS="~amd64 ~ppc64"
59 +fi
60 +
61 +DESCRIPTION="Ceph distributed filesystem"
62 +HOMEPAGE="https://ceph.com/"
63 +
64 +LICENSE="Apache-2.0 LGPL-2.1 CC-BY-SA-3.0 GPL-2 GPL-2+ LGPL-2+ LGPL-2.1 LGPL-3 GPL-3 BSD Boost-1.0 MIT public-domain"
65 +SLOT="0"
66 +
67 +CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3)
68 +
69 +IUSE="babeltrace +cephfs custom-cflags diskprediction dpdk fuse grafana jemalloc
70 + kafka kerberos ldap libressl lttng +mgr numa +openssl rabbitmq +radosgw +ssl
71 + spdk system-boost systemd +tcmalloc test xfs zfs"
72 +IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})"
73 +
74 +COMMON_DEPEND="
75 + acct-group/ceph
76 + acct-user/ceph
77 + virtual/libudev:=
78 + app-arch/bzip2:=
79 + app-arch/lz4:=
80 + app-arch/snappy:=
81 + app-arch/zstd:=
82 + app-shells/bash:0
83 + app-misc/jq:=
84 + dev-libs/crypto++:=
85 + dev-libs/leveldb:=[snappy,tcmalloc(-)?]
86 + dev-libs/libaio:=
87 + dev-libs/libnl:3=
88 + dev-libs/libxml2:=
89 + dev-libs/xmlsec:=[!openssl?,!libressl?]
90 + dev-cpp/yaml-cpp:=
91 + dev-libs/nss:=
92 + dev-libs/protobuf:=
93 + net-dns/c-ares:=
94 + net-libs/gnutls:=
95 + sys-auth/oath-toolkit:=
96 + sys-apps/coreutils
97 + sys-apps/grep
98 + sys-apps/hwloc:=
99 + sys-apps/keyutils:=
100 + sys-apps/util-linux:=
101 + sys-apps/sed
102 + sys-apps/util-linux
103 + sys-libs/libcap-ng:=
104 + sys-libs/ncurses:0=
105 + sys-libs/zlib:=
106 + sys-process/numactl:=
107 + x11-libs/libpciaccess:=
108 + babeltrace? ( dev-util/babeltrace )
109 + fuse? ( sys-fs/fuse:0= )
110 + jemalloc? ( dev-libs/jemalloc:= )
111 + !jemalloc? ( >=dev-util/google-perftools-2.6.1:= )
112 + kafka? ( dev-libs/librdkafka:= )
113 + kerberos? ( virtual/krb5 )
114 + ldap? ( net-nds/openldap:= )
115 + lttng? ( dev-util/lttng-ust:= )
116 + rabbitmq? ( net-libs/rabbitmq-c:= )
117 + radosgw? (
118 + dev-libs/expat:=
119 + openssl? (
120 + dev-libs/openssl:=
121 + net-misc/curl:=[curl_ssl_openssl]
122 + )
123 + libressl? (
124 + dev-libs/libressl:=
125 + net-misc/curl:=[curl_ssl_libressl]
126 + )
127 + )
128 + ssl? (
129 + openssl? ( dev-libs/openssl:= )
130 + libressl? ( dev-libs/libressl:= )
131 + )
132 + system-boost? ( =dev-libs/boost-1.72*[threads,context,python,${PYTHON_USEDEP}] )
133 + xfs? ( sys-fs/xfsprogs:= )
134 + zfs? ( sys-fs/zfs:= )
135 + ${PYTHON_DEPS}
136 +"
137 +BDEPEND="
138 + amd64? ( dev-lang/yasm )
139 + x86? ( dev-lang/yasm )
140 + app-arch/cpio
141 + >=dev-util/cmake-3.5.0
142 + dev-python/cython[${PYTHON_USEDEP}]
143 + dev-python/sphinx
144 + dev-util/cunit
145 + dev-util/gperf
146 + dev-util/ragel
147 + dev-util/valgrind
148 + sys-apps/coreutils
149 + sys-apps/findutils
150 + sys-apps/grep
151 + sys-apps/sed
152 + sys-apps/which
153 + sys-devel/bc
154 + sys-devel/patch
155 + virtual/pkgconfig
156 + test? (
157 + dev-python/coverage[${PYTHON_USEDEP}]
158 + dev-python/virtualenv[${PYTHON_USEDEP}]
159 + dev-python/requests-mock[${PYTHON_USEDEP}]
160 + sys-apps/grep[pcre]
161 + sys-fs/btrfs-progs
162 + )
163 +"
164 +RDEPEND="${COMMON_DEPEND}
165 + app-admin/sudo
166 + net-misc/socat
167 + sys-apps/gptfdisk
168 + >=sys-apps/smartmontools-7.0
169 + sys-block/parted
170 + sys-fs/cryptsetup
171 + sys-fs/lsscsi
172 + sys-fs/lvm2[-device-mapper-only(-)]
173 + virtual/awk
174 + dev-python/bcrypt[${PYTHON_USEDEP}]
175 + dev-python/cherrypy[${PYTHON_USEDEP}]
176 + dev-python/flask[${PYTHON_USEDEP}]
177 + dev-python/jinja[${PYTHON_USEDEP}]
178 + dev-python/pecan[${PYTHON_USEDEP}]
179 + dev-python/prettytable[${PYTHON_USEDEP}]
180 + dev-python/pyopenssl[${PYTHON_USEDEP}]
181 + dev-python/requests[${PYTHON_USEDEP}]
182 + dev-python/werkzeug[${PYTHON_USEDEP}]
183 + mgr? (
184 + dev-python/more-itertools[${PYTHON_USEDEP}]
185 + dev-python/numpy[${PYTHON_USEDEP}]
186 + dev-python/pyjwt[${PYTHON_USEDEP}]
187 + dev-python/pyyaml[${PYTHON_USEDEP}]
188 + dev-python/routes[${PYTHON_USEDEP}]
189 + diskprediction? (
190 + $(python_gen_cond_dep '<sci-libs/scipy-1.4.0[${PYTHON_USEDEP}]' python3_{6,7})
191 + )
192 + sci-libs/scikits_learn[${PYTHON_USEDEP}]
193 + dev-python/six[${PYTHON_USEDEP}]
194 + )
195 +"
196 +# diskprediction needs older scipy not compatible with py38
197 +# bug #724438
198 +REQUIRED_USE="
199 + ${PYTHON_REQUIRED_USE}
200 + ?? ( jemalloc tcmalloc )
201 + ^^ ( openssl libressl )
202 + diskprediction? ( mgr !python_targets_python3_8 )
203 + kafka? ( radosgw )
204 + mgr? ( cephfs )
205 + rabbitmq? ( radosgw )
206 +"
207 +RESTRICT="!test? ( test )"
208 +
209 +# the tests need root access
210 +RESTRICT="test? ( userpriv )"
211 +
212 +# distribution tarball does not include everything needed for tests
213 +RESTRICT+=" test"
214 +
215 +# false positives unless all USE flags are on
216 +CMAKE_WARN_UNUSED_CLI="no"
217 +
218 +PATCHES=(
219 + "${FILESDIR}/ceph-12.2.0-use-provided-cpu-flag-values.patch"
220 + "${FILESDIR}/ceph-14.2.0-cflags.patch"
221 + "${FILESDIR}/ceph-12.2.4-boost-build-none-options.patch"
222 + "${FILESDIR}/ceph-13.2.0-cflags.patch"
223 + "${FILESDIR}/ceph-14.2.0-mgr-python-version.patch"
224 + "${FILESDIR}/ceph-14.2.5-no-virtualenvs.patch"
225 + "${FILESDIR}/ceph-13.2.2-dont-install-sysvinit-script.patch"
226 + "${FILESDIR}/ceph-14.2.0-dpdk-cflags.patch"
227 + "${FILESDIR}/ceph-14.2.0-link-crc32-statically.patch"
228 + "${FILESDIR}/ceph-14.2.0-cython-0.29.patch"
229 + "${FILESDIR}/ceph-14.2.3-dpdk-compile-fix-1.patch"
230 + "${FILESDIR}/ceph-14.2.4-python-executable.patch"
231 + "${FILESDIR}/ceph-14.2.4-undefined-behaviour.patch"
232 + "${FILESDIR}/ceph-14.2.10-missing-includes.patch"
233 +)
234 +
235 +check-reqs_export_vars() {
236 + CHECKREQS_DISK_BUILD="5200M"
237 + CHECKREQS_DISK_USR="510M"
238 +
239 + export CHECKREQS_DISK_BUILD CHECKREQS_DISK_USR
240 +}
241 +
242 +pkg_pretend() {
243 + check-reqs_export_vars
244 + check-reqs_pkg_pretend
245 +}
246 +
247 +pkg_setup() {
248 + python_setup
249 + check-reqs_export_vars
250 + check-reqs_pkg_setup
251 +}
252 +
253 +src_prepare() {
254 + cmake-utils_src_prepare
255 +
256 + if use system-boost; then
257 + find "${S}" -name '*.cmake' -or -name 'CMakeLists.txt' -print0 \
258 + | xargs --null sed -r \
259 + -e 's|Boost::|boost_|g' \
260 + -e 's|Boost_|boost_|g' \
261 + -e 's|[Bb]oost_boost|boost_system|g' -i || die
262 + fi
263 +
264 + sed -i -r "s:DESTINATION .+\\):DESTINATION $(get_bashcompdir)\\):" \
265 + src/bash_completion/CMakeLists.txt || die
266 +
267 + if ! use diskprediction; then
268 + rm -rf src/pybind/mgr/diskprediction_local || die
269 + fi
270 +
271 + # remove tests that need root access
272 + rm src/test/cli/ceph-authtool/cap*.t || die
273 +}
274 +
275 +ceph_src_configure() {
276 + local flag
277 + local mycmakeargs=(
278 + -DWITH_BABELTRACE=$(usex babeltrace)
279 + -DWITH_CEPHFS=$(usex cephfs)
280 + -DWITH_CEPHFS_SHELL=$(usex cephfs)
281 + -DWITH_DPDK=$(usex dpdk)
282 + -DWITH_DPDK=$(usex spdk)
283 + -DWITH_FUSE=$(usex fuse)
284 + -DWITH_LTTNG=$(usex lttng)
285 + -DWITH_GSSAPI=$(usex kerberos)
286 + -DWITH_GRAFANA=$(usex grafana)
287 + -DWITH_MGR=$(usex mgr)
288 + -DWITH_MGR_DASHBOARD_FRONTEND=OFF
289 + -DWITH_NUMA=$(usex numa)
290 + -DWITH_OPENLDAP=$(usex ldap)
291 + -DWITH_PYTHON3=3
292 + -DWITH_RADOSGW=$(usex radosgw)
293 + -DWITH_RADOSGW_AMQP_ENDPOINT=$(usex rabbitmq)
294 + -DWITH_RADOSGW_KAFKA_ENDPOINT=$(usex kafka)
295 + -DWITH_SSL=$(usex ssl)
296 + -DWITH_SYSTEMD=$(usex systemd)
297 + -DWITH_TESTS=$(usex test)
298 + -DWITH_XFS=$(usex xfs)
299 + -DWITH_ZFS=$(usex zfs)
300 + -DENABLE_SHARED="ON"
301 + -DALLOCATOR=$(usex tcmalloc 'tcmalloc' "$(usex jemalloc 'jemalloc' 'libc')")
302 + -DWITH_SYSTEM_BOOST=$(usex system-boost)
303 + -DBOOST_J=$(makeopts_jobs)
304 + -DWITH_RDMA=OFF
305 + -DWITH_TBB=OFF
306 + -DSYSTEMD_UNITDIR=$(systemd_get_systemunitdir)
307 + -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR=$(systemd_get_systemunitdir)
308 + -DEPYTHON_VERSION="${EPYTHON#python}"
309 + -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PN}-${PVR}"
310 + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
311 + -Wno-dev
312 + )
313 + if use amd64 || use x86; then
314 + for flag in ${CPU_FLAGS_X86[@]}; do
315 + mycmakeargs+=("$(usex cpu_flags_x86_${flag} "-DHAVE_INTEL_${flag^^}=1")")
316 + done
317 + fi
318 +
319 + rm -f "${BUILD_DIR:-${S}}/CMakeCache.txt" \
320 + || die "failed to remove cmake cache"
321 +
322 + cmake-utils_src_configure
323 +
324 + # bug #630232
325 + sed -i "s:\"${T//:\\:}/${EPYTHON}/bin/python\":\"${PYTHON}\":" \
326 + "${BUILD_DIR:-${S}}"/include/acconfig.h \
327 + || die "sed failed"
328 +}
329 +
330 +src_configure() {
331 + use custom-cflags || strip-flags
332 + ceph_src_configure
333 +}
334 +
335 +python_compile() {
336 + local CMAKE_USE_DIR="${S}"
337 + ceph_src_configure
338 +
339 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
340 + emake VERBOSE=1 clean
341 + emake VERBOSE=1 all
342 +
343 + # python modules are only compiled with "make install" so we need to do this to
344 + # prevent doing a bunch of compilation in src_install
345 + DESTDIR="${T}" emake VERBOSE=1 install
346 + popd >/dev/null || die
347 +}
348 +
349 +src_compile() {
350 + cmake-utils_src_make VERBOSE=1 all
351 +
352 + # we have to do this here to prevent from building everything multiple times
353 + python_copy_sources
354 + python_foreach_impl python_compile
355 +}
356 +
357 +src_test() {
358 + make check || die "make check failed"
359 +}
360 +
361 +python_install() {
362 + local CMAKE_USE_DIR="${S}"
363 + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die
364 + DESTDIR="${ED}" emake VERBOSE=1 install
365 + popd >/dev/null || die
366 +
367 + python_optimize
368 +}
369 +
370 +src_install() {
371 + cmake-utils_src_install
372 + python_foreach_impl python_install
373 +
374 + find "${ED}" -name '*.la' -type f -delete || die
375 +
376 + exeinto /usr/$(get_libdir)/ceph
377 + newexe "${BUILD_DIR}/bin/init-ceph" init-ceph
378 +
379 + insinto /etc/logrotate.d/
380 + newins "${FILESDIR}"/ceph.logrotate-r2 ${PN}
381 +
382 + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat
383 +
384 + fowners -R ceph:ceph /var/log/ceph
385 +
386 + newinitd "${FILESDIR}/rbdmap.initd" rbdmap
387 + newinitd "${FILESDIR}/${PN}.initd-r12" ${PN}
388 + newconfd "${FILESDIR}/${PN}.confd-r5" ${PN}
389 +
390 + insinto /etc/sysctl.d
391 + newins "${FILESDIR}"/sysctld 90-${PN}.conf
392 +
393 + use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc
394 +
395 + # units aren't installed by the build system unless systemd is enabled
396 + # so no point installing these with the USE flag disabled
397 + if use systemd; then
398 + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \
399 + "ceph-mds@.service"
400 +
401 + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \
402 + "ceph-osd@.service"
403 +
404 + fi
405 +
406 + udev_dorules udev/*.rules
407 + newtmpfiles "${FILESDIR}"/ceph-tmpfilesd ${PN}.conf
408 +
409 + readme.gentoo_create_doc
410 +
411 + python_setup
412 +
413 + # bug #630232
414 + sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph{,-crash} \
415 + || die "sed failed"
416 +
417 + python_fix_shebang "${ED}"/usr/{,s}bin/
418 +
419 + # python_fix_shebang apparently is not idempotent
420 + local shebang_regex='(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]'
421 + grep -r -E -l --null "${shebang_regex}" "${ED}"/usr/{s,}bin/ \
422 + | xargs --null --no-run-if-empty -- sed -i -r "s:${shebang_regex}:\1:" || die
423 +
424 + local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* )
425 + dostrip -x "${rados_classes[@]#${ED}}"
426 +}
427 +
428 +pkg_postinst() {
429 + readme.gentoo_print_elog
430 +}
431
432 diff --git a/sys-cluster/ceph/files/ceph-14.2.10-missing-includes.patch b/sys-cluster/ceph/files/ceph-14.2.10-missing-includes.patch
433 new file mode 100644
434 index 00000000000..59663028cfa
435 --- /dev/null
436 +++ b/sys-cluster/ceph/files/ceph-14.2.10-missing-includes.patch
437 @@ -0,0 +1,26 @@
438 +diff --git a/src/common/bit_str.h b/src/common/bit_str.h
439 +index c4c24f6a75..b5631e8b84 100644
440 +--- a/src/common/bit_str.h
441 ++++ b/src/common/bit_str.h
442 +@@ -14,6 +14,8 @@
443 + #ifndef CEPH_COMMON_BIT_STR_H
444 + #define CEPH_COMMON_BIT_STR_H
445 +
446 ++#include <cstdint>
447 ++#include <ostream>
448 + #include <functional>
449 +
450 + namespace ceph {
451 +diff --git a/src/librbd/api/PoolMetadata.h b/src/librbd/api/PoolMetadata.h
452 +index 977ce3638d..8d982879aa 100644
453 +--- a/src/librbd/api/PoolMetadata.h
454 ++++ b/src/librbd/api/PoolMetadata.h
455 +@@ -8,6 +8,8 @@
456 + #include "include/rados/librados_fwd.hpp"
457 +
458 + #include <map>
459 ++#include <string>
460 ++#include <cstdint>
461 +
462 + namespace librbd {
463 +
464
465 diff --git a/sys-cluster/ceph/files/ceph-14.2.10-python-warnings.patch b/sys-cluster/ceph/files/ceph-14.2.10-python-warnings.patch
466 new file mode 100644
467 index 00000000000..8be3e509a1c
468 --- /dev/null
469 +++ b/sys-cluster/ceph/files/ceph-14.2.10-python-warnings.patch
470 @@ -0,0 +1,31 @@
471 +diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py
472 +index 7d7e5b49e4..9a1ba80e69 100644
473 +--- a/src/pybind/ceph_volume_client.py
474 ++++ b/src/pybind/ceph_volume_client.py
475 +@@ -355,7 +355,7 @@ class CephFSVolumeClient(object):
476 + continue
477 +
478 + (group_id, volume_id) = volume.split('/')
479 +- group_id = group_id if group_id is not 'None' else None
480 ++ group_id = group_id if group_id != 'None' else None
481 + volume_path = VolumePath(group_id, volume_id)
482 + access_level = volume_data['access_level']
483 +
484 +@@ -378,7 +378,7 @@ class CephFSVolumeClient(object):
485 + if vol_meta['auths'][auth_id] == want_auth:
486 + continue
487 +
488 +- readonly = True if access_level is 'r' else False
489 ++ readonly = True if access_level == 'r' else False
490 + self._authorize_volume(volume_path, auth_id, readonly)
491 +
492 + # Recovered from partial auth updates for the auth ID's access
493 +@@ -1120,7 +1120,7 @@ class CephFSVolumeClient(object):
494 +
495 + # Construct auth caps that if present might conflict with the desired
496 + # auth caps.
497 +- unwanted_access_level = 'r' if want_access_level is 'rw' else 'rw'
498 ++ unwanted_access_level = 'r' if want_access_level == 'rw' else 'rw'
499 + unwanted_mds_cap = 'allow {0} path={1}'.format(unwanted_access_level, path)
500 + if namespace:
501 + unwanted_osd_cap = 'allow {0} pool={1} namespace={2}'.format(