]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
get rid of redundandacy in ceph_disk
authorJoshua Schmid <jschmid@suse.com>
Thu, 21 Jan 2016 17:41:29 +0000 (18:41 +0100)
committerJoshua Schmid <jschmid@suse.com>
Thu, 21 Jan 2016 17:41:29 +0000 (18:41 +0100)
For a plain dmcrypt device, "create" is the same as open --type plain / plainOpen
bnc: #957385

src/ceph-disk

index 493f46d50696b2fab56dc74fe06dcd55d5e29976..0f15a6edb8fcc7c8eb22f51dd3e18849beb3e827 100755 (executable)
@@ -1123,20 +1123,9 @@ def dmcrypt_new(rawdev, _uuid, cryptsetup_parameters, key_dir, luks):
         rawdev,
         ] + cryptsetup_parameters
 
-    create_args = [
-        'cryptsetup',
-        '--key-file',
-        '-',
-        'create',
-        _uuid,
-        rawdev,
-        ] + cryptsetup_parameters
-
     try:
         if luks:
             command_check_call_stdin(dmcrypt_retrieve_key(_uuid, key_dir, luks), luksFormat_args)
-        else:
-            command_check_call_stdin(dmcrypt_retrieve_key(_uuid, key_dir, luks), create_args)
     except subprocess.CalledProcessError as e:
         raise Error('unable to create dmcrypt device', rawdev, e)
 
@@ -1559,20 +1548,9 @@ def prepare_journal_dev(
                  journal_dmcrypt,
                    ] + cryptsetup_parameters
 
-            create_args = [
-                 'cryptsetup',
-                 '--key-file',
-                 journal_dm_keypath,
-                 'create',
-                 journal_uuid,
-                 journal_dmcrypt,
-                   ] + cryptsetup_parameters
-
             try:
                 if luks:
                     command_check_call(luksFormat_args)
-                else:
-                    command_check_call(create_args)
             except subprocess.CalledProcessError as e:
                 raise Error('unable to format device for LUKS', journal_symlink, e)