Commit f3f6668
committed
Fix: Resolve build errors and logic for agent ippool lease sync
This commit addresses multiple build errors in the agent's local ippool
controller (`pkg/agent/ippool/controller.go`) and refines its lease
synchronization logic:
- Corrected `LeaseTime` type handling when calling `dhcpAllocator.AddLease`,
passing `specConf.LeaseTime` directly as it's assumed to be `*int`
based on compiler errors.
- Added missing `sync` and `util` package imports.
- Removed unused variables.
- Corrected the logic for checking lease existence before deletion.
- Deleted the conflicting `pkg/agent/ippool/ippool.go` file that caused
a method redeclaration error.
These changes are intended to fix the build and ensure the agent's DHCP
lease cache is correctly populated from the IPPool status, particularly
after failovers or restarts.1 parent f64e504 commit f3f6668
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
| |||
195 | 197 | | |
196 | 198 | | |
197 | 199 | | |
198 | | - | |
| 200 | + | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
| |||
0 commit comments