Commit 243b2583 authored by Yuan Gao's avatar Yuan Gao
Browse files

Tolerate EFS state directory existing during mount.

parent 6ca88c44
......@@ -30,6 +30,7 @@
#
# The script will add recommended mount options, if not provided in fstab.
import errno
import json
import logging
import os
......@@ -439,7 +440,11 @@ def create_state_file_dir(config, state_file_dir):
except ConfigParser.NoOptionError:
pass
os.makedirs(state_file_dir, mode)
try:
os.makedirs(state_file_dir, mode)
except OSError as e:
if errno.EEXIST != e.errno or not os.path.isdir(state_file_dir):
raise
@contextmanager
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment