mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
vpcagent: ovn: increase dhcp lease, renew, rebind time
This commit is contained in:
@@ -296,15 +296,22 @@ func (keeper *OVNNorthboundKeeper) ClaimNetwork(ctx context.Context, network *ag
|
||||
"0.0.0.0/0", network.GuestGateway,
|
||||
}
|
||||
mtu -= 58
|
||||
const (
|
||||
leaseTime = 86400 * 365 * 3
|
||||
renewTime = 86400
|
||||
rebindTime = 86400 * 3
|
||||
)
|
||||
dhcpopts := &ovn_nb.DHCPOptions{
|
||||
Cidr: fmt.Sprintf("%s/%d", network.GuestIpStart, network.GuestIpMask),
|
||||
Options: map[string]string{
|
||||
"server_id": network.GuestGateway,
|
||||
"server_mac": dhcpMac,
|
||||
"lease_time": fmt.Sprintf("%d", 86400),
|
||||
"router": network.GuestGateway,
|
||||
"classless_static_route": fmt.Sprintf("{%s}", strings.Join(routes, ",")),
|
||||
"mtu": fmt.Sprintf("%d", mtu),
|
||||
"lease_time": fmt.Sprintf("%d", leaseTime),
|
||||
"T1": fmt.Sprintf("%d", renewTime),
|
||||
"T2": fmt.Sprintf("%d", rebindTime),
|
||||
},
|
||||
ExternalIds: map[string]string{
|
||||
externalKeyOcRef: network.Id,
|
||||
|
||||
Reference in New Issue
Block a user