* To address issues with scancore debugging, we needed a tool to purge old anvils and hosts from the database. The 'test.pl' in this commit contains the new logic that will be merged into tools/striker-purge-host shortly.
* Created Database->find_host_uuid_columns() and ->_find_column() to create a list of tables and column names in the proper order to allow deletion of foreign keys to that deeply nested primary keys can be deleted. Specifically, this was meant for hosts -> host_uuid and anvils -> anvil_uuid, though it should work for other tables.
* Updated html/jquery-ui-1.12.1/package.json to address CVE-2020-7729
* Fixed a bug in the temperature table's history procedure where temperature_weight wasn't being copied.
* Updated anvil-provision-server to support '--anvil' that can take either the anvil-uuid or anvil-name.
* Updated anvil-safe-stop to default the stop-reason to 'user'.
Signed-off-by: Digimer <digimer@alteeve.ca>
my$query="SELECT column_name FROM information_schema.columns WHERE table_catalog = ".$anvil->Database->quote($anvil->data->{sys}{database}{name})." AND table_schema = 'public' AND table_name = ".$anvil->Database->quote($table)." AND data_type = 'uuid' AND is_nullable = 'NO' AND column_name LIKE '\%_".$search_column."';";
@ -413,6 +413,8 @@ The attempt to start the servers appears to have failed. The return code '0' was
<keyname="error_0299">This host is not in a cluster, or it's in the cluster but not ready yet. Either way, unable to check the config.</key>
<keyname="error_0300">Failed to find the install manifest for the: [#!variable!anvil_name!#] Anvil! system. Unable to check or update the fence configuration.</key>
<keyname="error_0301">Failed to parse the install manifest with UUID: [#!variable!manifest_uuid!#]. Unable to check or update the fence configuration.</key>
<keyname="error_0302">The passed in Anvil! UUID: [#!variable!anvil_uuid!#] was not found in the database.</key>
<keyname="error_0303">The passed in host UUID: [#!variable!host_uuid!#] was not found in the database.</key>
<!-- Files templates -->
<!-- NOTE: Translating these files requires an understanding of which likes are translatable -->
@ -1911,6 +1913,13 @@ Are you sure that you want to delete the server: [#!variable!server_name!#]? [Ty
<keyname="message_0237">One or more servers are migrating. While this is the case, ScanCore post-scan checks are not performed.</key>
<keyname="message_0238">Preventative live migration has completed.</key>
<keyname="message_0239">Preventative live migration has been disabled. We're healthier than our peer, but we will take no action.</key>
<keyname="message_0240"><![CDATA[Please specify the Anvil! or host you want to purge. Use '--anvil <name_or_uuid>' or '--host <name_or_uuid>'.]]></key>
<keyname="message_0241"><![CDATA[Used '-y' or '--yes', proceeding automatically.]]></key>
<keyname="message_0242">Are you sure that you want to completely purge: [#!variable!host_name!#] (UUID: [#!variable!host_uuid!#] from the Anvil! database(s)?</key>
<keyname="message_0243">Are you sure that you want to completely purge the Anvil!: [#!variable!anvil_name!#] (UUID: [#!variable!anvil_uuid!#] along with the machines:</key>
# hosts without any further references. As each delete is done, delete it. Loop until all entries are
# gone.
die;
# Load all the known tables in the DB.
my $query = "SELECT schemaname||'.'||tablename AS table_name FROM pg_catalog.pg_tables WHERE schemaname = 'history' ORDER BY tablename ASC, schemaname ASC;";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { query => $query }});