Commit 60faea1
committed
ipam: Wait for ENI netlink iface before configuring routes
In ENI IPAM mode, the ENIs are created by the operator. At the same
time, on each node, the agents configure the v4 and v6 rules and routes
for the Cilium router, after retrieving its IPs from either k8s or the
filesystem. In order to do so, each agent query netlink to get the
ifindex of the interface with the router IP, given its MAC address.
Unfortunately this behavior is racy, since the agent might query netlink
too soon, when the ENI is not yet up and running. This leads to the
following error from netlink:
"daemon creation failed: failed to configure router IP rules and routes:
unable to find ifindex for interface MAC: interface with MAC ... not
found"
that ultimately stops the daemon startup.
To address this, let's poll netlink and wait for the ENI netlink
interface to show up before going ahead with routes and rules
configuration.
Fixes: #37948
Signed-off-by: Fabio Falzoi <[email protected]>1 parent 17afaef commit 60faea1
1 file changed
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
149 | 181 | | |
150 | 182 | | |
151 | 183 | | |
| |||
189 | 221 | | |
190 | 222 | | |
191 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
192 | 236 | | |
193 | 237 | | |
194 | 238 | | |
| |||
0 commit comments