X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=data%2Fsrc%2Fstatus.c;h=3a52e9bc8fe5e8401750215d4dd79d73f97bd757;hb=8a9456dc709103f743aa12a9041700ed8dcc11b0;hp=5fe1eb9e94d1862f018a7f032a638a795b498151;hpb=f6de131a83c6748a13da63db5470e1d368eb9dc1;p=pve-cluster.git diff --git a/data/src/status.c b/data/src/status.c index 5fe1eb9..3a52e9b 100644 --- a/data/src/status.c +++ b/data/src/status.c @@ -81,6 +81,7 @@ static memdb_change_t memdb_change_array[] = { { .path = "user.cfg" }, { .path = "domains.cfg" }, { .path = "priv/shadow.cfg" }, + { .path = "priv/tfa.cfg" }, { .path = "datacenter.cfg" }, { .path = "vzdump.cron" }, { .path = "ha/crm_commands" }, @@ -90,6 +91,7 @@ static memdb_change_t memdb_change_array[] = { { .path = "ha/fence.cfg" }, { .path = "status.cfg" }, { .path = "replication.cfg" }, + { .path = "ceph.conf" }, }; static GMutex mutex; @@ -1076,10 +1078,13 @@ void cfs_rrd_dump(GString *str) { time_t ctime; - time(&ctime); + g_mutex_lock (&mutex); + + time(&ctime); if (rrd_dump_buf && (ctime - rrd_dump_last) < 2) { g_string_assign(str, rrd_dump_buf); + g_mutex_unlock (&mutex); return; } @@ -1108,6 +1113,8 @@ cfs_rrd_dump(GString *str) if (rrd_dump_buf) g_free(rrd_dump_buf); rrd_dump_buf = g_strdup(str->str); + + g_mutex_unlock (&mutex); } static gboolean @@ -1299,7 +1306,7 @@ cfs_create_status_msg( if (!nodename || !nodename[0] || !strcmp(nodename, cfs.nodename)) { kvhash = cfs_status.kvhash; - } else { + } else if (cfs_status.clinfo && cfs_status.clinfo->nodes_byname) { cfs_clnode_t *clnode; if ((clnode = g_hash_table_lookup(cfs_status.clinfo->nodes_byname, nodename))) kvhash = clnode->kvhash;