* Fixed a bug where ip_addresses could break resync when 2+ machines had the same IP (ie: 192.168.122.1).
* Updated logging of DB transactions to show the DB host's IP instead of the UUID.
* Updated Get->date_and_time to take a 'use_utc' parameter to return the time using GMT time instead of the host's TZ.
* Updated anvil-daemon to periodically call tools/anvil-update-states. Also upadted anvil-daemon to delay daily jobs by 2 hours except for the dashboard with the highest sorted UUID to minimize dual runs of tasks that only need to run once per day per cluster.
Signed-off-by: Digimer <digimer@alteeve.ca>
$query.="modified_date = ".$anvil->Database->quote($modified_date)."::timestamp AT TIME ZONE 'UTC' WHERE $uuid_column = ".$anvil->Database->quote($row_uuid).";";
$query.="modified_date = ".$anvil->Database->quote($modified_date)."::timestamp AT TIME ZONE 'UTC' WHERE $uuid_column = ".$anvil->Database->quote($row_uuid).";";
$query="INSERT INTO public.$table ($host_column, $uuid_column, ".$columns."modified_date) VALUES (".$anvil->Database->quote($anvil->data->{sys}{host_uuid}).", ".$anvil->Database->quote($row_uuid).", ".$values.$anvil->Database->quote($modified_date)."::timestamp AT TIME ZONE 'UTC');";
$query="INSERT INTO public.$table ($host_column, $uuid_column, ".$columns."modified_date) VALUES (".$anvil->Database->quote($anvil->data->{sys}{host_uuid}).", ".$anvil->Database->quote($row_uuid).", ".$values.$anvil->Database->quote($modified_date)."::timestamp AT TIME ZONE 'UTC');";
$query="INSERT INTO history.$table ($host_column, $uuid_column, ".$columns."modified_date) VALUES (".$anvil->Database->quote($anvil->data->{sys}{host_uuid}).", ".$anvil->Database->quote($row_uuid).", ".$values.$anvil->Database->quote($modified_date)."::timestamp AT TIME ZONE 'UTC');";
$query="INSERT INTO history.$table ($host_column, $uuid_column, ".$columns."modified_date) VALUES (".$anvil->Database->quote($anvil->data->{sys}{host_uuid}).", ".$anvil->Database->quote($row_uuid).", ".$values.$anvil->Database->quote($modified_date)."::timestamp AT TIME ZONE 'UTC');";
<keyname="log_0458">Vacuuming the database to purge the removed records.</key>
<keyname="log_0458">Vacuuming the database to purge the removed records.</key>
<keyname="log_0459">Skipping the table: [#!variable!table!#], it is excluded from archiving.</key>
<keyname="log_0459">Skipping the table: [#!variable!table!#], it is excluded from archiving.</key>
<keyname="log_0460">Queing up to run: [#!variable!uuid!#]:[#!variable!query!#]</key>
<!-- Test words. Do NOT change unless you update 't/Words.t' or tests will needlessly fail. -->
<!-- Test words. Do NOT change unless you update 't/Words.t' or tests will needlessly fail. -->
<keyname="t_0000">Test</key>
<keyname="t_0000">Test</key>
@ -1128,7 +1129,7 @@ Failure! The return code: [#!variable!return_code!#] was received ('0' was expec
<keyname="job_0069">Unable to find a matching network, skipping this database.</key>
<keyname="job_0069">Unable to find a matching network, skipping this database.</key>
<keyname="job_0070">Something went wrong adding this database. Please see: [#!data!path::log::main!#] for details.</key>
<keyname="job_0070">Something went wrong adding this database. Please see: [#!data!path::log::main!#] for details.</key>
<!-- Warnings -->
<!-- Warnings: TODO: Take 'striker_' off-->
<keyname="striker_warning_0001">The IP address will change. You will need to reconnect after applying these changes.</key>
<keyname="striker_warning_0001">The IP address will change. You will need to reconnect after applying these changes.</key>
<keyname="striker_warning_0002">The access information appears to not be valid.</key>
<keyname="striker_warning_0002">The access information appears to not be valid.</key>
<keyname="striker_warning_0003">Test access to the peer (using SSH) failed. There may be details in the log file.</key>
<keyname="striker_warning_0003">Test access to the peer (using SSH) failed. There may be details in the log file.</key>
@ -1144,6 +1145,7 @@ Failure! The return code: [#!variable!return_code!#] was received ('0' was expec
<keyname="striker_warning_0013"><![CDATA[The target's host key has changed. If the target has been rebuilt, or the target IP reused, the old key will need to be removed. <a href="?striker=true&task=keys" target="_new">Click here</a> to resolve.]]></key>
<keyname="striker_warning_0013"><![CDATA[The target's host key has changed. If the target has been rebuilt, or the target IP reused, the old key will need to be removed. <a href="?striker=true&task=keys" target="_new">Click here</a> to resolve.]]></key>
<keyname="striker_warning_0014">The host UUID: [#!variable!host_uuid!#] was not found in the #!data!path::json::all_status!# file on the local dashboard.</key>
<keyname="striker_warning_0014">The host UUID: [#!variable!host_uuid!#] was not found in the #!data!path::json::all_status!# file on the local dashboard.</key>
<keyname="striker_warning_0015">To configure a host as either an Anvil! node or a disaster recovery host, there must be at least 6 network interfaces. This machine only has: [#!variable!interface_count!#] interfaces.</key>
<keyname="striker_warning_0015">To configure a host as either an Anvil! node or a disaster recovery host, there must be at least 6 network interfaces. This machine only has: [#!variable!interface_count!#] interfaces.</key>
<keyname="warning_0016">No databases are available. Changes to the network interfaces will be cached.</key>
<!-- Errors -->
<!-- Errors -->
<keyname="error_0001">There are not enough network interfaces on this machine. You have: [#!variable!interface_count!#] interface(s), and you need at least: [#!variable!required_interfaces_for_single!#] interfaces to connect to the requested networks (one for Back-Channel and one for each Internet-Facing network).</key>
<keyname="error_0001">There are not enough network interfaces on this machine. You have: [#!variable!interface_count!#] interface(s), and you need at least: [#!variable!required_interfaces_for_single!#] interfaces to connect to the requested networks (one for Back-Channel and one for each Internet-Facing network).</key>