Commit Graph

10 Commits

Author SHA1 Message Date
Digimer
2c23c6beba * Improved infinite loop handling in Log->entry, but broke the Striker UI in the process. To be fixed next...
* Added a 'test' parameter to Log->entry, Storage->make_directory and Words->key to help debug in places that Log->x may not be usable.
* Converted many $anvil->Log->x calls to print if $test to help prevent recursive loops, but not all fixed yet.
* Added the new 'host_keys' database table to the schema for a possible new feature of removing passwords in favour if machines adding peers' public keys to their authorized_hosts file.
* Cleaned up the opening calls to $anvil->Tools->new() in most tools.
* Cleaned up some variables in tools/anvil-update-states after reading their values from files (clean trailing newlines).

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-01-18 03:19:36 -05:00
Digimer
43035ba038 * Fixed a subtle an annoying autovivication bug in Database->write().
* Cleaned up some logging.
* Made the "Reload" buttons work more sensibly and cleaned up some webui display stuff.
* Got deleting peers mostly working (well, it works, but then it goes into a loop thinking it needs to resync the now-gone database until the daemon restarts).
* Fixed a race condition bug where if a job exited between the time that anvil-daemon got a list of PIDs and when it checked to see if that specific pid was alive, a job that actually completed could be restarted.
* Added a loop check to anvil-manage-striker-peers where it would hold until a database connection to the newly added peer was available, preventing a condition where re-adding a peer (and so the host_uuid is in hosts) cause the job belonging to the peer to be recorded locally and then never synced to the peer.

Signed-off-by: Digimer <digimer@alteeve.ca>
2018-10-04 03:37:43 -04:00
Digimer
facefeaccc * Fixed a bug in anvil-daemon where completed jobs could be immediately cleared, causing them to re-run (repeatedly).
* Added 'sys::log_date' which controls if the date and time is pre-pended to log entries.
* Created Get->host_name() which takes a host UUID and returns the 'host_name' from the 'hosts' table, if found.
* Cleaned up some HTML templates and logging.

Signed-off-by: Digimer <digimer@alteeve.ca>
2018-09-28 01:50:38 -04:00
Digimer
c6e781d80b * Adding database peers (local and bidirectional) now works!
Signed-off-by: Digimer <digimer@alteeve.ca>
2018-09-13 17:08:50 -04:00
Digimer
7bd65f65e5 * Finished the first round of updates to anvil-manage-striker-peers, but the initial resync is failing because of unrelated schema issues.
* Updated Database->insert_or_update_jobs() to also use the job_command when looking for an existing job (when a specific job_uuid was not included).
* Fixed a bug with a missing ? in striker->add_sync_peer function. Also updated it to not try to record the peer's job as it is unlikely the peer will be in hosts. Instead, the job_command to add the peer is appended to the local job't job_data and the updated anvil-manage-striker-peers looks for that at the end of the add and sync, and records the job once the peer's UUID is in 'hosts'.

Signed-off-by: Digimer <digimer@alteeve.ca>
2018-09-13 02:22:35 -04:00
Digimer
2a03663ecf * Created System->find_matching_ip() which takes a host and finds which local network (if any) is on the same subnet.
* Continued work on managing Striker peers.

Signed-off-by: Digimer <digimer@alteeve.ca>
2018-09-10 19:54:22 -04:00
Digimer
252fbf21ef * Fixed a bug where '$anvil->' wasn't referencing '$anvil->data->' when it should have been.
* Got anvil-manage-striker-peers working properly (so far).
* Updated anvil-prep-database to call anvil-manage-striker-peers, but testing still needed.

Signed-off-by: Digimer <digimer@alteeve.ca>
2018-08-13 02:22:46 -04:00
Digimer
1106d36e03 * Fixed bugs in tools/anvil-manage-striker-peers, basic testing done.
Signed-off-by: Digimer <digimer@alteeve.ca>
2018-08-11 23:20:03 -04:00
Digimer
f9ce6e1154 * Finished, but not yet tested, tools/anvil-manage-striker-peers.
Signed-off-by: Digimer <digimer@alteeve.ca>
2018-08-10 00:57:09 -04:00
Digimer
89c06b9f24 * Started work on tools/anvil-manage-striker-peers to do the actual work on managing local and peer databases in anvil.conf.
Signed-off-by: Digimer <digimer@alteeve.ca>
2018-08-08 15:10:29 -04:00