【问题标题】:Azure pipelines - how does Azure Network Load Balancer Task work?Azure 管道 - Azure 网络负载均衡器任务如何工作?
【发布时间】:2021-03-18 17:36:32
【问题描述】:

我正在设置发布管道,我想使用 Azure 网络负载均衡器任务将实例从负载均衡器中取出,但我想知道它是如何做到的,即它是耗尽连接还是终止连接。

我猜如果它删除网络接口它只是杀死连接,谁能告诉我?

【问题讨论】:

  • 好几天没有收到您的回复,能否分享一下您对此问题的最新信息?如果您有任何疑虑,请随时在此处分享。

标签: azure azure-devops azure-load-balancer azure-devops-pipelines


【解决方案1】:

根据github上的source code,connect动作添加了loadBalancerBackendAddressPools porperty(对LoadBalancerBackendAddressPool资源的引用)。其实是通过调用Network Interfaces-Create Or Updaterest api来设置的。

if (action == "Connect") {
        taskinternal._writeLine(tl.loc("ConnectingVMtoLB", loadBalancerName));
        var lb = await nlbUtility.getLoadBalancer(SPN, endpointUrl, loadBalancerName, resourceGroupName);
        nicLbBackendPoolConfig = lb.properties.backendAddressPools;
}
else {
        taskinternal._writeLine(tl.loc("DisconnectingVMfromLB", loadBalancerName));
}
nicVm.properties.ipConfigurations[0].properties['loadBalancerBackendAddressPools'] = nicLbBackendPoolConfig;
var setNIStatus = await nlbUtility.setNetworkInterface(SPN, endpointUrl, nicVm, resourceGroupName);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-12
    • 1970-01-01
    • 1970-01-01
    • 2020-06-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多