Skip to content

Conversation

bimmlerd
Copy link
Member

@bimmlerd bimmlerd commented May 6, 2024

This moves the resolving of the DirectRoutingDevice into its own component allowing us to finally remove the DeviceManager shim.

@bimmlerd bimmlerd added area/daemon Impacts operation of the Cilium daemon. release-note/misc This PR makes changes that have no direct user impact. area/agent Cilium agent related. area/modularization Relates to code modularization and maintenance. labels May 6, 2024
@bimmlerd bimmlerd force-pushed the pr/bimmlerd/isolate-direct-routing-device-functionality branch from bf6917e to 2970dc9 Compare May 6, 2024 12:46
@bimmlerd bimmlerd force-pushed the pr/bimmlerd/isolate-direct-routing-device-functionality branch 3 times, most recently from 9da4168 to baf7736 Compare May 30, 2024 12:41
@bimmlerd
Copy link
Member Author

/test

@bimmlerd bimmlerd force-pushed the pr/bimmlerd/isolate-direct-routing-device-functionality branch from baf7736 to b072294 Compare May 31, 2024 14:40
@bimmlerd
Copy link
Member Author

/test

@bimmlerd bimmlerd force-pushed the pr/bimmlerd/isolate-direct-routing-device-functionality branch from b072294 to 4a44ed6 Compare June 4, 2024 13:47
@bimmlerd
Copy link
Member Author

bimmlerd commented Jun 5, 2024

/ci-runtime

@bimmlerd bimmlerd force-pushed the pr/bimmlerd/isolate-direct-routing-device-functionality branch from 4a44ed6 to 2e8bb85 Compare June 5, 2024 07:28
@bimmlerd
Copy link
Member Author

bimmlerd commented Jun 5, 2024

/test

@bimmlerd bimmlerd force-pushed the pr/bimmlerd/isolate-direct-routing-device-functionality branch from 2e8bb85 to 7bdd6a9 Compare June 5, 2024 15:33
@bimmlerd
Copy link
Member Author

bimmlerd commented Jun 6, 2024

/test

@joestringer joestringer mentioned this pull request Jun 7, 2024
@dylandreimerink dylandreimerink force-pushed the pr/bimmlerd/isolate-direct-routing-device-functionality branch 2 times, most recently from 3986d9a to b9d1b40 Compare June 12, 2024 14:15
@dylandreimerink
Copy link
Member

/test

@joamaki joamaki force-pushed the pr/bimmlerd/isolate-direct-routing-device-functionality branch 2 times, most recently from 7e2da1a to 9ab8810 Compare June 14, 2024 14:26
@joamaki
Copy link
Contributor

joamaki commented Jun 14, 2024

/test

@joamaki joamaki force-pushed the pr/bimmlerd/isolate-direct-routing-device-functionality branch 4 times, most recently from 2efccbf to e0b52cc Compare June 17, 2024 08:28
Copy link
Member

@dylandreimerink dylandreimerink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joamaki joamaki force-pushed the pr/bimmlerd/isolate-direct-routing-device-functionality branch from 1f9358d to 57d03bb Compare July 3, 2024 12:27
@joamaki
Copy link
Contributor

joamaki commented Jul 5, 2024

/test

@joamaki joamaki enabled auto-merge July 5, 2024 12:50
@joamaki joamaki force-pushed the pr/bimmlerd/isolate-direct-routing-device-functionality branch from 57d03bb to 197c776 Compare July 9, 2024 16:40
@joamaki
Copy link
Contributor

joamaki commented Jul 9, 2024

/test

@joamaki joamaki force-pushed the pr/bimmlerd/isolate-direct-routing-device-functionality branch from 197c776 to 25cc179 Compare July 10, 2024 15:23
@joamaki
Copy link
Contributor

joamaki commented Jul 10, 2024

/test

bimmlerd and others added 5 commits July 17, 2024 13:40
We explicitly disallow enabling IPv6 NDP without setting an IPv6
multicast device in config validation, hence this code was unreachable.

Signed-off-by: David Bimmler <david.bimmler@isovalent.com>
Signed-off-by: David Bimmler <david.bimmler@isovalent.com>
This cell contains the logic to choose the direct routing device, based
on the users configuration or falling back to "autodetecting" the right
device.

Signed-off-by: David Bimmler <david.bimmler@isovalent.com>
Removes the device manager shim as the only functionality that remained
was choosing the direct routing device. That logic is now contained in
the direct routing device cell, which is used treewide to find the
device to use.

