* Updated Get->users_home() to default to return the hore directory for the user running the program.
* Updated Remote->call() to start working on handling timeouts.
* Updated Storage->change_owner(), ->make_directory() and ->write_file() to default the the user and group running the program.
* Fixed a bug in home reporting the MAC address of NICs when confirming configuration of Striker. Also changed showing the domain to the hostname.
* Got more work done on sync peers.
* Updated the RPM spec file to install on Fedora 28.
Signed-off-by: Digimer <digimer@alteeve.ca>
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { peer_host => $peer_host }});
}
}
}
# Lastly, verify we can access the peer database. This will involve writting out a .pgpass file, then making a local system call.
# Now, verify we can access the peer database. This will involve writting out a .pgpass file, then making a local system call.
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { "form::error_massage" => $anvil->data->{form}{error_massage} }});
if (not $anvil->data->{form}{error_massage})
{
my $pgpass_file = "/tmp/.pgpass";
my $password = $anvil->data->{cgi}{new_peer_password}{value};
$password =~ s/:/\:/g;
my $pgpass = $host.":".$port.":".$name.":".$user.":".$password;
my $body = $host.":".$port.":".$name.":".$user.":".$password;
$anvil->Storage->write_file({
file => $pgpass_file,
body => $body,
mode => "0600",
secure => 1,
});
# Write out the .pgpass file.
# TODO: Left off here, write out .pgpass, set the mode to 0600, then call 'psql --host 10.1.4.1 --port 5432 --dbname anvil --username admin --no-password --command "SELECT 1" '
When the peer is added, all data from this host will be copied to the peer's database. Depending on how much data this is, how fast the connection is, and how fast the local machine is, this sync process could take a little time.
@ -29,7 +29,7 @@ Author: Madison Kelly <mkelly@alteeve.ca>
<keyname="message_0005">There was an unknown error while connecting to: [#!variable!target!#]. The error was: [#!variable!error!#]</key>
<keyname="message_0006">We were unable to log in to: [#!variable!target!#]. Please check that the password is correct or that passwordless SSH is configured properly.</key>
<keyname="message_0007">An SSH session was successfully opened to: [#!variable!target!#].</key>
<keyname="message_0008">There was a problem establishing an SSH channel to the target: [#!variable!target!#] for shell call: [#!variable!shell_call!#]</key>
<keyname="message_0008">There was a problem establishing an SSH channel to the target: [#!variable!target!#].</key>
<keyname="message_0009">The SSH session to: [#!variable!target!#] was successfully closed.</key>
<keyname="message_0010">The SSH session to: [#!variable!target!#] was closed because 'no_cache' was set and there was an open SSH connection.</key>
<keyname="message_0011">Wrote the system UUID to the file: [#!variable!file!#] to enable the web based tools to read this system's UUID.</key>
@ -284,7 +284,7 @@ The database connection error was:
<keyname="log_0183">The user: [#!variable!user!#] logged in successfully.</key>
<keyname="log_0184">Theew was a failed login attempt from: [#!variable!user_agent!#], trying to log in as: [#!variable!user!#]. log in rejected.</key>
<keyname="log_0185"><![CDATA[<unknown>]]></key><!-- Used in some cases when a variable isn't known -->
<keyname="log_0186"><![CDATA[<supressed>]]></key><!-- Used in some cases when a variable isn't known -->
<keyname="log_0186"><![CDATA[<suppressed>]]></key><!-- Used in some cases when a variable isn't known -->
<!-- Test words. Do NOT change unless you update 't/Words.t' or tests will needlessly fail. -->
<keyname="t_0000">Test</key>
@ -400,7 +400,11 @@ Here we will inject 't_0006', which injects 't_0001' which has a variable: [#!st
<keyname="striker_0074">When checked, the peer will be configure to add the local database as a peer at the same time that we add it to this system.</key>
<keyname="striker_0075">Access</key>
<keyname="striker_0076"><![CDATA[This tells Striker how to connect to the peer. The default username is '<span class="fixed_width">admin</span>', and the default port is '<span class="fixed_width">5432</span>'. If the peer uses these, then you only need to specify the IP address or hostname of the peer. If the user name is not '<span class="fixed_width">admin</span>', then you need to use the format '<span class="fixed_width">user@host</span>. If the TCP port is not '<span class="fixed_width">5432</span>', then you need to use '<span class="fixed_width">host:port</span>. If both user and port are different, use the format '<span class="fixed_width">user@host:port</span>'.]]></key>
<keyname="striker_0077"><![CDATA[If the '#!string!striker_0072!#' is set, we will need to update the peer's configuration. If the peer's SSH port is not '<span class="fixed_width">22</span>', you can append: '<span class="fixed_width">,ssh=X</span>' where 'X' is the SSH TCP port.]]></key>
<keyname="striker_0077"><![CDATA[If '#!string!striker_0072!#' is set, we will need to update the peer's configuration. If the peer's SSH port is not '<span class="fixed_width">22</span>', you can append: '<span class="fixed_width">,ssh=X</span>' where 'X' is the SSH TCP port.]]></key>
<keyname="striker_0078">Please verify</key>
<keyname="striker_0079">Peer</key>
<keyname="striker_0080">Ping before connect</key>
<keyname="striker_0081">The test connection was successful. When saved, the resynchronization process might take a few minutes, and cause maintenance periods where some features are offline until complete.</key>
<!-- Strings used by jobs -->
<keyname="job_0001">Configure Network</key>
@ -410,6 +414,8 @@ Here we will inject 't_0006', which injects 't_0001' which has a variable: [#!st
<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_0003">Test access to the peer (using SSH) failed. There may be details in the log file.</key>
<keyname="striker_warning_0004">Accessing the peer over SSH worked, but a test connection to the database failed.</key>
<keyname="striker_warning_0005">There was a problem reading the peer's UUID. Read: [#!variable!uuid!#], which appears to be invalid.</key>
<!-- 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>
@ -443,6 +449,11 @@ Here we will inject 't_0006', which injects 't_0001' which has a variable: [#!st
<keyname="error_0029"><![CDATA[Failed to find the template: [<span class="code">#!variable!template!#</span>] in the template file: [<span class="code">#!variable!file!#</span>].]]></key>
<keyname="error_0030"><![CDATA[Failed to process the template: [<span class="code">#!variable!template!#</span>] in the template file: [<span class="code">#!variable!file!#</span>]. Details of the problem should be in: [<span class="code">#!data!sys::log_file!#</span>].]]></key>
<!-- These are units, words and so on used when displaying information. -->
<keyname="unit_0001">Yes</key>
<keyname="unit_0002">No</key>
<!-- TODO: Merge these into 'unit' -->
<!-- These are works and strings used by javascript/jqery -->