Browse code

Merge "Create LOGDIR earlier in the process"

Jenkins authored on 2016/01/26 00:41:25
Showing 1 changed files
... ...
@@ -299,16 +299,6 @@ EOF
299 299
     fi
300 300
 }
301 301
 
302
-# If you have all the repos installed above already setup (e.g. a CI
303
-# situation where they are on your image) you may choose to skip this
304
-# to speed things up
305
-SKIP_EPEL_INSTALL=$(trueorfalse False SKIP_EPEL_INSTALL)
306
-
307
-if is_fedora && [[ $DISTRO == "rhel7" ]] && \
308
-        [[ ${SKIP_EPEL_INSTALL} != True ]]; then
309
-    _install_epel_and_rdo
310
-fi
311
-
312 302
 
313 303
 # Configure Target Directories
314 304
 # ----------------------------
... ...
@@ -322,6 +312,11 @@ sudo mkdir -p $DEST
322 322
 safe_chown -R $STACK_USER $DEST
323 323
 safe_chmod 0755 $DEST
324 324
 
325
+# Destination path for devstack logs
326
+if [[ -n ${LOGDIR:-} ]]; then
327
+    mkdir -p $LOGDIR
328
+fi
329
+
325 330
 # Destination path for service data
326 331
 DATA_DIR=${DATA_DIR:-${DEST}/data}
327 332
 sudo mkdir -p $DATA_DIR
... ...
@@ -335,6 +330,16 @@ if [ -z "`grep ^127.0.0.1 /etc/hosts | grep $LOCAL_HOSTNAME`" ]; then
335 335
     sudo sed -i "s/\(^127.0.0.1.*\)/\1 $LOCAL_HOSTNAME/" /etc/hosts
336 336
 fi
337 337
 
338
+# If you have all the repos installed above already setup (e.g. a CI
339
+# situation where they are on your image) you may choose to skip this
340
+# to speed things up
341
+SKIP_EPEL_INSTALL=$(trueorfalse False SKIP_EPEL_INSTALL)
342
+
343
+if is_fedora && [[ $DISTRO == "rhel7" ]] && \
344
+        [[ ${SKIP_EPEL_INSTALL} != True ]]; then
345
+    _install_epel_and_rdo
346
+fi
347
+
338 348
 # Ensure python is installed
339 349
 # --------------------------
340 350
 is_package_installed python || install_package python
... ...
@@ -394,10 +399,6 @@ TIMESTAMP_FORMAT=${TIMESTAMP_FORMAT:-"%F-%H%M%S"}
394 394
 LOGDAYS=${LOGDAYS:-7}
395 395
 CURRENT_LOG_TIME=$(date "+$TIMESTAMP_FORMAT")
396 396
 
397
-if [[ -n ${LOGDIR:-} ]]; then
398
-    mkdir -p $LOGDIR
399
-fi
400
-
401 397
 if [[ -n "$LOGFILE" ]]; then
402 398
     # Clean up old log files.  Append '.*' to the user-specified
403 399
     # ``LOGFILE`` to match the date in the search template.