Commit 678a5a34 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Ignore isalive from local nodes. The new image will run a watchdog

like the remote nodes do, but for now do not update the up/down status
from that. I need to mess with db/node_status first to make sure there
is agreement between the parties. Note that remote nodes send one UDP
message every 60 seconds (isalive is done with a UDP). Local nodes
will send them at a slower rate, as is the practice in db/node_status
which wakes up every 5 minutes and fpings the world!
parent 96f3d827
......@@ -3632,10 +3632,16 @@ COMMAND_PROTOTYPE(doisalive)
int doaccounts = 0;
char buf[MYBUFSIZE];
mydb_update("update nodes "
"set status='up',status_timestamp=now() "
"where node_id='%s' or phys_nodeid='%s'",
nodeid, nodeid);
/*
* Only for remote nodes now; local node status determined with
* with fping via db/node_status script. Need to replace that.
*/
if (! islocal) {
mydb_update("update nodes "
"set status='up',status_timestamp=now() "
"where node_id='%s' or phys_nodeid='%s'",
nodeid, nodeid);
}
/*
* Return info about what needs to be updated.
......@@ -3815,7 +3821,8 @@ COMMAND_PROTOTYPE(dontpdrift)
}
mydb_update("update nodes set ntpdrift='%f' where node_id='%s'",
drift, nodeid);
info("NTPDRIFT: %f", drift);
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment