]> git.proxmox.com Git - pve-cluster.git/blobdiff - data/src/status.c
actually add priv/tfa.cfg to observed files
[pve-cluster.git] / data / src / status.c
index 5fe1eb9e94d1862f018a7f032a638a795b498151..3a52e9bc8fe5e8401750215d4dd79d73f97bd757 100644 (file)
@@ -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;