]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agowin32*.sh: move debug symbols to separate files 39316/head
Lucian Petrut [Wed, 3 Feb 2021 08:59:24 +0000 (08:59 +0000)]
win32*.sh: move debug symbols to separate files

This patch simplifies releasing Windows binaries along with debug
symbols.

By default, we're going to provide minimum debug information (-g1).
The symbols are extracted from the binaries and placed in separate
files in the ".debug" folder, which is used by gdb implicitly.

This is more convenient than having separate versions of the binaries,
with or without debug symbols.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit 1c426e96b0efb2f8198fa742c0ad0f2ddd090ad2)

4 years agorbd: propagate rbd-wnbd errors
Lucian Petrut [Fri, 29 Jan 2021 13:38:19 +0000 (13:38 +0000)]
rbd: propagate rbd-wnbd errors

This change updates the "rbd device" commands, propagating
rbd-wnbd.exe exit codes.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit 8d64c7cf4265ae853fd05a99b87e260c98c2b34c)

4 years agorbd: propagate WNBD start errors
Lucian Petrut [Fri, 29 Jan 2021 11:03:20 +0000 (11:03 +0000)]
rbd: propagate WNBD start errors

This change will propagate the errors that WNBD may return when
spinning up the IO workers.

Also, we'll avoid removing the registry record for failed
non-persistent mappings. Those will be cleaned up when the service
restarts or when explicitly unmapped.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit afa7b532b2b53ba3734e13f5f72213cbe6ba22fd)

4 years agorbd: improve Windows remap failure handling
Lucian Petrut [Fri, 29 Jan 2021 09:54:10 +0000 (09:54 +0000)]
rbd: improve Windows remap failure handling

At the moment, if an image can't be remapped when the centralized
RBD service starts, the service will stop and already started
daemons will continue running.

This change adds a new option: "--remap-failure-fatal". If set,
when an image can't be remmaped, the service stops AND cleans up
the running daemons. By default, an error will be logged and the
service will continue running.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit 14b78e45383f77dc18de5d31a36e0220c8cd13ad)

4 years agorbd: add image map timeouts on Windows
Lucian Petrut [Thu, 28 Jan 2021 14:08:29 +0000 (14:08 +0000)]
rbd: add image map timeouts on Windows

This change adds configurable timeouts used when starting the centralized RBD
service and mapping images.

This change also fixes an issue where the service would wait indefinitely for
a failed mapping. This issue was caused by the fact that multiple child
processes were inheriting pipe handles.

Note that we can't use timeouts with Windows anonymous pipes, which is why
we're going to use unique named pipes.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit 8b08fb80284ee1cce62f800db92231f8493756fc)

4 years agorbd: restrict Windows service exec calls
Lucian Petrut [Wed, 27 Jan 2021 12:58:48 +0000 (12:58 +0000)]
rbd: restrict Windows service exec calls

The centralized Ceph Windows service is responsible of managing
rbd-wnbd daemons. When starting, it's respawns the daemons using the
command line saved in the Windows registry. Also, for new mappings,
the command line is passed through a named pipe.

While writing to the according named pipe and windows registry entries
requires admin privileges, it's better to avoid running arbitrary
commands.

This patch will drop the executable from the commands that the
Ceph service accepts. Instead, it will only accept arguments that
are passed to the the binary that was used to start the service
(rbd-wnbd.exe).

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit 1744ba056869c2d5fb6b9d4551ea4da38dc8546a)

4 years agorbd: allow non persistent Windows mappings
Lucian Petrut [Wed, 27 Jan 2021 09:06:19 +0000 (09:06 +0000)]
rbd: allow non persistent Windows mappings

At the moment, all Windows RBD mappings are persistent, being
recreated when the Ceph service starts.

This change adds the "--non-persistent" flag to allow skipping
certain images.

Note that even for non-persistent mappings, we're still storing
data in the Windows registry, allowing us to retrieve image
details such as the rbd pool as well as the admin socket path.

When the daemons stop or the Ceph service starts, non-persistent
entries are cleaned up from the Windows registry.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit 2455a907e66e706e2be4f91322b8f4cdd59fc844)

4 years agorbd: fix Windows block count overflow
Lucian Petrut [Wed, 27 Jan 2021 08:30:54 +0000 (08:30 +0000)]
rbd: fix Windows block count overflow

rbd-wnbd uses uint32_t for storing the image total block count,
which will overflow for >2TB images that are using 512B blocks.

This patch will switch to a uint64_t.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit 6dc45eea209e1d3b2262a5d8d04d145adc7708a6)

4 years agorbd: delegate map requests to the Windows service
Lucian Petrut [Tue, 26 Jan 2021 14:13:22 +0000 (14:13 +0000)]
rbd: delegate map requests to the Windows service

At the moment, rbd-wnbd daemons are tied to the Windows
session. When the user logs off or the WinRM remote session
terminates, the daemons are killed.

In order to avoid such issues, we'll delegate the daemon
initialization to the centralized Ceph Windows service.

We're using a named pipe for the Ceph service communication.
We're not using Ceph admin sockets for now since unix sockets
aren't available on Windows Server 2016.

Worth mentioning that the Ceph Windows service will restart
registered mappings when the host reboots based on the command
lines saved in the Windows registries. Writing to the registry
key as well as the service named pipe requires admin privileges.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit 7a2f9903fe97422da2baf602c426aabd0907973e)

