Mailinglist Archive: yast-commit (1095 mails)

< Previous Next >
[yast-commit] r52742 - in /trunk/kdump: config/kdump.rnc src/Kdump.ycp src/kdump_finish.ycp src/uifunctions.ycp
  • From: juhliarik@xxxxxxxxxxxxxxxx
  • Date: Thu, 30 Oct 2008 14:06:11 -0000
  • Message-id: <20081030140611.74DDAB3072@xxxxxxxxxxxxxxxx>
Author: juhliarik
Date: Thu Oct 30 15:06:11 2008
New Revision: 52742

URL: http://svn.opensuse.org/viewcvs/yast?rev=52742&view=rev
Log:
added several fixes for: autoyast, XEN...

M kdump/config/kdump.rnc
* deleted unsupported option KDUMP_DUMPDEV
M kdump/src/uifunctions.ycp
* fixed handling value of KDUMP_COPYKERNEL
M kdump/src/Kdump.ycp
M kdump/src/kdump_finish.ycp
* added fix for problems with support of autoyast

Modified:
trunk/kdump/config/kdump.rnc
trunk/kdump/src/Kdump.ycp
trunk/kdump/src/kdump_finish.ycp
trunk/kdump/src/uifunctions.ycp

Modified: trunk/kdump/config/kdump.rnc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/kdump/config/kdump.rnc?rev=52742&r1=52741&r2=52742&view=diff
==============================================================================
--- trunk/kdump/config/kdump.rnc (original)
+++ trunk/kdump/config/kdump.rnc Thu Oct 30 15:06:11 2008
@@ -25,7 +25,6 @@
element KDUMP_SAVEDIR { text }? &
element KDUMP_KEEP_OLD_DUMPS { text }? &
element KDUMP_FREE_DISK_SIZE { text }? &
- element KDUMP_DUMPDEV { text }? &
element KDUMP_VERBOSE { text }? &
element KDUMP_DUMPLEVEL { text }? &
element KDUMP_DUMPFORMAT { text }? &

Modified: trunk/kdump/src/Kdump.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/kdump/src/Kdump.ycp?rev=52742&r1=52741&r2=52742&view=diff
==============================================================================
--- trunk/kdump/src/Kdump.ycp (original)
+++ trunk/kdump/src/Kdump.ycp Thu Oct 30 15:06:11 2008
@@ -175,6 +175,14 @@
*/
global string alocated_memory = "0";

+/**
+ * Boolean option indicates that Import()
+ * was called and data was proposed
+ *
+ * boolean true if import was called with data
+ */
+
+global boolean import_called = false;


/**
@@ -212,12 +220,11 @@
"KEXEC_OPTIONS" : "",
"KDUMP_RUNLEVEL" : "1",
"KDUMP_IMMEDIATE_REBOOT" : "yes",
- "KDUMP_COPY_KERNEL" : "no",
+ "KDUMP_COPY_KERNEL" : "yes",
"KDUMP_TRANSFER" : "",
"KDUMP_SAVEDIR" : "file:///var/log/dump",
"KDUMP_KEEP_OLD_DUMPS" : "5",
"KDUMP_FREE_DISK_SIZE" : "64",
- "KDUMP_DUMPDEV" : "",
"KDUMP_VERBOSE" : "3",
"KDUMP_DUMPLEVEL" : "0",
"KDUMP_DUMPFORMAT" : "compressed", //or "ELF"
@@ -551,6 +558,30 @@

}

+/** bnc #439881 - Don't use extended crashkernel syntax for Xen
+ * Fuction convert extended crashkernel value to old style :Y@X
+ *
+ * @param string - extended value of crashkernel
+ * @return string - old style value
+ */
+
+
+string convertCrashkernelForXEN(string crash)
+{
+ string crash_value = "";
+ if (crash != "")
+ {
+ crash_value = getAlocatedMemory(crash)+"M";
+
+ if ((Arch::i386()) ||(Arch::x86_64()) || Arch::ppc64())
+ crash_value = crash_value + "@16M";
+
+ }
+ y2milestone("Converting crashkernel value from: (%1) to :(%2)",crash,
crash_value);
+ return crash_value;
+}
+
+

