Commit 204eb58c authored by Thomas Thrainer's avatar Thomas Thrainer
Browse files

Remove physical_id field reference from tools



Remove remaining references to the physical_id field in cluster-merge
and sanitize-config.
Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
Reviewed-by: default avatarJose A. Lopes <jabolopes@google.com>
parent 5275a77f
......@@ -400,10 +400,6 @@ class Merger(object):
logical_id[2] = port
dsk.logical_id = tuple(logical_id)
physical_id = list(dsk.physical_id)
physical_id[1] = physical_id[3] = port
dsk.physical_id = tuple(physical_id)
my_config.AddInstance(instance_info,
_CLUSTERMERGE_ECID + str(fake_ec_id))
fake_ec_id += 1
......
......@@ -199,13 +199,8 @@ def SanitizeDisks(opts, cfg): # pylint: disable=W0613
for child in disk["children"]:
helper(child)
if disk["dev_type"] == constants.DT_DRBD8:
if "physical_id" in disk:
del disk["physical_id"]
if disk["dev_type"] == constants.DT_PLAIN and opts.sanitize_lvs:
disk["logical_id"][1] = _Get(disk["logical_id"][1])
disk["physical_id"][1] = disk["logical_id"][1]
lv_map = {}
......@@ -279,9 +274,7 @@ def main():
config_data = serializer.LoadJson(utils.ReadFile(opts.CONFIG_DATA_PATH))
# first, do some disk cleanup: remove DRBD physical_ids, since it
# contains both IPs (which we want changed) and the DRBD secret, and
# it's not needed for normal functioning, and randomize LVM names
# Randomize LVM names
SanitizeDisks(opts, config_data)
SanitizeSecrets(opts, config_data)
......
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