4 years agoMerge pull request #39045 from smithfarm/wip-48970-pacific
Jason Dillaman [Fri, 5 Feb 2021 00:23:18 +0000 (19:23 -0500)]
Merge pull request #39045 from smithfarm/wip-48970-pacific

pacific: ocf: add support for mapping images within an RBD namespace

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #39177 from cbodley/wip-qa-rgw-pacific-branches
Yuri Weinstein [Thu, 4 Feb 2021 19:43:19 +0000 (11:43 -0800)]
Merge pull request #39177 from cbodley/wip-qa-rgw-pacific-branches

pacific: qa: rgw tests target ceph-pacific branches instead of ceph-master

Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
4 years agoMerge pull request #39280 from neha-ojha/wip-49139-pacific
Neha Ojha [Wed, 3 Feb 2021 23:00:28 +0000 (15:00 -0800)]
Merge pull request #39280 from neha-ojha/wip-49139-pacific

pacific: qa/suites/rados/perf: pin to 18.04

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoqa/suites/perf-basic: pin to 18.04 39280/head
Neha Ojha [Wed, 3 Feb 2021 18:57:50 +0000 (18:57 +0000)]
qa/suites/perf-basic: pin to 18.04

This will have same problems as https://tracker.ceph.com/issues/49139

Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit e5895dd8012f646ae9d67b9d1b331e7c06fe89d3)

4 years agoqa/suites/rados/perf: pin to 18.04
Neha Ojha [Wed, 3 Feb 2021 17:29:59 +0000 (17:29 +0000)]
qa/suites/rados/perf: pin to 18.04

Caused by a07ca4c5c0f04c43c71231a898c2a89e99a80606

Fixes: https://tracker.ceph.com/issues/49139
Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit 6a03b4cec9be39b2c3217e5f28372e1db3999781)

4 years agoMerge pull request #39165 from sebastian-philipp/pacific-backport-39035-38935-39028...
Yuri Weinstein [Wed, 3 Feb 2021 18:14:56 +0000 (10:14 -0800)]
Merge pull request #39165 from sebastian-philipp/pacific-backport-39035-38935-39028-39087-38998-38854-38982-39101-39043-39113-

pacific: cephadm: Batch backport January (2)

Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
4 years agoMerge pull request #39233 from idryomov/wip-unbreak-rbd-task-pacific
Ilya Dryomov [Wed, 3 Feb 2021 09:36:17 +0000 (10:36 +0100)]
Merge pull request #39233 from idryomov/wip-unbreak-rbd-task-pacific

pacific: qa/tasks/rbd: fix regressions introduced with rbd encryption support

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoqa/tasks/rbd: don't wait for krbd symlink to be created/removed 39233/head
Ilya Dryomov [Sun, 31 Jan 2021 14:24:32 +0000 (15:24 +0100)]
qa/tasks/rbd: don't wait for krbd symlink to be created/removed

Commit 3754c665a11e (":qa/tasks/rbd: test qemu on top of rbd
encryption") broke dev_create() for krbd by messing up the "wait
for the symlink to be created by udev" loop.  The rbd tool has been
synchronizing with udev internally since 2014, so rather than fixing
let's just drop it.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit d89613f52dee83c308a2b169ba1c2869c16ac9d7)

4 years agoqa/tasks/rbd: dev_create() expects a properties dict
Ilya Dryomov [Sun, 31 Jan 2021 13:27:52 +0000 (14:27 +0100)]
qa/tasks/rbd: dev_create() expects a properties dict

In order to add encryption_format property, commit 3754c665a11e
(":qa/tasks/rbd: test qemu on top of rbd encryption") changed the
dev_create() contract.  It now expects a properties dict, but the
main task routine wasn't updated and still passes role_images.

On top of that, role_images itself got broken.  It is supposed
to be a mapping from role to a corresponding image name, not to
a dict with an image_name key.  This affected generic_mount().

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 0357c0215b2fbbf7fa801331df1f92b101ad9d5e)

4 years agoqa: rgw tests target ceph-pacific branches instead of ceph-master 39177/head
Casey Bodley [Fri, 29 Jan 2021 17:13:45 +0000 (12:13 -0500)]
qa: rgw tests target ceph-pacific branches instead of ceph-master

s3test and ragweed tests now use ceph-pacific branch. this commit
diverges from master, so is applied directly to the pacific branch

Signed-off-by: Casey Bodley <cbodley@redhat.com>
4 years agocmake: install rook-client-python using ExternalProject 39165/head
Kefu Chai [Thu, 28 Jan 2021 12:35:36 +0000 (20:35 +0800)]
cmake: install rook-client-python using ExternalProject

so we don't need to rerun the generate_rook_ceph_client.sh script
everytime when building the script. cmake creates a stamp file for
tracking the dependencies and the time of modification of dependencies.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 7fb44404bb8bed2a60177ba3948b318f14d28521)

4 years agopython-common: fix test_datetime_to_str_2 on non-UTC hosts
Sage Weil [Wed, 27 Jan 2021 21:44:21 +0000 (15:44 -0600)]
python-common: fix test_datetime_to_str_2 on non-UTC hosts

The old test parsed to a datetime without a tz, which was interpreted as
the local time zone when rendering back to a string.  Specify that it's a
UTC datetime so that behavior is consistent regardless of the test host
timezone.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 78aca4db249c409d0cd5a24bfae81e55cf930bc3)

