Increased logging to debug server install failure.

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 1 year ago
parent c3fe39e6a8
commit 3d4d7abfe3
  1. 4
      tools/anvil-daemon
  2. 7
      tools/anvil-manage-files
  3. 5
      tools/anvil-sync-shared

@ -952,7 +952,7 @@ sub check_incoming
{ {
my ($anvil) = @_; my ($anvil) = @_;
my $shell_call = $anvil->data->{path}{exe}{'anvil-manage-files'}." --check"; my $shell_call = $anvil->data->{path}{exe}{'anvil-manage-files'}." --check".$anvil->Log->switches;
$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 => { shell_call => $shell_call }});
my ($output, $return_code) = $anvil->System->call({ my ($output, $return_code) = $anvil->System->call({
shell_call => $shell_call, shell_call => $shell_call,
@ -1452,7 +1452,7 @@ sub prep_database
{ {
$anvil->Database->configure_pgsql({debug => 2}) $anvil->Database->configure_pgsql({debug => 2})
# ### NOTE: This failed once, in case / until it happens again, we'll force log level 2 and secure logging. # ### NOTE: This failed once, in case / until it happens again, we'll force log level 2 and secure logging.
# my $shell_call = $anvil->data->{path}{exe}{'striker-prep-database'}." -vv --log-secure"; # my $shell_call = $anvil->data->{path}{exe}{'striker-prep-database'}$anvil->Log->switches;
# $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 => { shell_call => $shell_call }});
# my ($database_output, $return_code) = $anvil->System->call({debug => 2, shell_call => $shell_call, source => $THIS_FILE, line => __LINE__ }); # 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 => { # $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {

@ -53,8 +53,12 @@ if (($running_directory =~ /^\./) && ($ENV{PWD}))
} }
my $anvil = Anvil::Tools->new(); my $anvil = Anvil::Tools->new();
$anvil->Get->switches({list => ["add", "check", "delete", "download", "file", "is-script", "rename", "remove", "to"], man => $THIS_FILE}); $anvil->Get->switches({list => ["add", "check", "delete", "download", "file", "is-script", "rename", "remove", "to"], man => $THIS_FILE});
### TODO: Remove this
$anvil->Log->level({set => 2});
$anvil->Log->secure({set => 1});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => $anvil->data->{switches}}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => $anvil->data->{switches}});
# Connect or die # Connect or die
@ -1127,6 +1131,7 @@ AND
{ {
# Yup. # Yup.
($file_uuid) = $anvil->Database->insert_or_update_files({ ($file_uuid) = $anvil->Database->insert_or_update_files({
debug => 2,
file_uuid => $file_uuid, file_uuid => $file_uuid,
file_name => $file_name, file_name => $file_name,
file_directory => $file_directory, file_directory => $file_directory,

@ -34,6 +34,11 @@ my $anvil = Anvil::Tools->new();
# Read switches (target ([user@]host[:port]) and the file with the target's password. # Read switches (target ([user@]host[:port]) and the file with the target's password.
$anvil->data->{switches}{'job-uuid'} = ""; $anvil->data->{switches}{'job-uuid'} = "";
$anvil->Get->switches; $anvil->Get->switches;
### TODO: Remove this
$anvil->Log->level({set => 2});
$anvil->Log->secure({set => 1});
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, key => "log_0115", variables => { program => $THIS_FILE }}); $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, key => "log_0115", variables => { program => $THIS_FILE }});
# Connect to the database(s). # Connect to the database(s).

Loading…
Cancel
Save