Change location of settings file to /etc/archipelago
authorFilippos Giannakos <philipgian@grnet.gr>
Fri, 26 Jul 2013 07:26:55 +0000 (10:26 +0300)
committerFilippos Giannakos <philipgian@grnet.gr>
Tue, 30 Jul 2013 14:48:39 +0000 (17:48 +0300)
xseg/Makefile
xseg/base.mk
xseg/conf/archipelago.conf [new file with mode: 0644]
xseg/tools/archipelago/archipelago/common.py

index 6f38780..f34b1ef 100644 (file)
@@ -60,6 +60,8 @@ clean: $(XSEG_CLEAN_TARGETS)
        rm $(CONFIG)
 
 install: $(XSEG_INSTALL_TARGETS)
+       install -d $(DESTDIR)$(confdir)
+       install -o 0 -g 0 -m 644 -t $(DESTDIR)$(confdir) conf/archipelago.conf
 
 install-src: $(XSEG_INSTALLSRC_TARGETS) $(XSEG_INSTALLSRC_DIRS)
        install -d $(DESTDIR)$(srcdir)/lib
index de6798a..84481e9 100644 (file)
@@ -69,6 +69,7 @@ pythondir=/usr/lib/python2.7/
 moduledir=/lib/modules/$(KVER)/extra/
 srcdir=/usr/src/archipelago-modules-dkms-$(VERSION)/xseg/
 ganetidir=/usr/share/ganeti/extstorage/archipelago/
+confdir=/etc/archipelago/
 
 INC=-I$(BASE)
 INC+=-I$(BASE)/peers/$(TARGET)
diff --git a/xseg/conf/archipelago.conf b/xseg/conf/archipelago.conf
new file mode 100644 (file)
index 0000000..1bd8564
--- /dev/null
@@ -0,0 +1,71 @@
+# xseg
+#SPEC="segdev:xsegbd:1024:5120:12"
+SEGMENT_PORTS = 1024
+SEGMENT_SIZE = 5120
+
+XSEGBD_START=0
+XSEGBD_END=499
+VTOOL_START=1003
+VTOOL_END=1022
+
+# (peer role, peer type)
+# Mandatory peer roles:
+#      blockerb
+#      blockerm
+#      mapperd
+#      vlmcd
+#
+# Available peer types:
+#      rados_blocker
+#      file_blocker
+#      mapperd
+#      vlmcd
+# Order matters. Peers will be started with list order and stopped with reversed
+# order.
+roles = [('blockerb', 'rados_blocker'),
+         ('blockerm', 'rados_blocker'),
+         ('mapperd', 'mapperd'),
+         ('vlmcd', 'vlmcd')]
+
+#nr_ops: Max number of flying operations
+#log_level: verbosity levels for each xseg peer
+#            0 - Error
+#            1 - Warnings
+#            2 - Info
+#            3 - Debug
+
+blockerb= {
+    'portno_start': 1000,
+    'portno_end': 1000,
+    'log_level': 3,
+    'nr_ops': 512,
+    'pool': 'blocks'
+}
+
+blockerm = {
+    'portno_start': 1002,
+    'portno_end': 1002,
+    'log_level': 3,
+    'nr_ops': 512,
+    'pool': 'maps'
+}
+
+mapperd = {
+    'portno_start': 1001,
+    'portno_end': 1001,
+    'log_level': 3,
+    'nr_ops': 512,
+    'blockerb_port': 1000,
+    'blockerm_port': 1002
+}
+
+vlmcd = {
+    'portno_start': 500,
+    'portno_end': 999,
+    'log_level': 3,
+    'nr_ops': 512,
+    'blocker_port': 1000,
+    'mapper_port': 1001
+}
+
+
index dd141b1..ce7cae8 100755 (executable)
@@ -67,7 +67,7 @@ modules = ['xseg', 'segdev', 'xseg_posix', 'xseg_pthread', 'xseg_segdev']
 xsegbd = 'xsegbd'
 
 BIN_DIR = '/usr/bin/'
-DEFAULTS = '/etc/default/archipelago'
+DEFAULTS = '/etc/archipelago/archipelago.conf'
 
 #system defaults
 ARCHIP_PREFIX = 'archip_'