4 years agocephadm:add missing kernel_security property
Paul Cuzner [Wed, 27 Jan 2021 20:40:58 +0000 (09:40 +1300)]
cephadm:add missing kernel_security property

The propery decorator had gone missing which meant
the dump of host facts was missing the kernel security
(LSM) settings. This patch just adds the @property
decorator back

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
(cherry picked from commit 1bc953cfbfe015d3eccf9ead002b9eb0253a6825)

4 years agocephadm: refactor call() using asyncio.asyncio.StreamReader
Kefu Chai [Sun, 24 Jan 2021 06:58:51 +0000 (14:58 +0800)]
cephadm: refactor call() using asyncio.asyncio.StreamReader

simpler this way, also fix a couple issues:

* create a child watcher explicitly, see
  https://bugs.python.org/issue35621
* use StringIO for collecting outputs for better performance,
  instead of appending the lines to an existing str
* catch ValueError when reading from the stream reader,
  because StreamReader.readline() could raise ValueError when
  it reaches the buffer limit while looking for a separator.
  in this case, we should try again, in hope that the spawned
  process can feed the reader with more data which contains
  the separator (i.e., b'\n').
* backport ThreadedChildWatcher from Python 3.8 so we can
  run create_subprocess_exec() in non-main threads.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 30070be24860c2dfc0d27c79b0958d6c09316d87)

4 years agomgr/cephadm: Fix wrong argument type to HandleCommandResult
Sebastian Wagner [Wed, 27 Jan 2021 12:15:47 +0000 (13:15 +0100)]
mgr/cephadm: Fix wrong argument type to HandleCommandResult

the argument must be a string

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit 677b3d1b0f925cd36fccbdf9fb12251b77afd030)

4 years agocephadm: Fix iscsi client caps (allow mgr <service status> calls)
Juan Miguel Olmo Martínez [Wed, 20 Jan 2021 09:36:30 +0000 (10:36 +0100)]
cephadm: Fix iscsi client caps (allow mgr <service status> calls)

iSCSI daemons need to execute <ceph service status> command

Fixes: https://tracker.ceph.com/issues/48925
Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
(cherry picked from commit 9b9934f75b648a9ee01848710a6f7150a371e26e)

4 years agomgr/cephadm: force flag for ok-to-stop and ok-to-stop for monitoring stack
Adam King [Mon, 11 Jan 2021 18:23:04 +0000 (13:23 -0500)]
mgr/cephadm: force flag for ok-to-stop and ok-to-stop for monitoring stack

Daemons that could cause data loss when stopped will always block.

Daemons that will only cause loss in availability should block but have
a workaround in the form of a force flag if the user is okay with the service
being down.

Also implements ok-to-stop for monitoring stack daemons that uses this system
of blocking on availability loss unless force flag is provided

Signed-off-by: Adam King <adking@redhat.com>
Signed-off-by: Daniel-Pivonka <dpivonka@redhat.com>
(cherry picked from commit aeeffb07f1bb226b64a362de4eecd7d63fc0b0d1)

4 years agomgr/cephadm: minor pep8 fixes
Sebastian Wagner [Fri, 22 Jan 2021 09:19:03 +0000 (10:19 +0100)]
mgr/cephadm: minor pep8 fixes

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit 4ca11ae50d734c1d059d88b8b14a3318f11f4eea)

4 years agomgr/cephadm: Properly handle JSON Decode error
Sebastian Wagner [Thu, 21 Jan 2021 11:10:34 +0000 (12:10 +0100)]
mgr/cephadm: Properly handle JSON Decode error

Fixes 6d759fb5deac0c52b3c738a2e695738228749420

I.e. don't use `out`, until it is acutally defined

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit eb1a40c3ea8e19259d8ab68a6eeb16d27e4cdbda)

4 years agoqa/suites/rados/cephadm: drop 20.04 podman
Sage Weil [Tue, 26 Jan 2021 15:14:09 +0000 (09:14 -0600)]
qa/suites/rados/cephadm: drop 20.04 podman

This version is also affected

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit dccd5861733144514cb28b3325f2d5ed6c56a67e)

4 years agoqa/suites/rados/cephadm: stop testing 18.04 + podman
Sage Weil [Mon, 25 Jan 2021 21:32:33 +0000 (15:32 -0600)]
qa/suites/rados/cephadm: stop testing 18.04 + podman

The current bionice version triggers a podman/conmon bug that
truncates output, affecting both cephadm bootstrap when 'mgr dump' is
large, and teuthology 'pg dump' when it is large.

See https://tracker.ceph.com/issues/48993

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit e5e4710990e19625a074f6ad9ab13003fbaccba1)

4 years agocephadm: retry for 30s instead of 10s
Sage Weil [Fri, 22 Jan 2021 15:09:17 +0000 (09:09 -0600)]
cephadm: retry for 30s instead of 10s

No real reason not to wait longer, and I'm worried about things not coming
up quickly enough on slower or loady machines.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 963f54aebf151ea4624063d930ab85f0a2b1fa79)

4 years agocephadm: try 'mgr stat' before 'mgr dump' to get the epoch
Sage Weil [Fri, 22 Jan 2021 15:06:44 +0000 (09:06 -0600)]
cephadm: try 'mgr stat' before 'mgr dump' to get the epoch

This is less noise in the debug log.  (Also, there seems to be a problem
when the mgr stat output gets too big.)

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit c1cee0a9526b21c848e8eff2bed585ee856e4497)