Adds the direct routing device to the LocalNodeConfiguration used in the
loader and related subsystems.

Signed-off-by: David Bimmler <david.bimmler@isovalent.com>
Signed-off-by: Jussi Maki <jussi@isovalent.com>
The (default) alloc range initialization was moved from the local_node_sync.go
to later in the startup process. This means that node.LocalNode can be observed
with empty alloc ranges instead of the "default ranges".

As the "default range" is not really useful it's better to instead wait for
the proper alloc ranges anyway. Complication here is that in ClusterPool IPAM
the alloc ranges are set by the operator into CiliumNode CRD, but the agent needs
to first create it. Thus it's not easy to move this logic into local_node_sync.go
yet.

Instead, let's do the next best thing and just wait for the alloc ranges to
be set in the iptables reconciler.

Signed-off-by: Jussi Maki <jussi@isovalent.com>
@joamaki joamaki force-pushed the pr/bimmlerd/isolate-direct-routing-device-functionality branch from 25cc179 to dd6d4d5 Compare July 17, 2024 11:42
@joamaki
Copy link
Contributor

joamaki commented Jul 17, 2024

/test

@joamaki joamaki added this pull request to the merge queue Jul 17, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jul 17, 2024
Merged via the queue into cilium:main with commit 7a097b5 Jul 17, 2024
64 of 65 checks passed
@bimmlerd bimmlerd deleted the pr/bimmlerd/isolate-direct-routing-device-functionality branch February 20, 2025 10:18
pippolo84 added a commit to pippolo84/cilium that referenced this pull request Jun 20, 2025
This reverts commit 2fc52eb.

The commit was added with the intent to have an uniform behavior when
Cilium is started on a single stack cluster with ipv6 support enabled,
despite the KPR setting being enabled or disabled. Specifically, the
added check was stopping the agent startup in case of a missing IPv6
address on the node, even when KPR was disabled.

