Bug 493411
Summary: | Script '/etc/NetworkManager/dispatcher.d/04-iscsi' exited with error status 1. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tomislav Vujec <tvujec> | ||||||
Component: | iscsi-initiator-utils | Assignee: | Hans de Goede <hdegoede> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | rawhide | CC: | agrover, hdegoede, mchristi | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2009-04-03 07:30:05 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Hans, Were you the guy that did that code that the patch is modifying? (In reply to comment #1) > Hans, > > Were you the guy that did that code that the patch is modifying? Yes, Tomislav, what problem are you seeing exactly, and how does the patch fix it? As I read the patch, you are replacing the exit value of the script with a success value in case of the up action, and in case of the down value you are effectively doing nothing. "foo && :" == "foo" So I guess that the script is failing for you when the device is brought up, can you try to run the script from a terminal after booting and see what kind of error it gives? Thanks! I guess that was a little bit much of the copy-n-paste from 05-netfs on my part. In short, you're right for the down action, it is not needed, but for the up action, you end up with exit status 1 if no default route is available on the device. Think about it, if grep doesn't find '^default' in ip show output, it will exit with exit code 1, and since there is nothing to be executed afterwards, the whole shell exits with exit code 1. This is a fairly common side-effect of using test one-liners. The actual problem is that the dispatcher will check that exit code, and report an error without any specific error message in the syslog (see bug title), which can be fairly confusing, but definitely not severe, hence the low priority and severity. On the other hand, it is fairly easy to fix. Hint, hint :-) What contributes to the problem is the fact that NetworkManager now days supports multiple devices in on state. Since only one can have the default route, this use case is becoming more common. Think laptop on wired connection in the receiving area of the configured wireless AP (my use case on both work and home networks). Created attachment 337919 [details]
Improved patch
Tomislav, thanks now I understand what the problem is. However the up part of
your patch also does not do what we want, because we do want to exit with 1 when
the iscsi initscript itself fails.
Can you give the just attached alternative patch a try please, that should also
fix your problem.
Thanks, it works ok now! 6.2.0.870-8 which includes this patch is on its way to rawhide, closing. |
Created attachment 337580 [details] Proposed patch to protect exit status. Description of problem: Exit status in not protected in the 04-iscsi nm-dispatcher script, which results in error being reported on successful execution. Version-Release number of selected component (if applicable): 6.2.0.870-7.fc11