4 years agomon: add 'mgr stat' command
Sage Weil [Thu, 21 Jan 2021 23:51:39 +0000 (17:51 -0600)]
mon: add 'mgr stat' command

This is analogous to 'osd stat' and 'mds stat'.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit bb702eda199cf2def81e8277d0a222daafe9df28)

4 years agopybind/mgr/cephadm: return -ENOENT if self.ssh_user is None
Kefu Chai [Thu, 21 Jan 2021 16:11:39 +0000 (00:11 +0800)]
pybind/mgr/cephadm: return -ENOENT if self.ssh_user is None

there is chance that self.ssh_user is None when handling "cephadm
get-user" command, so return -ENOENT and error messages in that case.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 36dde8861a1b8ae0aa53926c773e21bfa065fb07)

4 years agopybind/mgr/dashboard: use _get_localized_key for composing store key
Kefu Chai [Tue, 19 Jan 2021 17:56:02 +0000 (01:56 +0800)]
pybind/mgr/dashboard: use _get_localized_key for composing store key

Just for keeping this 'encapsulated', there's _get_localized_key helper
in mgr_module (there's also a set_localized_store but it only deals with
the active manager)

As suggested by Ernesto Puerta <epuertat@redhat.com>

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 34e96c55397da7029254864ebf7a3d88563e22c9)

4 years agopybind/mgr/prometheus: add assert to appease mypy
Kefu Chai [Tue, 19 Jan 2021 17:28:20 +0000 (01:28 +0800)]
pybind/mgr/prometheus: add assert to appease mypy

self.get_osd_perf_counters() might return None, add assert() to assure
mypy that it does not return None here.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 3ca955c4d5f55c9c15797199b991dd0e81095386)

4 years agopybind/mgr/cephadm/serve: add assert to appease mypy
Kefu Chai [Tue, 19 Jan 2021 17:26:06 +0000 (01:26 +0800)]
pybind/mgr/cephadm/serve: add assert to appease mypy

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 2a5a50f3bace6b853fe2feff85a641ade91825e1)

4 years agopybind/mgr/cephadm/module: assure self.ssh_user is not None
Kefu Chai [Tue, 19 Jan 2021 17:25:10 +0000 (01:25 +0800)]
pybind/mgr/cephadm/module: assure self.ssh_user is not None

to appease mypy

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 2fd0a03192bbbe15fb5fb7095f67e1a373661c89)

4 years agopybind/mgr/cephadm/inventory: cast variable to expected type
Kefu Chai [Tue, 19 Jan 2021 17:24:01 +0000 (01:24 +0800)]
pybind/mgr/cephadm/inventory: cast variable to expected type

to silence mypy warnings like:

cephadm/module.py:55: note: In module imported here,
cephadm/__init__.py:6: note: ... from here:
cephadm/inventory.py: note: In member "load" of class "SpecStore":
cephadm/inventory.py:130: error: Invalid index type "str" for "str"; expected type "Union[int, slice]"
cephadm/inventory.py:131: error: Invalid index type "str" for "str"; expected type "Union[int, slice]"

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit cb3a50cd3626d6a67beb39d2c9dd897f43379d70)

4 years agotools/setup-virtualenv.sh: do not pass --use-feature=2020-resolver to pip
Kefu Chai [Tue, 19 Jan 2021 12:12:22 +0000 (20:12 +0800)]
tools/setup-virtualenv.sh: do not pass --use-feature=2020-resolver to pip

pip use the new resolver by default now. so no need to pass this option
to it anymore.

This reverts commit fa9e2bfd4b3648f08ed3a88ce737d432ab97cce1.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit cb2de05a39b28342fdf44688cd0d1c3e424a02ff)

4 years agopybind/mgr/mgr_module: annotate variable type
Kefu Chai [Tue, 19 Jan 2021 09:34:43 +0000 (17:34 +0800)]
pybind/mgr/mgr_module: annotate variable type

to silence following mypy error:

cephadm/module.py:1155: error: Incompatible types in assignment
(expression has type "None", variable has type "str")

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 00f5a80201923c85c50f8e8bb64e3e82458fd932)

4 years agopybind/mgr/cephadm: rename variables to avoid name reuse
Kefu Chai [Tue, 19 Jan 2021 09:20:29 +0000 (17:20 +0800)]
pybind/mgr/cephadm: rename variables to avoid name reuse

to applease mypy, otherwise, for instance, "err" would be reused for
holding the return value of self.mgr.check_mon_command(...)

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 53415832cdbef94d2f3777e8f3abb8560b15323e)

4 years agopybind/mgr: annotate OSDMap and friends
Kefu Chai [Tue, 19 Jan 2021 06:53:11 +0000 (14:53 +0800)]
pybind/mgr: annotate OSDMap and friends

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit eb6603f1b52eda73d3b1ef92b03833c61ddd2223)

4 years agopybind/mgr: correct annotation for BasePyOSDMap._apply_incremental()
Kefu Chai [Tue, 19 Jan 2021 06:49:07 +0000 (14:49 +0800)]
pybind/mgr: correct annotation for BasePyOSDMap._apply_incremental()

it's incorrect. as the underlying C implementation,
"osdmap_apply_incremental()", actually expects an instance of
`BasePyOSDMapIncrementalType`. which is mapped to
`BasePyOSDMapIncremental` in Python. and this class is wrapped using
`OSDMapIncremental` in mgr_module.py.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 7b2dd7eba4422338acd5e6d8e24f88114f8694e6)

