$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.
my $password = $anvil->data->{cgi}{new_peer_password}{value};
$password =~ s/:/\:/g;
my $pgpass = $host.":".$port.":".$name.":".$user.":".$password;
# 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" '
my $db_access = $anvil->System->call({uuid => $peer_uuid});
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.
<!-- To prevent browsers from offering to save the user/password, we'll set the password to a text field and use css to obfuscate echoing back what the user typed -->
@ -400,6 +400,7 @@ 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_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_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_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>
<!-- Strings used by jobs -->
<!-- Strings used by jobs -->
<keyname="job_0001">Configure Network</key>
<keyname="job_0001">Configure Network</key>
@ -407,6 +408,8 @@ Here we will inject 't_0006', which injects 't_0001' which has a variable: [#!st
<!-- Warnings -->
<!-- Warnings -->
<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_0003">Test access to the peer (using SSH) failed. There may be details in the log file.</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>