-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reconnect services dynamically #9767
Comments
As I understood sidecar container inside client should handle networkservice declaration changes. |
seems during refresh connection, the changes of networkservice declaration are not handled But if I break existing connection refresh connection heals it with propagated changes. So seems during refresh connection procedure we need to check the change of networkservice declaration hope it will help |
The problem looks interesting to me. I see next solutions:
Please share your thoughts. |
Hi, Seems idea with NSC is the best. I will tell even more - in the current solution possible the next scenario:
Hope it helps. |
Hi Seems feature is not functioning as expected: What was done: After test onstall network service: connects client to nse-1 apiVersion: v1
items:
- apiVersion: networkservicemesh.io/v1
kind: NetworkService
metadata:
...
spec:
matches:
- routes:
- destination_selector:
app: nse-kernel-1
source_selector: null
payload: ETHERNET
... client: Defaulted container "app" out of: app, cmd-nsc, cmd-nsc-init (init)
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: nsm-1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UNKNOWN group default qlen 1000
link/ether 02:fe:ff:7f:5e:ab brd ff:ff:ff:ff:ff:ff
inet 172.16.1.101/32 scope global nsm-1
valid_lft forever preferred_lft forever
inet6 fe80::fe:ffff:fe7f:5eab/64 scope link
valid_lft forever preferred_lft foreve
972: eth0@if973: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether ae:7a:b7:36:bc:ae brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 192.168.0.14/32 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::ac7a:b7ff:fe36:bcae/64 scope link
valid_lft forever preferred_lft forever
nse-1:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: kernel2ker-d2c2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UNKNOWN group default qlen 1000
link/ether 02:fe:23:55:9d:52 brd ff:ff:ff:ff:ff:ff
inet 172.16.1.100/32 scope global kernel2ker-d2c2
valid_lft forever preferred_lft forever
inet6 fe80::fe:23ff:fe55:9d52/64 scope link
valid_lft forever preferred_lft forever
970: eth0@if971: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 4e:3e:c4:21:9d:1a brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 192.168.0.145/32 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::4c3e:c4ff:fe21:9d1a/64 scope link
valid_lft forever preferred_lft forever
nse-2:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
974: eth0@if975: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether da:46:1f:8a:dc:92 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 192.168.0.98/32 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::d846:1fff:fe8a:dc92/64 scope link
valid_lft forever preferred_lft forever All is OK Now edit network service so client connects to nse-2:
after ~40 sec
This is not what expected:
I think we need to react on networkservice change during connect refresh in nsc. Thanks. |
@barby1138 Hello! Many thanks for testing!
Could you please attach the logs & deployments version and create a new ticket at https://github.com/networkservicemesh/deployments-k8s ?
This option is a bit slower than the current solution. I feel we could start with checking logs and return to this option if we find some blockers in the current solution. |
Hi Denis I use resent version ref=4ee0befafb18c3ad5355c1a9ec3ae8c10e3616b6 I use modified usecase kernel2kernel with 1 nsc and 2 nse started - networkservice directs nsc to connect nse-1 initially Also from nsc logs I see connection refresh is done a bit more often than 40 sec. - actually - if I understand correctly - it happens every 2 sec. have a good time!!! |
Hmm.. It seems like it's happening because of the monitoring that we added. But it seems like something is going wrong with reselecting ednpoint and clearing the previous datapath information. So, any logs from nsc could be helpful. Anyway, I'll take a look closer when we get a release candidate ;) Thank you for testing, it's really useful. |
Thank you and good luck!!! |
@barby1138 I've created a separate ticket for this issue, because looks like it's related to our healing feature. Lets continue discuss it there #9888 |
Question
Hi - I have nsc-kernel and two nse-kernel
I have declared networkservice to connect nsc to nse-1
using selector - works fine.
Now I want to connect nsc to nse-2
I redeployed corresponding networkservice.
But no change was propogated automaticaly.
Is there a possibility to reconnect services dynamically?
The text was updated successfully, but these errors were encountered: