From 18ccce69cd4da689251d4de2d6cdfffabf53fe9f Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Sat, 5 Dec 2020 12:37:19 +0100 Subject: [PATCH] marsadm: more debugging msg --- userspace/marsadm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/userspace/marsadm b/userspace/marsadm index e5e176d5..a25e19fc 100755 --- a/userspace/marsadm +++ b/userspace/marsadm @@ -1082,6 +1082,7 @@ sub get_instance_files { my ($dir) = @_; $stable_pid = $$ unless $stable_pid; my $glob = "$dir/{*.{$systemd_suffixes},.pre.$stable_pid.*.{$systemd_suffixes}.tmp}"; + lprint "GLOB '$glob'\n" if $verbose > 2; my %instance_files; foreach my $instance_file (lamport_glob($glob)) { my ($mtime, $text) = _get_file($instance_file); @@ -1089,6 +1090,7 @@ sub get_instance_files { my $template_file = $1; my $instance_name = $instance_file; $instance_name =~ s:^.*/::; + lprint " INSTANCE '$instance_name'\n" if $verbose > 2; $instance_files{$instance_name} = [$instance_file, $mtime, $template_file]; } return %instance_files; @@ -1267,7 +1269,7 @@ sub _scan_refs { sub _instantiate_systemd_unit { my ($env, $template_file, $out_name) = @_; my ($res_file, $pre_file, $tmp_file) = _make_var_name($out_name); - lprint "==== Translate systemd template '$template_file' => '$res_file'\n" if $verbose; + lprint "==== Translate systemd template '$template_file' => '$res_file'\n" if $verbose; my ($mtime, $text) = _get_file($template_file); if (!$text) { lwarn "cannot get template '$template_file'\n"; @@ -1360,6 +1362,7 @@ sub _instantiate_systemd_unit { unlink($tmp_file); return (0, ""); } + lprint "==== Translated systemd template '$template_file' => '$res_file'\n" if $verbose; return (1, $res_file); }