we only support following types:
'uint', 'int', 'str', 'float', 'bool', 'addr', 'addrvec', 'uuid',
'size', 'secs',
see also str_to_type()
Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake: let alienstore link against zoned allocator
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
* refs/pull/39028/head:
cephadm: retry for 30s instead of 10s
cephadm: try 'mgr stat' before 'mgr dump' to get the epoch
mon: add 'mgr stat' command
Reviewed-by: Sebastian Wagner <swagner@suse.com>
this was an oversight in e7e3b86762
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>
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>
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>
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>
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>
pip use the new resolver by default now. so no need to pass this option
to it anymore.
This reverts commit fa9e2bfd4b.
Signed-off-by: Kefu Chai <kchai@redhat.com>
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>
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>
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>
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>
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>
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>