diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2017-08-31 12:48:43 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2017-08-31 13:37:48 +0100 |
commit | 7ef429d61a46fda36a84a1340659ce05131be43b (patch) | |
tree | 360d468f53d05e9edd8bab6e6f6f846f2ad1e8bb /docs/index.rst | |
parent | b8d0daf78a3f87e7c98d77be769fdf3c5f31ae20 (diff) | |
download | sos-7ef429d61a46fda36a84a1340659ce05131be43b.tar.gz |
[Plugin] fix bogus 're-trying in host root' messages
If a command is not found in Plugin.get_command_output() and the
run is not configured to use an alternate sysroot (either via
policy based autodetection or command line --sysroot=/path) the
plugin would log messages like:
[plugin:gluster] command 'gluster' not found in / - re-trying in host root
This is incorrect: without an alternate sysroot the attempt should
fail immediately at this point (since the 'retry' will attempt to
find the command in the same namespace).
This is caused by an incorrect test for alternate sysroot:
if chroot and self.commons['cmdlineopts'].chroot != 'always':
The 'chroot' variable is always True here, unless the caller has
explicitly disabled it, or we are re-trying a command in a run
with an alternate sysroot defined.
Instead test that 'root' is not None and that it is not equal to
'/'.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'docs/index.rst')
0 files changed, 0 insertions, 0 deletions