Skip to contentSkip to conversation

conga ./conga.spec.in.in ricci/modules/rpm/Pac ...

Cluster-devel [email protected] 1 participant 1 message Jul 14, 2008

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2008-07-14 16:00:13

Modified files:
. : conga.spec.in.in
ricci/modules/rpm: PackageHandler.cpp ricci/modules/service: ServiceManager.cpp
Added files:
ricci/modules/virt: .cvsignore Makefile Virt.cpp Virt.h
VirtModule.cpp VirtModule.h main.cpp
ricci/modules/virt/d-bus: ricci-modvirt.oddjob.conf
ricci-modvirt.systembus.conf

Log message:

	fix bz430737

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.90&r2=1.45.2.91
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/rpm/PackageHandler.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.9.2.10&r2=1.9.2.11
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/service/ServiceManager.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.5.2.8&r2=1.5.2.9
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/.cvsignore.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/Makefile.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/Virt.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/Virt.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/VirtModule.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/VirtModule.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/main.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/d-bus/ricci-modvirt.oddjob.conf.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/d-bus/ricci-modvirt.systembus.conf.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=NONE&r2=1.1.2.1

conga.spec.in.in +1 -0
@@ -299,6 +299,7 @@
 - Fix bz446907 (rpm -V luci fails)
 - Fix bz450854 (luci doesn't start because of a missing dep /usr/bin/dc)
 - Fix bz206570 (RFE: vm list from ricci)
+- Fix bz430737 (Conga should install the 'cmirror' package when clustered storage is requested)
 
 * Fri Apr 18 2008 Ryan McCabe <[email protected]> 0.12.0-8
 - Fix bz441580 (conga should install 'sg3_utils' and start service 'scsi_reserve' when scsi fencing is used)
ricci/modules/rpm/PackageHandler.cpp +1 -0
@@ -506,6 +506,7 @@
 		}
 	} else if (RHEL5 || FC6) {
 		set.packages.push_back("gfs2-utils");
+		set.packages.push_back("cmirror");
 		if (RHEL5) {
 			set.packages.push_back("gfs-utils");
 			if (kernel.find("xen") == kernel.npos) {
ricci/modules/service/ServiceManager.cpp +2 -1
@@ -521,11 +521,12 @@
 		servs.push_back("gfs");
 		servs.push_back("scsi_reserve");
 	} else if (RHEL5 || FC6) {
-		descr = "Shared Storage: clvmd, gfs, gfs2";
+		descr = "Shared Storage: clvmd, cmirror, gfs, gfs2";
 		servs.push_back("clvmd");
 		servs.push_back("gfs");
 		servs.push_back("gfs2");
 		servs.push_back("scsi_reserve");
+		servs.push_back("cmirror");
 	}
 	s = ServiceSet(name, descr);
 	if (populate_set(s, servs))

/cvs/cluster/conga/ricci/modules/virt/.cvsignore,v --> standard output revision 1.1.2.1

- renamed from ricci/modules/virt/.cvsignore +3 -0
@@ -0,0 +1,3 @@
+ricci-modvirt
+*.orig
+*.rej

/cvs/cluster/conga/ricci/modules/virt/Makefile,v --> standard output revision 1.1.2.1

- renamed from ricci/modules/virt/Makefile +56 -0

56 lines not on this page · raw message

/cvs/cluster/conga/ricci/modules/virt/Virt.cpp,v --> standard output revision 1.1.2.1

- renamed from ricci/modules/virt/Virt.cpp +132 -0

132 lines not on this page · raw message

/cvs/cluster/conga/ricci/modules/virt/Virt.h,v --> standard output revision 1.1.2.1

- renamed from ricci/modules/virt/Virt.h +34 -0
@@ -0,0 +1,34 @@
+/*
+** Copyright (C) Red Hat, Inc. 2006-2008
+**
+** This program is free software; you can redistribute it and/or modify it
+** under the terms of the GNU General Public License version 2 as
+** published by the Free Software Foundation.
+**
+** This program is distributed in the hope that it will be useful, but
+** WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; see the file COPYING. If not, write to the
+** Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+** MA 02139, USA.
+*/
+
+#ifndef __CONGA_MODCLUSTER_VIRT_H
+#define __CONGA_MODCLUSTER_VIRT_H
+
+#include "String.h"
+#include <map>
+
+#define DMIDECODE_PATH			"/usr/sbin/dmidecode"
+#define DEFAULT_HV_URI			"xen:///"
+
+class Virt {
+	public:
+		static std::map<String, String> get_vm_list(const String& hvURI);
+		static bool virt_guest(void);
+};
+
+#endif

/cvs/cluster/conga/ricci/modules/virt/VirtModule.cpp,v --> standard output revision 1.1.2.1

- renamed from ricci/modules/virt/VirtModule.cpp +99 -0

99 lines not on this page · raw message

/cvs/cluster/conga/ricci/modules/virt/VirtModule.h,v --> standard output revision 1.1.2.1

- renamed from ricci/modules/virt/VirtModule.h +33 -0
@@ -0,0 +1,33 @@
+/*
+** Copyright (C) Red Hat, Inc. 2006-2008
+**
+** This program is free software; you can redistribute it and/or modify it
+** under the terms of the GNU General Public License version 2 as
+** published by the Free Software Foundation.
+**
+** This program is distributed in the hope that it will be useful, but
+** WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; see the file COPYING. If not, write to the
+** Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+** MA 02139, USA.
+*/
+
+#ifndef __CONGA_MODVIRT_VIRTMODULE_H
+#define __CONGA_MODVIRT_VIRTMODULE_H
+
+#include "Module.h"
+
+class VirtModule : public Module
+{
+	public:
+		VirtModule();
+		virtual ~VirtModule();
+
+	private:
+};
+
+#endif

/cvs/cluster/conga/ricci/modules/virt/main.cpp,v --> standard output revision 1.1.2.1

- renamed from ricci/modules/virt/main.cpp +35 -0
@@ -0,0 +1,35 @@
+/*
+** Copyright (C) Red Hat, Inc. 2006-2008
+**
+** This program is free software; you can redistribute it and/or modify it
+** under the terms of the GNU General Public License version 2 as
+** published by the Free Software Foundation.
+**
+** This program is distributed in the hope that it will be useful, but
+** WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; see the file COPYING. If not, write to the
+** Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+** MA 02139, USA.
+*/
+
+#include "VirtModule.h"
+
+#include <iostream>
+
+using namespace std;
+
+int
+main(int argc, char **argv)
+{
+	try {
+		VirtModule m;
+		return stdin_out_module_driver(m, argc, argv);
+	} catch (String e) {
+		cerr << e << endl;
+		return 1;
+	}
+}

/cvs/cluster/conga/ricci/modules/virt/d-bus/ricci-modvirt.oddjob.conf,v --> standard output revision 1.1.2.1

- renamed from ricci/modules/virt/d-bus/ricci-modvirt.oddjob.conf +25 -0
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<oddjobconfig>
+	<service name="com.redhat.ricci">
+	<object name="/com/redhat/ricci">
+		<interface name="com.redhat.ricci">
+			<method name="modvirt_rw">
+				<helper exec="/usr/libexec/ricci-modvirt"
+					arguments="1"
+					prepend_user_name="no"
+					argument_passing_method="stdin"
+				/>
+				<allow user="root"/>
+			</method>
+			<method name="modvirt_ro">
+				<helper exec="/usr/libexec/ricci-modvirt_ro"
+					arguments="1"
+					prepend_user_name="no"
+					argument_passing_method="stdin"
+				/>
+				<allow user="root"/>
+			</method>
+		</interface>
+	</object>
+	</service>
+</oddjobconfig>

/cvs/cluster/conga/ricci/modules/virt/d-bus/ricci-modvirt.systembus.conf,v --> standard output revision 1.1.2.1

- renamed from ricci/modules/virt/d-bus/ricci-modvirt.systembus.conf +25 -0
@@ -0,0 +1,25 @@
+<!DOCTYPE busconfig PUBLIC
+	  "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+	  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+
+<busconfig>
+
+	<!-- Only root can own ricci service. -->
+	<policy user="root">
+		<allow own="com.redhat.ricci"/>
+	</policy>
+
+	<!-- Allow anyone to call modvirt_rw and modvirt_ro
+	     methods.  oddjobd performs actual ACL. -->
+	<policy context="default">
+		<allow send_destination="com.redhat.ricci"
+		       send_path="/com/redhat/ricci"
+		       send_interface="com.redhat.ricci"
+		       send_member="modvirt_rw"/>
+		<allow send_destination="com.redhat.ricci"
+		       send_path="/com/redhat/ricci"
+		       send_interface="com.redhat.ricci"
+		       send_member="modvirt_ro"/>
+	</policy>
+
+</busconfig>