4 years agopybind/mgr: define HandleCommandResult using NamedTuple
Kefu Chai [Tue, 19 Jan 2021 06:08:39 +0000 (14:08 +0800)]
pybind/mgr: define HandleCommandResult using NamedTuple

simpler this way, so we don't need to define __new__

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit d139166ea7514d113a41c28dae59184e3d2101d0)

4 years agopybind/mgr: use numeric values of logging level for index
Kefu Chai [Tue, 19 Jan 2021 04:16:12 +0000 (12:16 +0800)]
pybind/mgr: use numeric values of logging level for index

less magic values in code this way

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit ab0243b31946e058ecb41a2a04aedd8459b89bbb)

4 years agomgr/cephadm: use dict instead of defaultdict to silence mypy warning
Kefu Chai [Sun, 17 Jan 2021 08:36:35 +0000 (16:36 +0800)]
mgr/cephadm: use dict instead of defaultdict to silence mypy warning

otherwise we have:

1: cephadm/module.py:30: note: In module imported here:
1: cephadm/serve.py: note: In member "_check_for_strays" of class "CephadmServe":
1: cephadm/serve.py:395: error: Argument "default" to "get_metadata" of "MgrModule" has incompatible type "defaultdict[str, None]"; expected "Optional[Dict[str, str]]"

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 6c3d8174358b30f3c9eef1b9342df437749d75fd)

4 years agomgr/rook: handle the case where given osd is not found
Kefu Chai [Sun, 17 Jan 2021 08:29:37 +0000 (16:29 +0800)]
mgr/rook: handle the case where given osd is not found

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 5272748e179f67c8d5464d3b38e96eb8829b6b00)

4 years agomgr/dashboard: pass str as the 2nd param of set_store()
Kefu Chai [Sun, 17 Jan 2021 08:09:36 +0000 (16:09 +0800)]
mgr/dashboard: pass str as the 2nd param of set_store()

MgrModule.set_store() only accepts str or None as its second
parameter.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 2d20390b17649beae72a0be1eb6da286ed9788ae)

4 years agomgr/progress: pass a str as the value of option to set_module_option()
Kefu Chai [Sun, 17 Jan 2021 08:02:30 +0000 (16:02 +0800)]
mgr/progress: pass a str as the value of option to set_module_option()

MgrModule.set_module_option() only accepts str or None as its second
parameter.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 6cdbe8f9e837fcb804cc2c1c01cee2d0a8ba1595)

4 years agomgr/progress: pass id to constructor of Event
Kefu Chai [Sun, 17 Jan 2021 07:29:33 +0000 (15:29 +0800)]
mgr/progress: pass id to constructor of Event

to assure that the self.id is always valid, it helps to silence the
warnings from mypy like:

progress/module.py: note: In member "_refresh" of class "Event":
progress/module.py:46: error: Argument 1 to "update_progress_event" of "MgrModule" has incompatible type "Optional[str]"; expected "str"

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 1268f36f2b3c1e33db465f576661991bf30727ec)

4 years agopybind/mgr/insights: be PEP8 compliant
Kefu Chai [Sun, 17 Jan 2021 02:41:58 +0000 (10:41 +0800)]
pybind/mgr/insights: be PEP8 compliant

to applease flake8

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit dee84744745fe9084b7f76a134df9b991bc5dce5)

4 years agopybind/mgr/insights: use CLICommand to define command
Kefu Chai [Sun, 17 Jan 2021 02:37:40 +0000 (10:37 +0800)]
pybind/mgr/insights: use CLICommand to define command

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 352cd2d46199b84c4151f7627964e7773dc8463d)

4 years agopybind/mgr/iostat: minor cleanups
Kefu Chai [Sun, 17 Jan 2021 02:19:53 +0000 (10:19 +0800)]
pybind/mgr/iostat: minor cleanups

* do not pass typename and self to super()
* do not add parentheses around condition expression

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 3422ba1bfc13e92f9df0af50790c69ac9385f4fa)

4 years agopybind/mgr/iostat: use correct types
Kefu Chai [Sun, 17 Jan 2021 01:35:36 +0000 (09:35 +0800)]
pybind/mgr/iostat: use correct types

for better readability and for the sake of correctness.

* do not cast denominator to float before diving by it
* use '//' for divding an int
* cast int to str as it will be used as an element in a list of str

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 4ffcccf6a4bbded4a240c2bf13020da1d6d6d774)

4 years agomgr/iostat: use CLICommand to define command
Kefu Chai [Sun, 17 Jan 2021 01:29:20 +0000 (09:29 +0800)]
mgr/iostat: use CLICommand to define command

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 9bcd08c3753d1a0d55a78550d5e74a26af30b4b3)

4 years agopybind/mgr/mgr_module: annotate more methods
Kefu Chai [Sat, 16 Jan 2021 15:14:07 +0000 (23:14 +0800)]
pybind/mgr/mgr_module: annotate more methods

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 8da98e55b96b1e31e2b0a0e20134a7a2ed9ad9a3)

4 years agopybind/mgr: define CLUSTER_LOG_PRIO* using enum.IntEnum
Kefu Chai [Sat, 16 Jan 2021 15:30:30 +0000 (23:30 +0800)]
pybind/mgr: define CLUSTER_LOG_PRIO* using enum.IntEnum

