Revision dde9cf31

View differences:

src/datastore_mad/remotes/ceph/export
77 77
fi
78 78

  
79 79
IMPORT_SOURCE="rbd://$DST_HOST/$SRC"
80
IS_JOIN="?"
80 81

  
81 82
if [ -n "$CEPH_USER" ]; then
82 83
    RBD="$RBD --id ${CEPH_USER}"
83
    IMPORT_SOURCE="${IMPORT_SOURCE}?CEPH_USER=${CEPH_USER}"
84
    IMPORT_SOURCE="${IMPORT_SOURCE}${IS_JOIN}CEPH_USER=${CEPH_USER}"
85
    IS_JOIN="&"
84 86
fi
85 87

  
86 88
if [ -n "$CEPH_KEY" ]; then
87 89
    RBD="$RBD --keyfile ${CEPH_USER}"
88
    IMPORT_SOURCE="${IMPORT_SOURCE}?CEPH_USER=${CEPH_USER}?CEPH_KEY=${CEPH_KEY}?"
90
    IMPORT_SOURCE="${IMPORT_SOURCE}${IS_JOIN}CEPH_KEY=${CEPH_KEY}"
91
    IS_JOIN="&"
89 92
fi
90 93

  
91 94
if [ -n "$CEPH_CONF" ]; then
92 95
    RBD="$RBD --conf ${CEPH_CONF}"
93

  
94
    if [ -n "$CEPH_USER" ]; then
95
        IMPORT_SOURCE="${IMPORT_SOURCE}&"
96
    elif [ -n "$CEPH_KEY" ]; then
97
        IMPORT_SOURCE="${IMPORT_SOURCE}&"
98
    else
99
        IMPORT_SOURCE="${IMPORT_SOURCE}?"
100
    fi
101

  
102
    IMPORT_SOURCE="${IMPORT_SOURCE}CEPH_CONF=${CEPH_CONF}"
96
    IMPORT_SOURCE="${IMPORT_SOURCE}${IS_JOIN}CEPH_CONF=${CEPH_CONF}"
103 97
fi
104 98

  
105 99
#-------------------------------------------------------------------------------
src/datastore_mad/remotes/downloader.sh
182 182
                        SOURCE \
183 183
                        PARAM_DS \
184 184
                        PARAM_CEPH_USER \
185
                        PARAM_CEPH_KEY \
185 186
                        PARAM_CEPH_CONF)
186 187

  
187 188
    USER="${URL_ELEMENTS[j++]}"
......
189 190
    SOURCE="${URL_ELEMENTS[j++]}"
190 191
    DS="${URL_ELEMENTS[j++]}"
191 192
    CEPH_USER="${URL_ELEMENTS[j++]}"
193
    CEPH_KEY="${URL_ELEMENTS[j++]}"
192 194
    CEPH_CONF="${URL_ELEMENTS[j++]}"
193 195

  
194 196
    # Remove leading '/'
......
202 204
        RBD="$RBD --id ${CEPH_USER}"
203 205
    fi
204 206

  
207
    if [ -n "$CEPH_KEY" ]; then
208
        RBD="$RBD --keyfile ${CEPH_KEY}"
209
    fi
210

  
205 211
    if [ -n "$CEPH_CONF" ]; then
206 212
        RBD="$RBD --conf ${CEPH_CONF}"
207 213
    fi

Also available in: Unified diff