Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2
yast2-drbd
bug-291771_err_msg.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bug-291771_err_msg.patch of Package yast2-drbd
diff -ru yast2-drbd-2.13.1.ori/src/Drbd.ycp yast2-drbd-2.13.1/src/Drbd.ycp --- yast2-drbd-2.13.1.ori/src/Drbd.ycp 2007-07-20 17:20:17.000000000 +0800 +++ yast2-drbd-2.13.1/src/Drbd.ycp 2007-07-20 16:20:46.000000000 +0800 @@ -87,14 +87,13 @@ if (SCR::Read(.target.size, drbd_dir + "/drbd.conf") > 0) { - y2milestone("Start DRBD scr reading"); + y2milestone("read drbd conf file: %1", drbd_dir); //read global configs foreach (string key, [ "disable-ip-verification", "minor-count", "dialog-refresh", "disable-io-hints" ], { string val = (string)SCR::Read(topath(sformat(".drbd.global.%1", key))); global_config[key] = val; - y2milestone("%1 = %2", key, val); }); if (global_config["minor-count"]:nil == nil) { global_config["minor-count"] = "5"; @@ -127,7 +126,7 @@ string v = (string)SCR::Read(topath(sformat(".drbd.resources.%1.%2.%3",resname,r,k))); if (v != nil) { cf[k] = v; - y2milestone("%1 %2 %3 is %4", resname, r, k, v); + y2debug("%1 %2 %3 is %4", resname, r, k, v); } }); if (size(cf) > 0) { @@ -147,7 +146,7 @@ string v = (string)SCR::Read(topath(sformat(".drbd.resources.%1.on.%2.%3", resname, n, k))); if (v != nil) { nodecf[k] = v; - y2milestone("%1 on %2 %3 is %4", resname, n, k, v); + y2debug("%1 on %2 %3 is %4", resname, n, k, v); } }); if (size(nodecf) > 0) { @@ -163,10 +162,10 @@ } }); } else { - //first time run here, nothing to do here ? + y2milestone("drbd conf file %1 not found", drbd_dir); } - y2milestone("mcdebug resource_config=%1", resource_config); + y2milestone("resource_config=%1", resource_config); Progress::NextStage(); start_daemon = Service::Enabled("drbd"); @@ -187,11 +186,8 @@ recursive_write_map(add(cur_path, key), (map<string, any>) val); } else { - //if (val != nil) - { - y2milestone("mcdebug write %1=%2", add(cur_path, key), val); - SCR::Write(add(cur_path, key), val); - } + y2debug("write conf file: %1=%2", add(cur_path, key), val); + SCR::Write(add(cur_path, key), val); } }); } @@ -221,7 +217,7 @@ //global config here Progress::NextStage(); - y2milestone("global config writing"); + y2debug("to write global config: global_config=%1", global_config); foreach(string key, [ "disable-ip-verification", "minor-count", "dialog-refresh", "disable-io-hints" ], { if (global_config[key]:nil != nil) { @@ -234,7 +230,7 @@ //resource config here Progress::NextStage(); recursive_write_map(.drbd.resources, (map<string, any>)resource_config); - y2milestone("mcdebug ___ resource_config=%1", resource_config); + y2debug("to write resource config: resource_config=%1", resource_config); SCR::Write(topath(".drbd"), ""); sleep(100); diff -ru yast2-drbd-2.13.1.ori/src/resource_conf.ycp yast2-drbd-2.13.1/src/resource_conf.ycp --- yast2-drbd-2.13.1.ori/src/resource_conf.ycp 2007-07-20 17:20:17.000000000 +0800 +++ yast2-drbd-2.13.1/src/resource_conf.ycp 2007-07-20 16:37:26.000000000 +0800 @@ -67,7 +67,7 @@ ret = UI::UserInput(); - y2milestone("mcdebug ret=%1", ret); + y2debug("on ResListDialog(), UserInput ret=%1", ret); if (ret == `help) { myHelp("global_conf"); @@ -316,7 +316,7 @@ Wizard::SelectTreeItem("resource_conf"); ret = UI::UserInput(); - y2milestone("mcdebug ret=%1", ret); + y2debug("in ResDialog(), UserInput ret=%1", ret); if (ret == `help) { myHelp("global_conf"); @@ -336,6 +336,13 @@ if (ret == `advance || (ret == `ok && cur_page == `basic)) { + if ((string)UI::QueryWidget(`id(`n1_name), `Value) == (string)UI::QueryWidget(`id(`n2_name), `Value)) + { + Popup::Warning("Node names must be different."); + ret = nil; + continue; + } + foreach (symbol the_id, [`resname, `n1_addr, `n1_name, `n1_devc, `n1_disk, `n1_meta, `n2_name, `n2_addr, `n2_devc, `n2_disk, `n2_meta], { string str = (string) UI::QueryWidget(`id(the_id), `Value); @@ -392,24 +399,24 @@ res_config = save_advance_config(res_config); res_config = (map<string, any>) del_empty_item(res_config); - y2milestone("mcdebug del_empty+item=%1", res_config); + y2debug("del_empty_item(res_config)=%1", res_config); if (size(resname) > 0) { //edit Drbd::resource_config = remove(Drbd::resource_config, resname); Drbd::resource_config[resname]=nil; resname = res_config["resname"]:""; - y2milestone("mcdebug edit resname=%1", resname); + y2debug("resname=%1", resname); if (size(resname) > 0) { res_config = remove(res_config, "resname"); Drbd::resource_config[resname] = res_config; - y2milestone("mcdebug new resname = %1", resname); - y2milestone("mcdebug drbd::resource_config = %1", Drbd::resource_config); + y2debug("new resname = %1", resname); + y2debug("mcdebug drbd::resource_config = %1", Drbd::resource_config); } } else { //add - y2milestone("mcdebug add"); + y2debug("add new resouce"); resname = res_config["resname"]:""; if (size(resname) > 0) { diff -ru yast2-drbd-2.13.1.ori/src/startup_conf.ycp yast2-drbd-2.13.1/src/startup_conf.ycp --- yast2-drbd-2.13.1.ori/src/startup_conf.ycp 2007-07-20 17:20:17.000000000 +0800 +++ yast2-drbd-2.13.1/src/startup_conf.ycp 2007-07-20 17:13:31.000000000 +0800 @@ -30,7 +30,7 @@ `Left( `RadioButton( `id ("on"), _("On -- Start DRBD Server Now and when Booting") ) ), `Left( `RadioButton( `id ("off"), _("Off -- Server Only Starts Manually") ) ), `VSpacing ( 1 ))))); - + term Tonoff = `Frame ( _("Switch On and Off"), `Left ( `HSquash ( @@ -87,15 +87,18 @@ if (ret == `next || ret == `back) break; if (ret == "start_now") { + if (! Service::Start("drbd")) { - Report::Error ( Service::Error()); + //Report::Error ( Service::Error()); + Report::Error ("Start Drbd service failed"); } continue; } if (ret == "stop_now") { if (! Service::Stop("drbd")) { - Report::Error ( Service::Error() ); + //Report::Error ( Service::Error() ); + Report::Error ("Stop Drbd service failed"); } continue; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor