[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/ricci/modules rpm/PackageHandler.cpp rpm ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2008-01-25 00:38:51

Modified files:
	ricci/modules/rpm: PackageHandler.cpp RpmModule.cpp 
	ricci/modules/service: ServiceManager.cpp 

Log message:
	Fix a few long-standing bugs that caused spurious errors while deploying nodes with odd combinations of packages installed.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/rpm/PackageHandler.cpp.diff?cvsroot=cluster&r1=1.19&r2=1.20
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/rpm/RpmModule.cpp.diff?cvsroot=cluster&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/service/ServiceManager.cpp.diff?cvsroot=cluster&r1=1.15&r2=1.16

--- conga/ricci/modules/rpm/PackageHandler.cpp	2008/01/02 20:47:37	1.19
+++ conga/ricci/modules/rpm/PackageHandler.cpp	2008/01/25 00:38:51	1.20
@@ -576,24 +576,24 @@
 		String name(iter->name);
 		map<String, Package>::iterator pack_iter = h_pre.packages().find(name);
 		if (pack_iter == h_pre.packages().end()) {
-			throw String("package ") + name
-					+ " is present neither locally nor in repository";
+			throw String("Package \"") + name
+					+ "\" is present neither locally nor in any available repository";
 		} else {
 			String curr_ver(pack_iter->second.version);
 			String repo_ver(pack_iter->second.repo_version);
 			if (curr_ver.empty()) {
 				// not installed
 				if (repo_ver.empty()) {
-					throw String("package ") + name
-							+ " is not present in repository";
+					throw String("Package \"") + name
+							+ "\" is not present in any available repository";
 				} else
 					rpms.push_back(name);
 			} else {
 				// already installed
 				if (upgrade) {
 					if (repo_ver.empty()) {
-						throw String("package ") + name
-								+ " is not present in repository";
+						throw String("Package \"") + name
+								+ "\" is not present in any available repository";
 					} else if (repo_ver > curr_ver)
 						rpms.push_back(name);
 				}
@@ -610,8 +610,8 @@
 		map<String, PackageSet>::iterator set_iter = h_pre.sets().find(name);
 
 		if (set_iter == h_pre.sets().end()) {
-			throw String("packages of set ") + name
-					+ " present neither locally nor in repository";
+			throw String("Packages of set \"") + name
+					+ "\" are neither present neither locally nor in any available repository";
 		} else {
 			PackageSet& p_set = set_iter->second;
 			if (p_set.installed) {
@@ -627,8 +627,7 @@
 								rpms.push_back(*name_iter);
 							}
 						} else {
-							throw String("packages of set ") + name +
-								" are not present in any available repository";
+							/* Packages are already up-to-date */
 						}
 					}
 				}
@@ -643,8 +642,8 @@
 						rpms.push_back(*name_iter);
 					}
 				} else {
-					throw String("packages of set ") + name +
-						" are not present in any available repository";
+					throw String("Packages of set \"") + name +
+						"\" are not present in any available repository";
 				}
 			}
 		}
@@ -679,6 +678,8 @@
 			FC6 = true;
 		else if (release.find("Moonshine") != release.npos)
 			FC6 = true;
+		else if (release.find("Werewolf") != release.npos)
+			FC6 = true;
 		else if (release.find("Tikanga") != release.npos)
 			RHEL5 = true;
 		else
--- conga/ricci/modules/rpm/RpmModule.cpp	2008/01/02 20:47:37	1.8
+++ conga/ricci/modules/rpm/RpmModule.cpp	2008/01/25 00:38:51	1.9
@@ -92,24 +92,24 @@
 				rpms.push_back(pack);
 			}
 		}
+	}
 
-		list<PackageSet> sets;
-		for (list<XMLObject>::const_iterator
-				iter = sets_list.begin() ;
-				iter != sets_list.end() ;
-				iter++)
-		{
-			if (iter->tag() == "set") {
-				String name(iter->get_attr("name"));
-				if (name.size()) {
-					PackageSet set(name);
-					sets.push_back(set);
-				}
+	list<PackageSet> sets;
+	for (list<XMLObject>::const_iterator
+			iter = sets_list.begin() ;
+			iter != sets_list.end() ;
+			iter++)
+	{
+		if (iter->tag() == "set") {
+			String name(iter->get_attr("name"));
+			if (name.size()) {
+				PackageSet set(name);
+				sets.push_back(set);
 			}
 		}
-		PackageHandler::install(rpms, sets, upgrade);
 	}
 
+	PackageHandler::install(rpms, sets, upgrade);
 	return VarMap();
 }
 
@@ -219,7 +219,7 @@
 				}
 
 				if (installable) {
-					if (!set.installed && set.in_repo)
+					if (set.in_repo)
 						add = true;
 				}
 
--- conga/ricci/modules/service/ServiceManager.cpp	2008/01/02 20:47:37	1.15
+++ conga/ricci/modules/service/ServiceManager.cpp	2008/01/25 00:38:51	1.16
@@ -311,9 +311,9 @@
 	name();
 
 	for (list<Service>::const_iterator
-		iter = servs.begin() ;
-		iter != servs.end() ;
-		iter++)
+			iter = servs.begin() ;
+			iter != servs.end() ;
+			iter++)
 	{
 		if (!iter->enabled())
 			return false;
@@ -478,13 +478,14 @@
 
 	list<String> servs;
 	String name = "Cluster Base";
-	String descr = "Cluster infrastructure: ccs, cman, fence";
-
+	String descr;
 	if (RHEL4 || FC5) {
+		descr = "Cluster infrastructure (RHEL4): ccs, cman, fence";
 		servs.push_back("ccsd");
 		servs.push_back("cman");
 		servs.push_back("fenced");
 	} else if (RHEL5 || FC6) {
+		descr = "Cluster infrastructure (RHEL5): ccs, cman, fence";
 		servs.push_back("cman");
 		servs.push_back("qdiskd");
 	}
@@ -830,6 +831,8 @@
 			FC6 = true;
 		else if (release.find("Moonshine") != release.npos)
 			FC6 = true;
+		else if (release.find("Werewolf") != release.npos)
+			FC6 = true;
 		else if (release.find("Tikanga") != release.npos)
 			RHEL5 = true;
 		else {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]