However, the IPv6 detection for NodePort, responsible for the startup
error in case of missing IPv6 address with KPR enabled, has been removed
in cilium#29033. Therefore, there is no
reason anymore to stop the agent at startup when the IPv6 support is
enabled and the node is missing an IPv6 address.  Moreover, the commit
above led to some unintended consequences in environments where KPR is
disabled and the IPv6 address is set on the node after the Cilium agent
is started (see cilium#34861).

The same unintended consequence became more frequent after
cilium#32381, where we moved later in the
daemon startup process the first call to SetDefaultPrefix. That
function, among other things, was in charge of setting up a temporary
IPv6 Unique Local Address in case the node does not have one yet. Since
now the agent does this later (specifically, while configuring IPAM),
the check introduced in 2fc52eb sees the IPv6 node address as nil and
stops the agent.

Therefore, revert the check to avoid the unintended regressions.

Related: cilium#28953
Related: cilium#34861
Related: cilium#29033
Related: cilium#32381
Fixes: cilium#37817

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84 added a commit to pippolo84/cilium that referenced this pull request Jun 23, 2025
This reverts commit 2fc52eb.

The commit was added with the intent to have an uniform behavior when
Cilium is started on a single stack cluster with ipv6 support enabled,
despite the KPR setting being enabled or disabled. Specifically, the
added check was stopping the agent startup in case of a missing IPv6
address on the node, even when KPR was disabled.

However, the IPv6 detection for NodePort, responsible for the startup
error in case of missing IPv6 address with KPR enabled, has been removed
in cilium#29033. Therefore, there is no
reason anymore to stop the agent at startup when the IPv6 support is
enabled and the node is missing an IPv6 address.  Moreover, the commit
above led to some unintended consequences in environments where KPR is
disabled and the IPv6 address is set on the node after the Cilium agent
is started (see cilium#34861).

The same unintended consequence became more frequent after
cilium#32381, where we moved later in the
daemon startup process the first call to SetDefaultPrefix. That
function, among other things, was in charge of setting up a temporary
IPv6 Unique Local Address in case the node does not have one yet. Since
now the agent does this later (specifically, while configuring IPAM),
the check introduced in 2fc52eb sees the IPv6 node address as nil and
stops the agent.

Therefore, revert the check to avoid the unintended regressions.

Related: cilium#28953
Related: cilium#34861
Related: cilium#29033
Related: cilium#32381
Fixes: cilium#37817

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
github-merge-queue bot pushed a commit that referenced this pull request Jun 23, 2025
This reverts commit 2fc52eb.

The commit was added with the intent to have an uniform behavior when
Cilium is started on a single stack cluster with ipv6 support enabled,
despite the KPR setting being enabled or disabled. Specifically, the
added check was stopping the agent startup in case of a missing IPv6
address on the node, even when KPR was disabled.

However, the IPv6 detection for NodePort, responsible for the startup
error in case of missing IPv6 address with KPR enabled, has been removed
in #29033. Therefore, there is no
reason anymore to stop the agent at startup when the IPv6 support is
enabled and the node is missing an IPv6 address.  Moreover, the commit
above led to some unintended consequences in environments where KPR is
disabled and the IPv6 address is set on the node after the Cilium agent
is started (see #34861).

The same unintended consequence became more frequent after
#32381, where we moved later in the
daemon startup process the first call to SetDefaultPrefix. That
function, among other things, was in charge of setting up a temporary
IPv6 Unique Local Address in case the node does not have one yet. Since
now the agent does this later (specifically, while configuring IPAM),
the check introduced in 2fc52eb sees the IPv6 node address as nil and
stops the agent.

Therefore, revert the check to avoid the unintended regressions.

Related: #28953
Related: #34861
Related: #29033
Related: #32381
Fixes: #37817

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
github-merge-queue bot pushed a commit that referenced this pull request Jun 23, 2025
This reverts commit 2fc52eb.

The commit was added with the intent to have an uniform behavior when
Cilium is started on a single stack cluster with ipv6 support enabled,
despite the KPR setting being enabled or disabled. Specifically, the
added check was stopping the agent startup in case of a missing IPv6
address on the node, even when KPR was disabled.

However, the IPv6 detection for NodePort, responsible for the startup
error in case of missing IPv6 address with KPR enabled, has been removed
in #29033. Therefore, there is no
reason anymore to stop the agent at startup when the IPv6 support is
enabled and the node is missing an IPv6 address.  Moreover, the commit
above led to some unintended consequences in environments where KPR is
disabled and the IPv6 address is set on the node after the Cilium agent
is started (see #34861).

The same unintended consequence became more frequent after
#32381, where we moved later in the
daemon startup process the first call to SetDefaultPrefix. That
function, among other things, was in charge of setting up a temporary
IPv6 Unique Local Address in case the node does not have one yet. Since
now the agent does this later (specifically, while configuring IPAM),
the check introduced in 2fc52eb sees the IPv6 node address as nil and
stops the agent.

Therefore, revert the check to avoid the unintended regressions.

Related: #28953
Related: #34861
Related: #29033
Related: #32381
Fixes: #37817

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
viktor-kurchenko pushed a commit that referenced this pull request Jun 25, 2025
[ upstream commit dfd8f93 ]

This reverts commit 2fc52eb.

The commit was added with the intent to have an uniform behavior when
Cilium is started on a single stack cluster with ipv6 support enabled,
despite the KPR setting being enabled or disabled. Specifically, the
added check was stopping the agent startup in case of a missing IPv6
address on the node, even when KPR was disabled.

However, the IPv6 detection for NodePort, responsible for the startup
error in case of missing IPv6 address with KPR enabled, has been removed
in #29033. Therefore, there is no
reason anymore to stop the agent at startup when the IPv6 support is
enabled and the node is missing an IPv6 address.  Moreover, the commit
above led to some unintended consequences in environments where KPR is
disabled and the IPv6 address is set on the node after the Cilium agent
is started (see #34861).

The same unintended consequence became more frequent after
#32381, where we moved later in the
daemon startup process the first call to SetDefaultPrefix. That
function, among other things, was in charge of setting up a temporary
IPv6 Unique Local Address in case the node does not have one yet. Since
now the agent does this later (specifically, while configuring IPAM),
the check introduced in 2fc52eb sees the IPv6 node address as nil and
stops the agent.

Therefore, revert the check to avoid the unintended regressions.

Related: #28953
Related: #34861
Related: #29033
Related: #32381
Fixes: #37817

[ Backporter's notes:
  - resolved conflict in: daemon/k8s/init.go
]

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
Signed-off-by: viktor-kurchenko <viktor.kurchenko@isovalent.com>
wanglei4687 pushed a commit to wanglei4687/cilium that referenced this pull request Jun 26, 2025
This reverts commit 2fc52eb.

The commit was added with the intent to have an uniform behavior when
Cilium is started on a single stack cluster with ipv6 support enabled,
despite the KPR setting being enabled or disabled. Specifically, the
added check was stopping the agent startup in case of a missing IPv6
address on the node, even when KPR was disabled.

However, the IPv6 detection for NodePort, responsible for the startup
error in case of missing IPv6 address with KPR enabled, has been removed
in cilium#29033. Therefore, there is no
reason anymore to stop the agent at startup when the IPv6 support is
enabled and the node is missing an IPv6 address.  Moreover, the commit
above led to some unintended consequences in environments where KPR is
disabled and the IPv6 address is set on the node after the Cilium agent
is started (see cilium#34861).

The same unintended consequence became more frequent after
cilium#32381, where we moved later in the
daemon startup process the first call to SetDefaultPrefix. That
function, among other things, was in charge of setting up a temporary
IPv6 Unique Local Address in case the node does not have one yet. Since
now the agent does this later (specifically, while configuring IPAM),
the check introduced in 2fc52eb sees the IPv6 node address as nil and
stops the agent.

Therefore, revert the check to avoid the unintended regressions.

Related: cilium#28953
Related: cilium#34861
Related: cilium#29033
Related: cilium#32381
Fixes: cilium#37817

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
viktor-kurchenko pushed a commit that referenced this pull request Jun 26, 2025
[ upstream commit dfd8f93 ]

This reverts commit 2fc52eb.

The commit was added with the intent to have an uniform behavior when
Cilium is started on a single stack cluster with ipv6 support enabled,
despite the KPR setting being enabled or disabled. Specifically, the
added check was stopping the agent startup in case of a missing IPv6
address on the node, even when KPR was disabled.

However, the IPv6 detection for NodePort, responsible for the startup
error in case of missing IPv6 address with KPR enabled, has been removed
in #29033. Therefore, there is no
reason anymore to stop the agent at startup when the IPv6 support is
enabled and the node is missing an IPv6 address.  Moreover, the commit
above led to some unintended consequences in environments where KPR is
disabled and the IPv6 address is set on the node after the Cilium agent
is started (see #34861).

The same unintended consequence became more frequent after
#32381, where we moved later in the
daemon startup process the first call to SetDefaultPrefix. That
function, among other things, was in charge of setting up a temporary
IPv6 Unique Local Address in case the node does not have one yet. Since
now the agent does this later (specifically, while configuring IPAM),
the check introduced in 2fc52eb sees the IPv6 node address as nil and
stops the agent.

Therefore, revert the check to avoid the unintended regressions.

Related: #28953
Related: #34861
Related: #29033
Related: #32381
Fixes: #37817

[ Backporter's notes:
  - resolved conflict in: daemon/k8s/init.go
]

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
Signed-off-by: viktor-kurchenko <viktor.kurchenko@isovalent.com>
github-merge-queue bot pushed a commit that referenced this pull request Jun 26, 2025
[ upstream commit dfd8f93 ]

This reverts commit 2fc52eb.

The commit was added with the intent to have an uniform behavior when
Cilium is started on a single stack cluster with ipv6 support enabled,
despite the KPR setting being enabled or disabled. Specifically, the
added check was stopping the agent startup in case of a missing IPv6
address on the node, even when KPR was disabled.

However, the IPv6 detection for NodePort, responsible for the startup
error in case of missing IPv6 address with KPR enabled, has been removed
in #29033. Therefore, there is no
reason anymore to stop the agent at startup when the IPv6 support is
enabled and the node is missing an IPv6 address.  Moreover, the commit
above led to some unintended consequences in environments where KPR is
disabled and the IPv6 address is set on the node after the Cilium agent
is started (see #34861).

The same unintended consequence became more frequent after
#32381, where we moved later in the
daemon startup process the first call to SetDefaultPrefix. That
function, among other things, was in charge of setting up a temporary
IPv6 Unique Local Address in case the node does not have one yet. Since
now the agent does this later (specifically, while configuring IPAM),
the check introduced in 2fc52eb sees the IPv6 node address as nil and
stops the agent.

Therefore, revert the check to avoid the unintended regressions.

Related: #28953
Related: #34861
Related: #29033
Related: #32381
Fixes: #37817

[ Backporter's notes:
  - resolved conflict in: daemon/k8s/init.go
]

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
Signed-off-by: viktor-kurchenko <viktor.kurchenko@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/agent Cilium agent related. area/daemon Impacts operation of the Cilium daemon. area/modularization Relates to code modularization and maintenance. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants