Red Hat Bugzilla – Bug 493411
Script '/etc/NetworkManager/dispatcher.d/04-iscsi' exited with error status 1.
Last modified: 2012-06-26 12:08:34 EDT
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):
Were you the guy that did that code that the patch is modifying?
(In reply to comment #1)
> Were you the guy that did that code that the patch is modifying?
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?
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]
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!
188.8.131.520-8 which includes this patch is on its way to rawhide, closing.