Skip to content
  • Ilias Tsitsimpis's avatar
    Override disks in BuildInstanceHookEnvByObject · e8dd6643
    Ilias Tsitsimpis authored
    
    
    The function BuildHooksEnv in LUInstanceRemove, calls the function
    BuildInstanceHookEnvByObject which needs to query the config to get
    the secondary_nodes/disks of an instance. The function BuildHooksEnv
    will be called before and after the Exec function. The second time
    it will fail to query for the secondary_nodes/disks of the instance as
    the instance will not be available at the config any more.
    
    This patch changes BuildInstanceHookEnvByObject to allow it to override
    the secondary_nodes/disks of an instance.
    
    Signed-off-by: default avatarIlias Tsitsimpis <iliastsi@grnet.gr>
    Reviewed-by: default avatarJose A. Lopes <jabolopes@google.com>
    e8dd6643