Ayal Baron has posted comments on this change.
Change subject: sd: unify lease params ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(2 inline comments)
.................................................... File vdsm/storage/sd.py Line 120: DMDK_LEASE_TIME_SEC = 'LEASETIMESEC' Line 121: DMDK_IO_OP_TIMEOUT_SEC = 'IOOPTIMEOUTSEC' Line 122: DMDK_LEASE_RETRIES = 'LEASERETRIES' Line 123: Line 124: # order is significant - DO NOT CHANGE when creating a dictionary you have no guarantee on the order, this looks plain wrong to me. Line 125: DEFAULT_LEASE_PARAMS = {DMDK_LEASE_RETRIES: 3, Line 126: DMDK_LEASE_TIME_SEC: 30, Line 127: DMDK_LOCK_RENEWAL_INTERVAL_SEC: 5, Line 128: DMDK_IO_OP_TIMEOUT_SEC: 1,
Line 127: DMDK_LOCK_RENEWAL_INTERVAL_SEC: 5, Line 128: DMDK_IO_OP_TIMEOUT_SEC: 1, Line 129: DMDK_LOCK_POLICY: "ON"} Line 130: Line 131: SUB_DEFAULT_LEASE_PARAMS = utils.getRange(DEFAULT_LEASE_PARAMS, 0, 3) why not just define sub_default_lease_params first without lock_policy and then just define default_lease_params as sub_def... + lock_policy? Line 132: Line 133: MASTER_FS_DIR = 'master' Line 134: VMS_DIR = 'vms' Line 135: TASKS_DIR = 'tasks'