Bug 1490380
| Summary: | otopi's path search is incompatible with common shells | ||
|---|---|---|---|
| Product: | [oVirt] otopi | Reporter: | Yedidyah Bar David <didi> |
| Component: | Core | Assignee: | Yedidyah Bar David <didi> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | David Necpal <dnecpal> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | master | CC: | bugs, didi, oourfali |
| Target Milestone: | ovirt-4.2.0 | Flags: | rule-engine:
ovirt-4.2+
sbonazzo: devel_ack+ pstehlik: testing_ack+ |
| Target Release: | 1.7.2 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause:
otopi had a hard-coded search path for executables, and a non-standard behavior when searching.
Consequence:
Users could not affect its behavior by adding paths to the environment variable $PATH. In particular, this made it hard to support PostgreSQL 9.5 on EL7 using SCL, because SCL relies on $PATH.
Fix:
otopi was changed to behave like common shells wrt to $PATH.
Result:
It's now possible to change $PATH and make otopi search there.
This affects all utilities that use otopi, including engine-setup and hosted-engine --deploy.
This has a chance to have a negative effect - users that had non-standard $PATH that contained executables named the same as some of those we call from otopi-based utilities, will now have these utilities run these executables instead of standard OS-supplied ones. Such users should make sure they do not have unintended duplicates in non-standard $PATH.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-12-20 11:07:32 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Integration | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Yedidyah Bar David
2017-09-11 12:39:04 UTC
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. |