so the clog type / prio can be typed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 141969d7c428698df2e4534ebdc935311163ee82)

4 years agopybind/mgr/mgr_module: add poll param to CLICommand
Kefu Chai [Sat, 16 Jan 2021 14:54:51 +0000 (22:54 +0800)]
pybind/mgr/mgr_module: add poll param to CLICommand

and add it to the output of dump_cmd() call, if "poll" is missing
in the output of dump_cmd() call, ceph CLI consider the it as False.

but it'd be better to be explicit. so this field is always set.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 7a2e460d34dc5f7e2124bcbedd527d63fa467017)

4 years agomgr,pybind/mgr: use bool for poll in COMMANDS
Kefu Chai [Sun, 17 Jan 2021 01:16:36 +0000 (09:16 +0800)]
mgr,pybind/mgr: use bool for poll in COMMANDS

use correctly typed variable helps with readability and less
error-prone.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 1453f0ff1f57ef4473bbdc0a6037c8316e8fec21)

4 years agopybind/mgr/mgr_module: flake8 fixes
Kefu Chai [Sat, 16 Jan 2021 14:47:02 +0000 (22:47 +0800)]
pybind/mgr/mgr_module: flake8 fixes

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit f24a773457806d5b051b5074274a9ff0f7d36f8d)

4 years agodoc: Applied text as suggested by @zdover23
Michael Wodniok [Wed, 27 Jan 2021 07:19:06 +0000 (08:19 +0100)]
doc: Applied text as suggested by @zdover23

Signed-off-by: Michael Wodniok <wodniok@wor.net>
(cherry picked from commit f857bcd622f90d05d026bc5f219b37f71ab90d4e)

4 years agodoc: changed commands as suggested by @sebastian-philipp
Michael Wodniok [Tue, 19 Jan 2021 12:15:32 +0000 (13:15 +0100)]
doc: changed commands as suggested by @sebastian-philipp

Signed-off-by: Michael Wodniok <wodniok@wor.net>
Co-authored-by: Sebastian Wagner <sebastian@spawnhost.de>
(cherry picked from commit d97731969ab384909e64afd60d766e5cb06e4b5e)

4 years agodoc: added internal link
Michael Wodniok [Tue, 19 Jan 2021 12:12:57 +0000 (13:12 +0100)]
doc: added internal link

Linked from Service Status to retrieval of specificaton section as
`ceph orch ls --export` is also mentioned there.

Signed-off-by: Michael Wodniok <wodniok@wor.net>
(cherry picked from commit a9553061996967e0f57d70e15f2586f90f4d2f29)

4 years agodoc: added section about retival of Service Spec.
Michael Wodniok [Tue, 22 Dec 2020 09:46:54 +0000 (10:46 +0100)]
doc: added section about retival of Service Spec.

Signed-off-by: Michael Wodniok <wodniok@wor.net>
(cherry picked from commit 84bdafe0e36e11fb8b57065625a5ecb49fd3c248)

4 years agospec, debian: recommend podman >= 2.0.2
Michael Fritch [Mon, 25 Jan 2021 23:09:07 +0000 (16:09 -0700)]
spec, debian: recommend podman >= 2.0.2

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit a89922789562bec731525dff65759061fcd07085)

4 years agocephadm: partal revert of 253968a2baf
Michael Fritch [Mon, 25 Jan 2021 23:08:51 +0000 (16:08 -0700)]
cephadm: partal revert of 253968a2baf

remove technical debt related to podman < 2.0.0

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 90f9899cc12c76a7957429150928b23703ecd950)

4 years agocephadm: require podman >= 2.0.2
Michael Fritch [Mon, 25 Jan 2021 23:08:41 +0000 (16:08 -0700)]
cephadm: require podman >= 2.0.2

Fixes: https://tracker.ceph.com/issues/47139
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 8b7047b6144084107e516cd9dadeeb29ebdbfead)

4 years agocephadm: consolidate podman/docker selection
Michael Fritch [Mon, 25 Jan 2021 23:08:25 +0000 (16:08 -0700)]
cephadm: consolidate podman/docker selection

consolidate the logic for making a container engine selection

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit d62e916e069fa076091ad93825ac17aae752524c)

4 years agopython-common/drivegroups: avoid dropping "rotational: 0" from DeviceSelection
Lukas Stockner [Mon, 25 Jan 2021 23:58:19 +0000 (00:58 +0100)]
python-common/drivegroups: avoid dropping "rotational: 0" from DeviceSelection

False is a legitimate value for the rotational setting and should be included in the JSON output, only None should be ignored.

Fixes: http://tracker.ceph.com/issues/49014
Fixes: cd6a488ab2ca036dd4fb36751b938f605e97e1c8
Signed-off-by: Lukas Stockner <lstockner@genesiscloud.com>
(cherry picked from commit c32f6f5448e51d3196f7a2644ea97ecd22a04f92)

4 years agocephadm: rewrite call() with asyncio
Kefu Chai [Sat, 23 Jan 2021 05:18:56 +0000 (13:18 +0800)]
cephadm: rewrite call() with asyncio

for better readability, also return 124 when subprocess times out

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 8ad7e4c0288b5fb41bfab797f95ff2a212a51051)

4 years agomgr/orchestrator: ensure appley spec honors maintenance mode
Paul Cuzner [Wed, 13 Jan 2021 21:49:24 +0000 (10:49 +1300)]
mgr/orchestrator: ensure appley spec honors maintenance mode

