]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: read volume metadata file using read_string
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 12 Jul 2022 22:32:54 +0000 (18:32 -0400)
committerKotresh HR <khiremat@redhat.com>
Tue, 23 Aug 2022 04:46:50 +0000 (10:16 +0530)
commitba8b02e463136180eebd881b7ce76eefffc45a0a
treec160e821b601fcb96da08f4f064ff67c466596fb
parent39fb552f874d6b3747e3ee10d12a50efeea8853d
mgr/volumes: read volume metadata file using read_string

The read_string method, available in Python 3.2 (we assume Python 3.6 as
our current minimum python versino), supports parsing a provided string
for ini-style configuration parameters. Refactoring the reading of the
config file from cephfs into a simple iterator function and then
providing it to the ConfigParser as a single string, allows us to avoid
using StringIO and  simplifies the refresh function.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit dc1b4aac90beb82fd994ad7fa8ccf3b72b9936ac)
src/pybind/mgr/volumes/fs/operations/versions/metadata_manager.py