/**
* Check if default boot section is Xen section
@@ -609,7 +640,7 @@
{
crash = section["xen_append"]:"";
section_pos = section_position;
- }
+ }
});
}

@@ -772,7 +803,7 @@
debug_KDUMP_SETTINGS["KDUMP_SAVEDIR"] = "********";
debug_KDUMP_SETTINGS["KDUMP_SMTP_PASSWORD"] = "********";
y2milestone("-------------KDUMP_SETTINGS-------------------");
- y2milestone("kdump configuration has been read without value
\"KDUMP_SAVEDIR\" and \"KDUMP_SMTP_PASSWORD\": %1", debug_KDUMP_SETTINGS);
+ y2milestone("kdump configuration for writing without value
\"KDUMP_SAVEDIR\" and \"KDUMP_SMTP_PASSWORD\": %1", debug_KDUMP_SETTINGS);
y2milestone("---------------------------------------------");

foreach (string option_key, string option_val, KDUMP_SETTINGS, {
@@ -802,21 +833,26 @@
{
Bootloader::Read();
actual_boot_section = Bootloader::getDefaultSection ();
- y2milestone("Default boot section is %1", actual_boot_section);
CheckXenDefault(actual_boot_section);
}
+
+ y2milestone("Default boot section is %1", actual_boot_section);
if (add_crashkernel_param) {
- string crash_value = BuildCrashkernelValue ();
-
+
+ string crash_value = "";
+ if (!Mode::autoinst())
+ crash_value = BuildCrashkernelValue ();
+
if ((!crashkernel_param) || (crash_value != crashkernel_param_value)) {

+ if (Mode::autoinst())
+ crash_value = crashkernel_param_value;
// write crashkernel option to boot section
if (section_pos == -1)
{
result = Bootloader::setKernelParam (actual_boot_section,
"crashkernel", crash_value);
} else {
-
- BootCommon::sections[section_pos, "xen_append"]=
"crashkernel="+crash_value;
+ BootCommon::sections[section_pos, "xen_append"]=
"crashkernel="+convertCrashkernelForXEN(crash_value);
// added flag which means that section was changed bnc #432651
BootCommon::sections[section_pos, "__changed"] = true;
result = true;
@@ -936,7 +972,15 @@
y2milestone("Installation doesn't support kdump.");
return true;
}
+
+ }
+
+ if ((Mode::installation() || Mode::autoinst()) && (!add_crashkernel_param))
+ {
+ y2milestone("Skip writing of configuration for kdump during
installation");
+ return true;
}
+
// We do not set help text here, because it was set outside
Progress::New(caption, " ", steps, [
/* Progress stage 1/2 */
@@ -989,7 +1033,7 @@
if (Arch::ppc64())
kdump_packages = add(kdump_packages, "kernel-kdump");
else
- kdump_packages = add(kdump_packages, "kdump");
+ kdump_packages = add(kdump_packages, "kdump");
}
}

@@ -1002,9 +1046,13 @@
{
if (!propose_called)
{
- // set adding boot option...
+ // propose disable kdump if PC has less than 1024MB RAM
+ if (total_memory < 1024)
+ add_crashkernel_param = false;
+ else
+ add_crashkernel_param = true;
+
crashkernel_param = false;
- add_crashkernel_param = true;
// added defualt settings
KDUMP_SETTINGS = DEFAULT_CONFIG;
}
@@ -1056,25 +1104,19 @@
*/
global define void Propose ()
{
-
y2milestone("Proposing new settings of kdump");
-
- // set default values for global variables
- ProposeGlobalVars();
// read available memory
ReadAvailableMemory ();
-
- // propose disable kdump if PC has less than 1024MB RAM
- if (total_memory < 1024)
- add_crashkernel_param = false;
+ // set default values for global variables
+ ProposeGlobalVars();

// add packages for installation
AddPackages();

// select packages for installation
CheckPackages();
-
}
+
/**
* Create a textual summary and a list of unconfigured cards
* @return summary of the current configuration
@@ -1117,6 +1159,7 @@
*/
global define boolean Import (map settings)
{
+ y2milestone("Importing settings for kdump");
crashkernel_param_value = settings["crash_kernel"]:"";
add_crashkernel_param = settings["add_crash_kernel"]:false;
boolean result = true;
@@ -1127,7 +1170,10 @@
string val = (string) my_import_map[str_key]:nil;
if (val != nil) KDUMP_SETTINGS[str_key] = val;
if (val == nil) KDUMP_SETTINGS[str_key] = DEFAULT_CONFIG[str_key]:nil;
- });
+ });
+ if ((haskey(settings, "crash_kernel")) || (haskey(settings,
"add_crash_kernel")) ||
+ (size(my_import_map) > 0))
+ import_called = true;
return result;
}
/* EOF */

Modified: trunk/kdump/src/kdump_finish.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/kdump/src/kdump_finish.ycp?rev=52742&r1=52741&r2=52742&view=diff
==============================================================================
--- trunk/kdump/src/kdump_finish.ycp (original)
+++ trunk/kdump/src/kdump_finish.ycp Thu Oct 30 15:06:11 2008
@@ -47,6 +47,9 @@
}
else if (func == "Write")
{
+ // propose settings for kdump if autoyast doesn't include settings for
yast2-kdump
+ if ((!Kdump::import_called) && (Mode::autoinst()))
+ Kdump::Propose();
Kdump::Write();
}
else

Modified: trunk/kdump/src/uifunctions.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/kdump/src/uifunctions.ycp?rev=52742&r1=52741&r2=52742&view=diff
==============================================================================
--- trunk/kdump/src/uifunctions.ycp (original)
+++ trunk/kdump/src/uifunctions.ycp Thu Oct 30 15:06:11 2008
@@ -186,7 +186,6 @@
} else {
Kdump::add_crashkernel_param = false;
}
-
}

/**
@@ -1314,7 +1313,7 @@
*/

void InitEnableCopyKernel (string key) {
- if (Kdump::KDUMP_SETTINGS["KDUMP_COPY_KERNEL"]:"false" == "true") {
+ if (Kdump::KDUMP_SETTINGS["KDUMP_COPY_KERNEL"]:"no" == "yes") {
UI::ChangeWidget(`id("EnableCopyKernel"), `Value, true);
} else {
UI::ChangeWidget(`id("EnableCopyKernel"), `Value, false);
@@ -1331,9 +1330,9 @@
void StoreEnableCopyKernel (string key, map event) {
boolean value = (boolean) UI::QueryWidget(`id("EnableCopyKernel"), `Value);
if (!value) {
- Kdump::KDUMP_SETTINGS["KDUMP_COPY_KERNEL"] = "false";
+ Kdump::KDUMP_SETTINGS["KDUMP_COPY_KERNEL"] = "no";
} else {
- Kdump::KDUMP_SETTINGS["KDUMP_COPY_KERNEL"] = "true";
+ Kdump::KDUMP_SETTINGS["KDUMP_COPY_KERNEL"] = "yes";
}
}


--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages