On Tue, Jun 16, 2015 at 10:55:49AM +0200, 'BSRK Aditya' via ganeti-devel wrote:
> This is used in instance migration
> 
> Signed-off-by: BSRK Aditya <[email protected]>
> ---
>  src/Ganeti/WConfd/ConfigModifications.hs |   17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/src/Ganeti/WConfd/ConfigModifications.hs 
> b/src/Ganeti/WConfd/ConfigModifications.hs
> index 7a91d1a..d72ad25 100644
> --- a/src/Ganeti/WConfd/ConfigModifications.hs
> +++ b/src/Ganeti/WConfd/ConfigModifications.hs
> @@ -537,6 +537,22 @@ markInstanceDisksActive iUuid = do
>          return (inst'', cs'))
>      (return ())
>  
> +-- | Mark the status of instance disks inactive.
> +markInstanceDisksInactive :: InstanceUUID -> WConfdMonad Bool
> +markInstanceDisksInactive iUuid = do

This function is a special case of _SetInstanceStatus and the configuration
contains many such functions that call it just with different parameters.
So instead of writing a special case first that later has to be generalised,
why not do it properly in the first place and implement an analogon of 
_SetInstanceStatus
in haskell and get rid con @ConfigSync for all those functions that just call
_SetInstanceStatus with different parameters all in one patch series?

Thanks,
Klaus

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores

Reply via email to