Disabled striker-prep-databas and set Database->configure_pgsql() calls to use debug => 2.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 2 years ago
parent cf8198ac9a
commit cd220e97dc
  1. 4
      Anvil/Tools/Database.pm
  2. 2
      Anvil/Tools/Log.pm
  3. 17
      tools/anvil-daemon
  4. 4
      tools/striker-prep-database

@ -997,7 +997,7 @@ sub configure_pgsql
} }
} }
# Do user and DB checks only if we're made a change above. # Do user and DB checks only if we've made a change above.
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
's1:initialized' => $initialized, 's1:initialized' => $initialized,
's2:update_postgresql_file' => $update_postgresql_file, 's2:update_postgresql_file' => $update_postgresql_file,
@ -1362,7 +1362,7 @@ sub connect
# This method just returns if nothing is needed. # This method just returns if nothing is needed.
if (($local_host_type eq "striker") && ($check_if_configured) && ($< == 0) && ($> == 0)) if (($local_host_type eq "striker") && ($check_if_configured) && ($< == 0) && ($> == 0))
{ {
$anvil->Database->configure_pgsql({debug => $debug, uuid => $local_host_uuid}); $anvil->Database->configure_pgsql({debug => 2, uuid => $local_host_uuid});
} }
# Now setup or however-many connections # Now setup or however-many connections

@ -766,7 +766,7 @@ In this case, C<< $switches >> would contain C<< -vv --log-secure >>.
B<< Note >>: The string returned is padded with a leading space so that this method can be called directly after the executable. Example; B<< Note >>: The string returned is padded with a leading space so that this method can be called directly after the executable. Example;
my $shell_call = $anvil->data->{path}{exe}{'striker-prep-database'}.$anvil->Log->switches(); my $shell_call = $anvil->data->{path}{exe}{'anvil-provision-server'}.$anvil->Log->switches();
This method takes no parameters. This method takes no parameters.

@ -1432,14 +1432,15 @@ sub prep_database
}}); }});
if ($prep_database) if ($prep_database)
{ {
### NOTE: This failed once, in case / until it happens again, we'll force log level 2 and secure logging. $anvil->Database->configure_pgsql({debug => 2})
my $shell_call = $anvil->data->{path}{exe}{'striker-prep-database'}." -vv --log-secure"; # ### NOTE: This failed once, in case / until it happens again, we'll force log level 2 and secure logging.
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { shell_call => $shell_call }}); # my $shell_call = $anvil->data->{path}{exe}{'striker-prep-database'}." -vv --log-secure";
my ($database_output, $return_code) = $anvil->System->call({debug => 2, shell_call => $shell_call, source => $THIS_FILE, line => __LINE__ }); # $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { shell_call => $shell_call }});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { # my ($database_output, $return_code) = $anvil->System->call({debug => 2, shell_call => $shell_call, source => $THIS_FILE, line => __LINE__ });
database_output => $database_output, # $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
return_code => $return_code, # database_output => $database_output,
}}); # return_code => $return_code,
# }});
} }
elsif (not $anvil->data->{sys}{database}{connections}) elsif (not $anvil->data->{sys}{database}{connections})
{ {

@ -13,6 +13,10 @@
# #
# TODO: Much of this logic is duplicated in Database->configure_pgsql(), we should remove this tool entirely # TODO: Much of this logic is duplicated in Database->configure_pgsql(), we should remove this tool entirely
# and use that. # and use that.
# NOTE: Now disabled, to be reomved.
exit(0);
use strict; use strict;
use warnings; use warnings;

Loading…
Cancel
Save