Skip to content

Commit d51e251

Browse files
committed
src/mon/PGMap: raise POOL_APP_NOT_ENABLED after some time for new pool
Fixes: https://tracker.ceph.com/issues/63192 Signed-off-by: junxiang Mu <[email protected]>
1 parent f1761d6 commit d51e251

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

src/common/options/mgr.yaml.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,15 @@ options:
292292
default: true
293293
services:
294294
- mgr
295+
- name: mon_warn_on_pool_no_app_grace
296+
type: secs
297+
level: dev
298+
desc: time after which POOL_APP_NOT_ENABLED health warning is issued
299+
default: 5_min
300+
services:
301+
- mgr
302+
see_also:
303+
- mon_warn_on_pool_no_app
295304
- name: mon_warn_on_too_few_osds
296305
type: bool
297306
level: advanced

src/mon/PGMap.cc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3348,9 +3348,13 @@ void PGMap::get_health_checks(
33483348
// application metadata is not encoded until luminous is minimum
33493349
// required release
33503350
if (pool.application_metadata.empty() && !pool.is_tier()) {
3351-
stringstream ss;
3352-
ss << "application not enabled on pool '" << pool_name << "'";
3353-
detail.push_back(ss.str());
3351+
utime_t now(ceph::real_clock::now());
3352+
if ((now - pool.get_create_time()) >
3353+
g_conf().get_val<std::chrono::seconds>("mon_warn_on_pool_no_app_grace").count()) {
3354+
stringstream ss;
3355+
ss << "application not enabled on pool '" << pool_name << "'";
3356+
detail.push_back(ss.str());
3357+
}
33543358
}
33553359
}
33563360
if (!detail.empty()) {

0 commit comments

Comments
 (0)