|
Bugzilla – Full Text Bug Listing |
| Summary: | If installation fails unusable system is booted | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE Linux 10.1 | Reporter: | Michael Stather <kontakt> |
| Component: | Installation | Assignee: | Jiri Srain <jsrain> |
| Status: | RESOLVED FIXED | QA Contact: | Klaus Kämpf <kkaempf> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | jsrain, lslezak |
| Version: | Alpha 4 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Michael Stather
2005-12-24 23:19:08 UTC
During the second stage linuxrc is not running so it's not possible to display the error message and go back. You just have half installed system, nothing more. What should we do? Ask user Reboot/Shutdown/Continue? Start the second stage again during the next boot? Stano, any idea how to solve the problem better? To ask if the user wants to restart the installation might be a good idea. We need to handle 2 cases: if a user aborts the installation or if YaST crashes. If YaST is aborted, the information is written to yast.inf. What Do you think about the following patch: Index: YaST2.call =================================================================== --- YaST2.call (revision 26986) +++ YaST2.call (working copy) @@ -318,6 +318,17 @@ $Y2_MODE fi Y2_EXIT_CODE=$? + Y2_ABORT_MESSAGE="YaST seems to be aborted abnormally !" + if [ -f /etc/yast.inf ];then + if [ -s /etc/yast.inf ];then + cat /etc/yast.inf | grep -q -i "Aborted: 1" + if [ $? = 0 ];then + log "\t$Y2_ABORT_MESSAGE" + fi + else + log "\t$Y2_ABORT_MESSAGE" + fi + fi if [ $SELECTED_MEDIUM = "SSH" ];then log "\tPreparing SSH installation for reboot" echo $Y2_EXIT_CODE > /tmp/YaST2_ssh_installation_finished any news here ? I guess you should also check for the exit code. I suggest following: If therhe is Aborted: 1 is in yast.inf, installation was aborted. Else if the exit code is non-zero, YaST failed/crashed. Else everything went fine. Missing yast.inf needn't mean that something strange happened. The time I was starting to rewrite the scripts someone told me not to
handle the exit code from yast (y2base) I don't know why but are you
sure I can handle it the same was as I did for any other command ? which
means everything != 0 is an error ?
if yast.inf exists but is empty, this is an error as well, isn't it ?
Please see the changed patch:
Index: YaST2.call
===================================================================
--- YaST2.call (revision 27191)
+++ YaST2.call (working copy)
@@ -318,6 +318,33 @@
$Y2_MODE
fi
Y2_EXIT_CODE=$?
+ Y2_ABORT_MESSAGE="YaST seems to be aborted abnormally !"
+ Y2_OK_MESSAGE="YaST procedure ended successfully"
+ if [ ! $Y2_EXIT_CODE = 0 ];then
+ #=============================================
+ # YaST error code handling
+ #---------------------------------------------
+ log "\t$Y2_ABORT_MESSAGE"
+ elif [ -f /etc/yast.inf ];then
+ #=============================================
+ # YaST error code ok, check yast.inf contents
+ #---------------------------------------------
+ if [ -s /etc/yast.inf ];then
+ # yast.inf exists and countains Aborted...
+ cat /etc/yast.inf | grep -q -i "Aborted: 1"
+ if [ $? = 0 ];then
+ log "\t$Y2_ABORT_MESSAGE"
+ fi
+ else
+ # yast.inf exists but is empty...
+ log "\t$Y2_ABORT_MESSAGE"
+ fi
+ else
+ #=============================================
+ # YaST ended successfully
+ #---------------------------------------------
+ log "\t$Y2_OK_MESSAGE"
+ fi
if [ $SELECTED_MEDIUM = "SSH" ];then
log "\tPreparing SSH installation for reboot"
echo $Y2_EXIT_CODE > /tmp/YaST2_ssh_installation_finished
Sorry, you are right about the exit codes. So it would be better to chech on some well-known codes (which a process returns in case of SIGSEGV, ABR and similar signals). If yast.inf doesn't exist after 2nd stage of installation, it does not mean an error. yast.inf is primarily used to pass information from YaST to Linuxrc (during 1st stage of installation). During 2nd stage (if I didn't miss anything in the code) it is written only in case of abort. - what are these codes in case of YaST ? - the patch above checks if yast.inf exists and if it is not empty. if it exists and is empty this is an error as well or is this check invalid ? Regarding yast.inf: The only chech should be: It exists and contains the line "Aborted: 1" Don't know about the exit codes, even YaST modules should be able to change the exit code of the whole y2base process. ok, done It doesn´t work in beta9. The installer hung at the online update (I submitted a bug report for it), then I switched to console #1 and pressed CTRL+C and the installation "continued". IMHO it should stop and say that something went wrong instead of creating a half-finished system. Jiri ? Michael, please, provide YaST logs for the error mentioned in comment #16. You might also tell us which bug you have filed if YaST logs are there :) Thanks. Fortunately this didn´t occur any more in RC1 :) So I don´t have the logs for beta9 there anymore because it worked. But apart from that this bug is still valid. Just press CTRL+C somewhere in the stage 2 and see what happens :( K: could you, please, try that if you have a time? (see comment #19) AK, according to comment 19 and no more reports resolving this bug as FIXED. |