* Moved System->is_local to Network->is_local, and System->ping to Network->ping.
* Added a check to tools/striker-get-peer-data that will report if the target has Internet access or not.
* Cleaned up the form that prompts the user to enter their Red Hat credentials.
* Updated tools/anvil-manage-keys (and related code) to no longer distinguish by user. If a target is flagged as changed, it is removed from the root and all user's known_hosts files.
* Updated Storage->write_file() and ->update_file() to accept the 'backup' parameter to control if an file that exists is backed up before being updated/replaced.
Signed-off-by: Digimer <digimer@alteeve.ca>
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { rh_template => $rh_template }});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => {
redhat_form => $redhat_form,
redhat_message => $redhat_message,
}});
}
### NOTE: Left off here. Need to pick up the message from a bad/changed fingerprint when it's the cause of a failed login. Create a button to remove the bad key.
# Did we connect?
if (not $connected)
{
# Is it because the target's key is bad or has changed?
my $query = "SELECT state_uuid, state_note FROM states WHERE state_name LIKE ".$anvil->Database->quote("host_key_changed::".$host_ip_address."::%").";";
# Nope. Is it because the target's key is bad or has changed?
my $query = "SELECT state_uuid, state_note FROM states WHERE state_name LIKE ".$anvil->Database->quote("host_key_changed::".$host_ip_address).";";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { query => $query }});
my $results = $anvil->Database->query({query => $query, source => $THIS_FILE, line => __LINE__});
@ -922,11 +925,19 @@ sub process_prep_host_page
else
{
# Connected! Ask th euser to confirm.
my $new_host_name = "#!string!striker_0139!#";
if ((exists $anvil->data->{cgi}{host_name}) && ($anvil->data->{cgi}{host_name}{value}))
@ -252,7 +252,7 @@ About to try to download aproximately: [#!variable!packages!#] packages needed t
<keyname="message_0145">Red Hat password</key>
<keyname="message_0146">What kind of machine will this host be?</key>
<keyname="message_0147"><![CDATA[What is the host's <b>current</b> IP address and password?]]></key>
<keyname="message_0148"><![CDATA[This is a RHEL host and has not yet been subscribed.<br/>You can enter your Red Hat subscription credentials below.<br />The host will be subscribed during setup.]]></key>
<keyname="message_0148"><![CDATA[This is a RHEL host and has not yet been subscribed. You can enter your Red Hat subscription credentials below. If the host has internet access, the host will be subscribed during setup.]]></key>
<keyname="message_0149">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. If this is the case, remove line: [#!variable!line!#] from: [#!variable!file!#].</key>
<keyname="message_0150">Set the new host name.</key>
@ -764,6 +764,9 @@ Failed to promote the DRBD resource: [#!variable!resource!#] primary. Expected a
<keyname="log_0437">The anvil version cache file: [#!variable!file!#] for: [#!variable!target!#] needs to be created/updated.</key>
<keyname="log_0438"><![CDATA[[ Error ] - No job was found for the 'job_uuid': [#!variable!job_uuid!#].]]></key>
<keyname="log_0439">No databases available yet, continuing to wait.</key>
<keyname="log_0440">The variable: [#!variable!name!#] is an array reference, but it doesn't have any entries in it.</key>
<keyname="log_0441">The variable: [#!variable!name!#] was expected to be a positive integer, but: [#!variable!value!#] was received.</key>
<keyname="log_0442">The domain: [#!variable!name!#] does not appear to be a valid domain name or an ipv4 IP address. Skipping it.</key>
<!-- Test words. Do NOT change unless you update 't/Words.t' or tests will needlessly fail. -->
<keyname="t_0000">Test</key>
@ -930,8 +933,8 @@ Here we will inject 't_0006', which injects 't_0001' which has a variable: [#!st
<keyname="striker_0121">Prepare Node or DR Host</key>
<keyname="striker_0122">Please enter the IP address and root password of the target machine you want to configure.</key>
<keyname="striker_0123">'root' Password</key>
<keyname="striker_0124"><![CDATA[The test connection was successful!<br />If you initialize, the target will have the Alteeve repo added and: [#!variable!package!#] installed.<br/>The target will be configured to use this and our peer's databases.]]></key>
<keyname="striker_0125">Initialize Host</key>
<keyname="striker_0124"><![CDATA[The test connection was successful! If you proceed with initialization, the target will have the Alteeve repo added and: [#!variable!package!#] installed. The target will also be configured to use our database.]]></key>
<keyname="striker_0125">Host to Initialize</key>
<keyname="striker_0126">Current host name</key>
<keyname="striker_0127">Host UUID</key>
<keyname="striker_0128">Initialize</key>
@ -950,6 +953,8 @@ The machines responding when we try to connect to the targets below are respondi
<br/>
If you are comfortable that the target has changed for a known reason, you can select the broken keys below to have them removed.<br/>
@ -1014,10 +1019,10 @@ Failure! The return code: [#!variable!return_code!#] was received ('0' was expec
<keyname="job_0043">Verifying installation.</key>
<keyname="job_0044">[ Failed ] - There may be more information in #!data!path::log::file!#.</key>
<keyname="job_0045">Success!</key>
<keyname="job_0046">Adding our database connection information to the target's anvil.conf file!</key>
<keyname="job_0046">Adding our database connection information to the target's anvil.conf file.</key>
<keyname="job_0047">Finished! The target should be ready for initial configuration shortly. If it isn't, please check that the 'anvil-daemon' daemon is running.</key>
<keyname="job_0048">Removing bad machine keys.</key>
<keyname="job_0049">Removing line: [#!variable!line!#] from: [#!variable!file!#] for the target machine: [#!variable!target!#].</key>
<keyname="job_0049">Removing existing entries for the target machine: [#!variable!target!#] from: [#!variable!file!#].</key>
<keyname="job_0050">[ Error ] - The known hosts file: [#!variable!file!#] was not found. Skipping it.</key>
<keyname="job_0051">Finished.</key>
<keyname="job_0052">[ Error ] - There was a problem reading the known hosts file: [#!variable!file!#]. Skipping it.</key>