Add the status field to the definition of the host to ensure an
apply_spec honours hosts that should be defined in maintenance
during a bootstrap based deployment.

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
(cherry picked from commit 6a076046060943ddb62dfbb5e3ab168fbbc7fae8)

4 years agomgr/orchestrator: rebase patch
Paul Cuzner [Wed, 13 Jan 2021 01:53:40 +0000 (14:53 +1300)]
mgr/orchestrator: rebase patch

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
(cherry picked from commit 4be6e343a6fa71c0541fcc1f568c4f900bcc5ca0)

4 years agomgr/orchestrator: rebase patch
Paul Cuzner [Wed, 13 Jan 2021 01:22:10 +0000 (14:22 +1300)]
mgr/orchestrator: rebase patch

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
(cherry picked from commit 2c72e3d1ab8c3edeece2c982075a9db6f8b99fa1)

4 years agoMerge pull request #39021 from ceph/pacific-backport
Sebastian Wagner [Thu, 28 Jan 2021 22:46:43 +0000 (23:46 +0100)]
Merge pull request #39021 from ceph/pacific-backport

pacific: cephadm: batch backport January

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #39066 from yuriw/wip-yuriw-octopus-x-old-school
Yuri Weinstein [Thu, 28 Jan 2021 19:57:27 +0000 (11:57 -0800)]
Merge pull request #39066 from yuriw/wip-yuriw-octopus-x-old-school

qa/tests: added 'parallel-no-cephadm'

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #39110 from dillaman/wip-librbd-backports-pacific-2
Jason Dillaman [Thu, 28 Jan 2021 13:48:09 +0000 (08:48 -0500)]
Merge pull request #39110 from dillaman/wip-librbd-backports-pacific-2

pacific: librbd: miscellaneous backports 2

Reviewed-by: Mykola Golub <mgolub@suse.com>
4 years agolibrbd: Fix variable declaration in capture list in lambda 39110/head
Willem Jan Withagen [Thu, 28 Jan 2021 00:00:45 +0000 (01:00 +0100)]
librbd: Fix variable declaration in capture list in lambda

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
(cherry picked from commit 461412352d490d2c543791d37278e99f2c36d395)

4 years agoMerge pull request #39067 from neha-ojha/wip-38962-pacific
Yuri Weinstein [Wed, 27 Jan 2021 23:51:43 +0000 (15:51 -0800)]
Merge pull request #39067 from neha-ojha/wip-38962-pacific

pacific: ceph-bluestore-tool: fix reshard command and add show-sharding option

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #38989 from neha-ojha/wip-48776-pacific
Yuri Weinstein [Wed, 27 Jan 2021 23:50:59 +0000 (15:50 -0800)]
Merge pull request #38989 from neha-ojha/wip-48776-pacific

pacific: os/bluestore: fix deferred_queue locking

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Igor Fedotov <ifedotov@suse.com>
4 years agoMerge pull request #39030 from liewegas/wip-38990-pacific
Yuri Weinstein [Wed, 27 Jan 2021 20:20:55 +0000 (12:20 -0800)]
Merge pull request #39030 from liewegas/wip-38990-pacific

pacific: mgr/devicehealth: fix 'device monitoring on|off' return value

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #39017 from jan--f/wip-gh32027-pacific
Yuri Weinstein [Wed, 27 Jan 2021 20:20:36 +0000 (12:20 -0800)]
Merge pull request #39017 from jan--f/wip-gh32027-pacific

pacific: librados: avoid symbol versioning on Windows

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agolibrbd/migration: minor cleanup to QCOWFormat code
Jason Dillaman [Wed, 27 Jan 2021 13:32:45 +0000 (08:32 -0500)]
librbd/migration: minor cleanup to QCOWFormat code

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 6cd7e84293d27168fcf1b86bf058722c7736c1ec)

4 years agotest/librbd: initial unit tests for migration/QCOWFormat
Jason Dillaman [Mon, 25 Jan 2021 23:15:15 +0000 (18:15 -0500)]
test/librbd: initial unit tests for migration/QCOWFormat

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 3b2e6fa3f061b430045b3e36708b7ef6405709c5)

4 years agolibrbd/migration: compute QCOW snapshot deltas via L2 table deltas
Jason Dillaman [Tue, 26 Jan 2021 05:18:45 +0000 (00:18 -0500)]
librbd/migration: compute QCOW snapshot deltas via L2 table deltas

Since each entry in a L2 table represents a cluster block within the
QCOW image, we can compute deltas by comparing L2 tables. This fixes
an issue where snapshots were not being properly thin-provisioned
during the live-migration execute process.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 2d8d70e2e9376adc15d5530d4d58f29dc5724bbe)

4 years agolibrbd/migration: allow retrieving QCOW L2 table from L2 cache
Jason Dillaman [Tue, 26 Jan 2021 03:17:25 +0000 (22:17 -0500)]
librbd/migration: allow retrieving QCOW L2 table from L2 cache

This will be used in the next commit where the list-snaps state
machine is tweaked to compate L2 tables between snapshot revisions
to determine deltas.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 251990a1462a5770e6bbbb9642acbcce2cac525d)

4 years agolibrbd/migration: refactor lookup table handling for QCOW format
Jason Dillaman [Tue, 26 Jan 2021 01:45:40 +0000 (20:45 -0500)]
librbd/migration: refactor lookup table handling for QCOW format

