Description of problem: otopi does not obey the path set in the environment variable $PATH. Also, it works with a "last win" search, contrary to common shells that do "first wins". Its default search path is: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin So if some plugin wants to run a command 'cmd1', if both e.g. "/usr/local/bin/cmd1" and "/bin/cmd1" exist, otopi will use "/bin/cmd1". Similarly, if both "/bin/cmd1" and "/sbin/cmd1" exist, it will use "/bin/cmd1". otopi should keep its default search path but make "first win" and obey env var $PATH. Main risk in doing this is in systems with non-default $PATH that otopi ignored so far, but will start obeying if current bug is fixed, and run a different command. Current bug recently became apparent due to bug 1459134 and the decision to use SCL for it, which relies on $PATH (and a few other env vars) to enable packages.
Can you please provide verification steps?
Something like this should work: yum install iproute mkdir /tmp/mybintest cat << __EOF__ > /tmp/mybintest/ip #!/bin/sh echo "fake ip command, exiting..." exit 1 __EOF__ chmod 755 /tmp/mybintest/ip PATH=/tmp/mybintest:$PATH otopi With a fixed build, the output should include: [WARNING] Cannot validate host name settings, reason: cannot enumerate interface addresses And the log file: 2017-10-15 09:57:59,943+0300 DEBUG otopi.plugins.otopi.network.hostname plugin.executeRaw:863 execute-result: ('/tmp/mybintest/ip', 'addr', 'show'), rc=1 2017-10-15 09:57:59,944+0300 DEBUG otopi.plugins.otopi.network.hostname plugin.execute:921 execute-output: ('/tmp/mybintest/ip', 'addr', 'show') stdout: fake ip command, exiting... With an unfixed build (e.g. otopi-1.6), no WARNING should appear, and the log should include: 2017-10-15 09:56:15,418+0300 DEBUG otopi.plugins.otopi.network.hostname plugin.executeRaw:813 execute: ('/usr/sbin/ip', 'addr', 'show'), executable='None', cwd='None', env=None 2017-10-15 09:56:15,427+0300 DEBUG otopi.plugins.otopi.network.hostname plugin.executeRaw:863 execute-result: ('/usr/sbin/ip', 'addr', 'show'), rc=0 2017-10-15 09:56:15,427+0300 DEBUG otopi.plugins.otopi.network.hostname plugin.execute:921 execute-output: ('/usr/sbin/ip', 'addr', 'show') stdout:
Verified on version: ovirt-engine-4.2.0-0.0.master.20171013142622.git15e767c.el7.centos.noarch Verified based on suggested steps from comment #2
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017. Since the problem described in this bug report should be resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.