Skip to content

Commit ac5b3f9

Browse files
authored
Merge pull request ceph#57836 from guojidan/warn-pool-app
src/mon/PGMap: raise POOL_APP_NOT_ENABLED after some time for new pool Reviewed-by: Ilya Dryomov <[email protected]>
2 parents 988c45e + d51e251 commit ac5b3f9

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
@@ -3352,9 +3352,13 @@ void PGMap::get_health_checks(
33523352
// application metadata is not encoded until luminous is minimum
33533353
// required release
33543354
if (pool.application_metadata.empty() && !pool.is_tier()) {
3355-
stringstream ss;
3356-
ss << "application not enabled on pool '" << pool_name << "'";
3357-
detail.push_back(ss.str());
3355+
utime_t now(ceph::real_clock::now());
3356+
if ((now - pool.get_create_time()) >
3357+
g_conf().get_val<std::chrono::seconds>("mon_warn_on_pool_no_app_grace").count()) {
3358+
stringstream ss;
3359+
ss << "application not enabled on pool '" << pool_name << "'";
3360+
detail.push_back(ss.str());
3361+
}
33583362
}
33593363
}
33603364
if (!detail.empty()) {

0 commit comments

Comments
 (0)