This will be used by a refactored list-snaps state machine to compute
the L2 table cluster for image offsets. The L1 and L2 lookup tables
can now be represented in a single structure.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 83687244025d36af45da03313e6d3002767a70cb)

4 years agolibrbd/migration: tweaks to QCOWFormat discovered during unit testing
Jason Dillaman [Mon, 18 Jan 2021 21:37:33 +0000 (16:37 -0500)]
librbd/migration: tweaks to QCOWFormat discovered during unit testing

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 7090ca4a0883c7411038c1d17ee168a0be3a013c)

4 years agolibrbd: tweaks to support Boost 1.75.0
Jason Dillaman [Wed, 27 Jan 2021 14:12:58 +0000 (09:12 -0500)]
librbd: tweaks to support Boost 1.75.0

Fixes: https://tracker.ceph.com/issues/48989
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 4d80c798a735d2c1e3d9b25825a96076942af141)

4 years agoMerge pull request #39084 from dillaman/wip-librbd-backports-pacific
Jason Dillaman [Wed, 27 Jan 2021 18:33:56 +0000 (13:33 -0500)]
Merge pull request #39084 from dillaman/wip-librbd-backports-pacific

pacific: librbd: miscellaneous backports

Reviewed-by: Mykola Golub <mgolub@suse.com>
4 years agolibrbd/cmake: add library dependency for pwl_cache 39084/head
lixiaoy1 [Fri, 22 Jan 2021 16:10:15 +0000 (11:10 -0500)]
librbd/cmake: add library dependency for pwl_cache

Signed-off-by: Li, Xiaoyan <xiaoyan.li@intel.com>
(cherry picked from commit d1e80348c72c94bc07e8c7528fa6f241c2dd2364)

4 years agoqa/tests: disable test_rbd_python.disable ref: https://tracker.ceph.com/issues/48759 39066/head
Yuri Weinstein [Tue, 26 Jan 2021 22:45:29 +0000 (14:45 -0800)]
qa/tests: disable test_rbd_python.disable ref: https://tracker.ceph.com/issues/48759

Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
4 years agoMerge pull request #39079 from idryomov/wip-doc-osdtimeout-pacific
Ilya Dryomov [Wed, 27 Jan 2021 10:30:43 +0000 (11:30 +0100)]
Merge pull request #39079 from idryomov/wip-doc-osdtimeout-pacific

pacific: doc: don't mention osdtimeout option in mount.ceph man page

Reviewed-by: Jeff Layton <jlayton@redhat.com>
4 years agoMerge pull request #39078 from idryomov/wip-krbd-msgr2-pacific
Ilya Dryomov [Wed, 27 Jan 2021 10:30:01 +0000 (11:30 +0100)]
Merge pull request #39078 from idryomov/wip-krbd-msgr2-pacific

pacific: krbd: add support for msgr2 (kernel 5.11)

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #39088 from idryomov/wip-make-check-pacific
Jason Dillaman [Tue, 26 Jan 2021 22:19:42 +0000 (17:19 -0500)]
Merge pull request #39088 from idryomov/wip-make-check-pacific

pacific: fix build and make check (cram version and zbd dependency)

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoqa/tests: added centos yaml
Yuri Weinstein [Tue, 26 Jan 2021 16:15:08 +0000 (08:15 -0800)]
qa/tests: added centos yaml

Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
4 years agocmake: let alienstore link against zoned allocator 39088/head
Kefu Chai [Tue, 26 Jan 2021 18:04:52 +0000 (02:04 +0800)]
cmake: let alienstore link against zoned allocator

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 6883b64205d83947235b5492f6db279b753c4d14)

4 years agotest/librbd: fix luks encryption cli test on unsupported runs
Or Ozeri [Tue, 26 Jan 2021 16:54:05 +0000 (18:54 +0200)]
test/librbd: fix luks encryption cli test on unsupported runs

This commit changes the luks encryption cli test to return success instead of failure when not supported.

Signed-off-by: Or Ozeri <oro@il.ibm.com>
(cherry picked from commit 2f1eb8eba0f50e59eb42bceb3427be463b249832)

4 years agoqa/tasks/rbd: cleanup passphrase file
Or Ozeri [Tue, 26 Jan 2021 15:02:37 +0000 (17:02 +0200)]
qa/tasks/rbd: cleanup passphrase file

This commit adds a cleanup for the passphrase file used to create/mount encrypted rbd images.

Signed-off-by: Or Ozeri <oro@il.ibm.com>
(cherry picked from commit 8498da2aca43c96e0d54aa688fc2b80002083149)

4 years agoinstall-deps.sh: set codename when installing libzbd
Kefu Chai [Tue, 26 Jan 2021 10:20:45 +0000 (18:20 +0800)]
install-deps.sh: set codename when installing libzbd

this was an oversight in e7e3b86762ff3fccdae21e713c64215ab3bb7bb4

also use updated build with sha1 of
1fadde94b08fab574b17637c2bebd2b1e7f9127b, the older version has an issue
where both libzbd and libzbd-dev packaged .pc file with the same path,
so they conflicted with each other. the new version addressed this
issue.

and install libzbd-dev instead of libzbd and libzbd-dev, as the package
name of the former could change if its so version is bumped, so use the
*-dev package is a safer choice from the perspective of testing the
dev build.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit af43300146811ffe3708891e203c7ac59d8bcc18)