fix some error in config scripts
authorGiannakos Filippos <philipgian@cslab.ece.ntua.gr>
Mon, 24 Sep 2012 19:56:08 +0000 (22:56 +0300)
committerGiannakos Filippos <philipgian@cslab.ece.ntua.gr>
Mon, 24 Sep 2012 19:56:08 +0000 (22:56 +0300)
xseg/launch
xseg/peers/user/mt-mapperd.c
xseg/tools/vlmc

index c88ddcc..2825d8d 100755 (executable)
@@ -30,10 +30,10 @@ function parse_config {
        [ -z "${REQS}" ] && REQS=512
        [ -z "${PORTS}" ] && PORTS=16
        [ -z "${IMAGES}" ] && IMAGES="/home/user/archip/xseg/peers/user/foo"
-       [ -z "${MAPS}" ] && IMAGES="/home/user/archip/xseg/peers/user/foo"
+       [ -z "${MAPS}" ] && MAPS="/home/user/archip/xseg/peers/user/foo"
        [ -z "${PITHOS}" ] && PITHOS="/srv/pithos/data/blocks"
-       [ -z "${PITHOSMAPS}" ] && PITHOS="/srv/pithos/data/maps"
-       [ -z "${XSEG_LOGS}" ] && XSEG_LOGS="/home/user/archip/logs"
+       [ -z "${PITHOSMAPS}" ] && PITHOSMAPS="/srv/pithos/data/maps"
+       [ -z "${XSEG_LOGS}" ] && XSEG_LOGS="/home/philipgian/archip/logs"
        [ -z "${DEVICE_PREFIX}" ] && DEVICE_PREFIX="/dev/xsegbd"
        [ -z "${XSEGBD_SYSFS}" ] && XSEGBD_SYSFS="/sys/bus/xsegbd"
        [ -z "${CHRDEV_NAME}" ] && CHRDEV_NAME="/dev/`cat /proc/devices | grep segdev | awk '{print $2}'`"
@@ -106,14 +106,14 @@ function spawn_filed {
 }
 
 function spawn_pfiled {
-       pgrep -f "peers/user/pfiled" || \
        "${XSEG_HOME}/peers/user/pfiled" -p "$BPORT" -g "${SPEC}" -n \
        ${NR_OPS} "${PITHOS}" "${IMAGES}" &> "${XSEG_LOGS}/pfiled-${HOSTNAME}" &
 }
+
 function spawn_pfiledm {
-       pgrep -f "peers/user/pfiled" || \
        "${XSEG_HOME}/peers/user/pfiled" -p "$MBPORT" -g "${SPEC}" -n \
        ${NR_OPS} "${PITHOSMAPS}" "${MAPS}" &> "${XSEG_LOGS}/pfiledm-${HOSTNAME}" &
+}
 
 function spawn_vlmcd {
        pgrep -f "peers/user/mt-vlmcd" || \
@@ -124,7 +124,7 @@ function spawn_vlmcd {
 
 function spawn_mapperdc {
        pgrep -f "mt-mapperd" || \
-       "${XSEG_HOME}/peers/user/mt-mapperd" -t 1 -p "$MPORT" -bp "$BPORT"  -g "${SPEC}"\
+       "${XSEG_HOME}/peers/user/mt-mapperd" -t 1 -p "$MPORT" -bp "$BPORT" -mbp "$MBPORT" -g "${SPEC}"\
        &> "${XSEG_LOGS}/mapperd-${HOSTNAME}" & 
 #      alloc_requests "$MPORT:0" 128
 }
@@ -287,7 +287,7 @@ doublemap)
                sleep 0.5
                spawn_pfiled
                spawn_pfiledm
-               spawn_mapperd
+               spawn_mapperdc
                spawn_vlmcd
                ;;
        stop)
index ff5d04c..47a0aad 100644 (file)
@@ -136,7 +136,6 @@ static struct map * find_map(struct mapperd *mapper, char *target, uint32_t targ
        //assert targetlen <= XSEG_MAX_TARGET_LEN
        strncpy(buf, target, targetlen);
        buf[targetlen] = 0;
-       fprintf(stderr, "%s\n", buf);
        r = xhash_lookup(mapper->hashmaps, (xhashidx) buf, (xhashidx *) &m);
        if (r < 0)
                return NULL;
@@ -153,7 +152,6 @@ static int insert_map(struct mapperd *mapper, struct map *map)
                goto out;
        }
        
-       fprintf(stderr, "%s\n", map->volume);
        r = xhash_insert(mapper->hashmaps, (xhashidx) map->volume, (xhashidx) map);
        if (r == -XHASH_ERESIZE) {
                xhashidx shift = xhash_grow_size_shift(map->objects);
index a96e0de..1a3df38 100755 (executable)
@@ -58,7 +58,7 @@ def xsegbd_loaded():
 def vlmc_map(args):
     xsegbd_loaded()
     name = args.name[0]
-    prev = 2
+    prev = 3
     try:
         result = [int(open(XSEGBD_SYSFS + "devices/" + f + "/srcport").read().strip()) for f in os.listdir(XSEGBD_SYSFS + "devices/")]
         result.sort()