|
Bugzilla – Full Text Bug Listing |
| Summary: | Yast2 Runlevel editor returns wrong exit code of services | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 10.3 | Reporter: | Ladislav Michnovic <lmichnovic> |
| Component: | YaST2 | Assignee: | Lukas Ocilka <locilka> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | aj, lslezak |
| Version: | Alpha 5 | ||
| Target Milestone: | --- | ||
| Hardware: | i386 | ||
| OS: | openSUSE 10.3 | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
y2logs
screenshot 1 screenshot 2 screenshot 3 Please, try this patched file New background agent Proposed patch |
||
Created attachment 147379 [details]
screenshot 1
Created attachment 147380 [details]
screenshot 2
Created attachment 147381 [details]
screenshot 3
miracle:~ # /etc/init.d/boot.quota status; echo $?
Checking for quota: unused
3
miracle:~ # /etc/init.d/boot.quota start; echo $?
Turning quota on
Checking quotas. This may take some time.
done
0
miracle:~ # /etc/init.d/boot.quota status; echo $?
Checking for quota: unused
3
miracle:~ # /etc/init.d/boot.quota stop; echo $?
Turning off quota
done
0
--- --- ---
Initially not running (exit 3)
Started (exit 0) -- probably wrong exit code
After start, not running (exit 3)
Stopped (exit 0)
miracle:~ # /etc/init.d/boot.quota start; echo $?
Turning quota on
Checking quotas. This may take some time.
done
0
miracle:~ # /etc/init.d/boot.quota status; echo $?
Checking for quota: unused
3
This behavior is intended. Becasue you probably do not have any partition mounted with quota support, so boot.quota is still unused after start.
But this bug is about that the exit codes shown in yast module differs from exit codes shown in terminal.
This bug is about yast2 shows different exit codes than terminal. If you want to discus sanity of exit codes in quota, please fill a new bug. For status checking, Status::RunInitScriptWithTimeOut("boot.quota", "status") was used
Running service initscript boot.quota status 2>&1 1>/tmp/YaST2-03827-Gjtl2k/runlevel_out
Time spent: 20 msecs, retcode: 0
Then Status::RunInitScriptWithTimeOut("boot.quota", ...) was used several times with different result:
Service.ycp:297 Running service initscript boot.quota status 2>&1 1>/tmp/YaST2-03827-Gjtl2k/runlevel_out
Service.ycp:332 Time spent: 40 msecs, retcode: 4
Service.ycp:297 Running service initscript boot.quota status 2>&1 1>/tmp/YaST2-03827-Gjtl2k/runlevel_out
Service.ycp:332 Time spent: 40 msecs, retcode: 0
Service.ycp:297 Running service initscript boot.quota start 2>&1 1>/tmp/YaST2-03827-Gjtl2k/runlevel_out
Service.ycp:332 Time spent: 20 msecs, retcode: 0
Service.ycp:297 Running service initscript boot.quota stop 2>&1 1>/tmp/YaST2-03827-Gjtl2k/runlevel_out
Service.ycp:332 Time spent: 240 msecs, retcode: 0
Service.ycp:297 Running service initscript boot.quota status 2>&1 1>/tmp/YaST2-03827-Gjtl2k/runlevel_out
Service.ycp:332 Time spent: 160 msecs, retcode: 0
Service.ycp:297 Running service initscript boot.quota status 2>&1 1>/tmp/YaST2-03827-Gjtl2k/runlevel_out
Service.ycp:332 Time spent: 140 msecs, retcode: 3
Service.ycp:297 Running service initscript boot.quota status 2>&1 1>/tmp/YaST2-03827-Gjtl2k/runlevel_out
Service.ycp:332 Time spent: 80 msecs, retcode: 3
Agent .target.background is used for that
Lslezak: could you, please, check Service::RunInitScriptWithTimeOut()?
Thanks.
Created attachment 150524 [details]
Please, try this patched file
(Copy the file to /usr/share/YaST2/include/runlevel/ directory and run `yast2 runlevel`)
Thanks
It is still returning previous exit code when checking more times. Created attachment 150872 [details]
New background agent
Please, save this attachment to /usr/lib/YaST2/servers_non_y2/ag_background
and recheck... thanks
It works now. Created attachment 150873 [details]
Proposed patch
Fixed in yast2-core-2.15-7 *** Bug 261239 has been marked as a duplicate of this bug. *** |
Created attachment 147378 [details] y2logs I was checking the state of boot.quota service in runlevel editor in export mode. At first time it returned wrong exit code. Checked again, it returned correct exit code. After changing status af the service (stop or start) it showed again wrong exit code for the first check. Checking the exit code in terminal it always returned correct. Attaching some screenshots and y2logs.