
This check does not require manually setting the number of expected OSDs. Initially, the charm sets the count (per-host) to that of what's present in the OSD tree. The count will be updated (on a per-host basis) when the number of OSDs grows, but not when it shrinks. There is a charm action to reset the expected count using information from the OSD tree. Closes-Bug: #1952985 Change-Id: Ia6a060bf151908c1d4159e6bdffa7bfe1f0a7988
29 lines
824 B
Python
Executable File
29 lines
824 B
Python
Executable File
#!/usr/bin/env python3
|
|
#
|
|
# Copyright 2021 Canonical Ltd
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
import sys
|
|
|
|
sys.path.append("hooks")
|
|
from ceph_hooks import update_host_osd_count_report
|
|
|
|
|
|
def reset_osd_count_report():
|
|
update_host_osd_count_report(reset=True)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
reset_osd_count_report()
|