Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting output from dump_system_information #1208

Open
sdondley opened this issue Oct 14, 2018 · 2 comments
Open

Not getting output from dump_system_information #1208

sdondley opened this issue Oct 14, 2018 · 2 comments

Comments

@sdondley
Copy link
Contributor

I have a few debian machines. On two of them, the following task works fine:

desc "Get server info";
task "get_infos", group => 'myservers', sub {
  dump_system_information;
};

But on a third Debian machine, I get no output. Log file says this:

<snip>

[2018-10-14 12:53:30] DEBUG - Detecting shell...
[2018-10-14 12:53:30] DEBUG - Found shell in cache: bash
[2018-10-14 12:53:30] DEBUG - Shell/Bash: Got options:
[2018-10-14 12:53:30] DEBUG - $VAR1 = {
          'valid_retval' => [
                              0
                            ],
          'fail_ok' => 1
        };

[2018-10-14 12:53:30] DEBUG - SSH/executing: LC_ALL=C ; export LC_ALL; PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/pkg/bin:/usr/pkg/sbin; export PATH; which lsb_release  
[2018-10-14 12:53:30] DEBUG - Running postponed notifications.
[2018-10-14 12:53:30] DEBUG - Connections in queue: 1
[2018-10-14 12:53:30] DEBUG - Destroying all cached os information
[2018-10-14 12:53:30] DEBUG - Waiting for children to finish
[2018-10-14 12:53:30] DEBUG - Need to reinitialize connections.
[2018-10-14 12:53:30] DEBUG - Returning existing distribution class of type: Rex::TaskList::Base
[2018-10-14 12:53:30] INFO - All tasks successful on all hosts
[2018-10-14 12:53:30] DEBUG - Removing lockfile
[2018-10-14 12:53:30] DEBUG - Executing: LC_ALL=C /bin/sh -c '[ -L "Rexfile.lock" ]'
[2018-10-14 12:53:30] DEBUG - Returning existing distribution class of type: Rex::TaskList::Base

I am, however, able to get output from the machine with this simple task:

desc "Get server uptime";
task "uptime", group => 'myservers', sub {
  my $output = run "uptime";
  say $output;
};

Does anyone know why I might not be getting output from dump_system_information on this one machine.

@sdondley
Copy link
Contributor Author

sdondley commented Oct 14, 2018

Apparently, the third machine did not have lsb_release installed. I installed it. However, although the rex.log file shows that information about the machine is getting fetched, there is still no output to my terminal. I just see:

[2018-10-14 13:52:31] INFO - Running task get_infos on delta
[2018-10-14 13:52:34] INFO - All tasks successful on all hosts

@sdondley
Copy link
Contributor Author

So I tracked the problem down to not having SFTP installed on the client server. It's needed in the is_dir function in the Rex::Interface::OpenSSH.pm. The VirtInfo module calls is_dir to determine if a directory exists.

Seems odd I would need SFTP to check if a directory exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant