On Fri, Sep 20, 2013 at 07:41:07PM +0200, Thomas Thrainer wrote:
> Remove remaining references to the physical_id field in cluster-merge
> and sanitize-config.
> 
> Signed-off-by: Thomas Thrainer <[email protected]>
> ---
>  tools/cluster-merge   | 4 ----
>  tools/sanitize-config | 9 +--------
>  2 files changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/tools/cluster-merge b/tools/cluster-merge
> index 04e08cf..5b7eb3e 100755
> --- a/tools/cluster-merge
> +++ b/tools/cluster-merge
> @@ -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
> diff --git a/tools/sanitize-config b/tools/sanitize-config
> index 5556ffb..385cea3 100755
> --- a/tools/sanitize-config
> +++ b/tools/sanitize-config
> @@ -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)
> -- 
> 1.8.4
> 

LGTM.

Thanks,
Jose

-- 
Jose Antonio Lopes
Ganeti Engineering
Google Germany GmbH
Dienerstr. 12, 80331, München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores
Steuernummer: 48/725/00206
Umsatzsteueridentifikationsnummer: DE813741370

Reply via email to