]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: do not setup_statedir on trigger 16092/head
authorLoic Dachary <ldachary@redhat.com>
Thu, 1 Jun 2017 09:37:20 +0000 (11:37 +0200)
committerNathan Cutler <ncutler@suse.com>
Tue, 4 Jul 2017 04:46:57 +0000 (06:46 +0200)
trigger may run when statedir is unavailable and does not use it.

Fixes: http://tracker.ceph.com/issues/19941
Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 16bfbdd3d9988523bba31aace516c303057daa58)

src/ceph-disk/ceph_disk/main.py

index 97a905ff7225063cc834f0ba0fa9f3c8f061d36e..92ec2306eb24d8e7114bb1e984cb07f3fdfc7070 100755 (executable)
@@ -5431,7 +5431,9 @@ def main(argv):
         path = os.environ.get('PATH', os.defpath)
         os.environ['PATH'] = args.prepend_to_path + ":" + path
 
-    setup_statedir(args.statedir)
+    if args.func.__name__ != 'main_trigger':
+        # trigger may run when statedir is unavailable and does not use it
+        setup_statedir(args.statedir)
     setup_sysconfdir(args.sysconfdir)
 
     global CEPH_PREF_USER