* Fixed some logging in Get->cgi() and generally cleaned up logging levels.
* Got striker to the point where the job to reconfigure the network is saved in the database and the dashboard goes offline until it is done.
* Created the start of the new anvil-configure-network tool.
Signed-off-by: Digimer <digimer@alteeve.ca>
# This sets a flag that disables this dashboard and requests the reconfiguration of this system.
sub update_system
{
my ($anvil) = @_;
return(0);
}
# This checks to see if anything is running that requires Striker being unavailable. If not, this returns
# '1'. If there is a job pending/running, it returns '0'
sub check_availability
@ -174,11 +169,64 @@ sub check_availability
my ($anvil) = @_;
my $available = 1;
my $query = "SELECT count(*) FROM jobs WHERE job_name = 'configure::network' AND job_progress != 100 AND job_host_uuid = ".$anvil->data->{sys}{use_db_fh}->quote($anvil->Get->host_uuid).";";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { query => $query }});
my $count = $anvil->Database->query({query => $query, source => $THIS_FILE, line => __LINE__})->[0]->[0];
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { 'say::maintenance' => $anvil->data->{say}{maintenance} }});
if ($count)
{
# We're waiting for the network configuration
$available = 0;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { available => $available }});
@ -293,6 +293,14 @@ Here we will inject 't_0006', which injects 't_0001' which has a variable: [#!st
<keyname="striker_0041">We're almost ready! Does this look right? If so, we'll setup this Striker dashboard.</key>
<keyname="striker_0042">What we are planning to do...</key>
<keyname="striker_0043">Apply New Configuration</key>
<keyname="striker_0044">Done!</key>
<keyname="striker_0045">The network will be reconfigured momentarily. You may need to reconnect using the new network address you chose.</key>
<keyname="striker_0046">Offline...</key>
<keyname="striker_0047">A job to reconfigure the network on this machine is underway. Please try again soon.</key>
<!-- Strings used by jobs -->
<keyname="job_0001">Configure Network</key>
<keyname="job_0002">The network configuration will be updated based on the variables stored in the database. Reconnecting to the machine using the new IP address may be required.</key>
<!-- Warnings -->
<keyname="striker_warning_0001">The IP address will change. You will need to reconnect after applying these changes.</key>