• Iustin Pop's avatar
    cluster verify: add hvparams verification · 58a59652
    Iustin Pop authored
    
    
    Currently, the validity of the hypervisor parameters is only checked
    at init/modification time, and not in the cluster verify. This is bad,
    as it can lead to inconsistent state that is only detected when the
    next modification (which can be unrelated) is made, leading to
    unexpected error messages.
    
    This patch adds both syntax verification (in masterd) and validity
    verification on remote nodes. The downside of the patch is that on
    clusters with many instances which have custom parameters, it will be
    slow. A possible improvement would be to detect duplicate, identical
    set of parameters, and collapse these into a single verification, but
    that is left as a TODO (in case it becomes problematic).
    
    An additional change is in utils.ForceDict, where we said 'key',
    whereas this function is always used with parameter dicts, so I
    changed it to "Unknown parameter".
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
    58a59652
cmdlib.py 395 KB