Skip to content
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

NETOBSERV-889: fix too many colons in address error #98

Merged
merged 1 commit into from Feb 17, 2023
Merged

NETOBSERV-889: fix too many colons in address error #98

merged 1 commit into from Feb 17, 2023

Conversation

msherif1234
Copy link
Contributor

@msherif1234 msherif1234 commented Feb 13, 2023

This PR fixed two issues

1- when hostIP is IPv6 address we endup with following error when gRPC try to connect

collector="2604:1380:4642:7e00::5b:2055" component=exporter/GRPCProto error="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp: address 2604:1380:4642:7e00::5b:2055: too many colons in address\""

for IPv6 we need to use [2604:1380:4642:7e00::5b]:2055 format.

2- on single stack ipv6 cluster with IPType=="any" , ipv4 DNS address was incorrectly used which prevented ebpf agent to come up and the pod stay in crashloop with this error:-

time="2023-02-16T21:06:17Z" level=fatal msg="can't instantiate NetObserv eBPF Agent" error="acquiring Agent IP: can't establish an external connection dial udp 8.8.8.8:80: connect: network is unreachable"

Signed-off-by: msherif1234 mmahmoud@redhat.com

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Feb 13, 2023

@msherif1234: This pull request references NETOBSERV-889 which is a valid jira issue.

In response to this:

Signed-off-by: msherif1234 mmahmoud@redhat.com

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Feb 13, 2023

@msherif1234: This pull request references NETOBSERV-889 which is a valid jira issue.

In response to this:

when hostIP is IPv6 address we endup with following error when gRPC try to connect

collector="2604:1380:4642:7e00::5b:2055" component=exporter/GRPCProto error="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp: address 2604:1380:4642:7e00::5b:2055: too many colons in address\""

for IPv6 we need to use [2604:1380:4642:7e00::5b]:2055 format.
Signed-off-by: msherif1234 mmahmoud@redhat.com

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2023

Codecov Report

Merging #98 (726dc4a) into main (6a074bd) will increase coverage by 0.39%.
The diff coverage is 60.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
+ Coverage   41.61%   42.00%   +0.39%     
==========================================
  Files          29       30       +1     
  Lines        1992     2002      +10     
==========================================
+ Hits          829      841      +12     
+ Misses       1125     1123       -2     
  Partials       38       38              
Flag Coverage Δ
unittests 42.00% <60.00%> (+0.39%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/agent/agent.go 39.78% <0.00%> (+0.71%) ⬆️
pkg/exporter/ipfix.go 0.00% <0.00%> (ø)
pkg/agent/ip.go 71.00% <100.00%> (+0.59%) ⬆️
pkg/exporter/grpc_proto.go 73.91% <100.00%> (+2.48%) ⬆️
pkg/grpc/client.go 68.75% <100.00%> (+2.08%) ⬆️
pkg/utils/utils.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@msherif1234
Copy link
Contributor Author

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Feb 13, 2023
@github-actions
Copy link

New image: ["quay.io/netobserv/netobserv-ebpf-agent:20a990e"]. It will expire after two weeks.

@Amoghrd
Copy link

Amoghrd commented Feb 13, 2023

@msherif1234 Tried updating the CSV with this eBPF image, the eBPF pods went to CrashLoopBackoff with error
time="2023-02-13T21:23:28Z" level=info msg="starting NetObserv eBPF Agent" time="2023-02-13T21:23:28Z" level=info msg="initializing Flows agent" component=agent.Flows time="2023-02-13T21:23:28Z" level=fatal msg="can't instantiate NetObserv eBPF Agent" error="acquiring Agent IP: can't establish an external connection dial udp 8.8.8.8:80: connect: network is unreachable"

pkg/exporter/grpc_proto.go Outdated Show resolved Hide resolved
pkg/grpc/client.go Outdated Show resolved Hide resolved
pkg/agent/agent.go Show resolved Hide resolved
pkg/exporter/grpc_proto_test.go Show resolved Hide resolved
@Amoghrd
Copy link

Amoghrd commented Feb 13, 2023

I get the same above error with source install too; after updating the eBPF image in deployments

@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Feb 14, 2023
@msherif1234
Copy link
Contributor Author

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Feb 14, 2023
@github-actions
Copy link

New image: ["quay.io/netobserv/netobserv-ebpf-agent:0816e2c"]. It will expire after two weeks.

@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Feb 14, 2023
@msherif1234
Copy link
Contributor Author

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Feb 14, 2023
@github-actions
Copy link

New image: ["quay.io/netobserv/netobserv-ebpf-agent:f073254"]. It will expire after two weeks.

jotak
jotak previously approved these changes Feb 14, 2023
Copy link
Member

@jotak jotak left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot removed the lgtm label Feb 14, 2023
@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Feb 14, 2023
@msherif1234
Copy link
Contributor Author

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Feb 14, 2023
@github-actions
Copy link

New image: ["quay.io/netobserv/netobserv-ebpf-agent:ceaa4ca"]. It will expire after two weeks.

stleerh
stleerh previously approved these changes Feb 14, 2023
pkg/utils/utils.go Show resolved Hide resolved
@memodi
Copy link
Contributor

memodi commented Feb 16, 2023

@msherif1234 Tried updating the CSV with this eBPF image, the eBPF pods went to CrashLoopBackoff with error time="2023-02-13T21:23:28Z" level=info msg="starting NetObserv eBPF Agent" time="2023-02-13T21:23:28Z" level=info msg="initializing Flows agent" component=agent.Flows time="2023-02-13T21:23:28Z" level=fatal msg="can't instantiate NetObserv eBPF Agent" error="acquiring Agent IP: can't establish an external connection dial udp 8.8.8.8:80: connect: network is unreachable"

tried this more and discussed error with @msherif1234 , our initial understanding of not being able to pull image: quay.io/netobserv/netobserv-ebpf-agent:ceaa4ca from quay was incorrect, it was able to pull Image and landing in above runtime error. This is likely a bug with new code.

@openshift-ci openshift-ci bot removed the lgtm label Feb 16, 2023
@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Feb 16, 2023
@msherif1234
Copy link
Contributor Author

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Feb 16, 2023
@github-actions
Copy link

New image: ["quay.io/netobserv/netobserv-ebpf-agent:a8e0892"]. It will expire after two weeks.

Signed-off-by: msherif1234 <mmahmoud@redhat.com>
@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Feb 16, 2023
@msherif1234
Copy link
Contributor Author

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Feb 16, 2023
@github-actions
Copy link

New image: ["quay.io/netobserv/netobserv-ebpf-agent:3652daa"]. It will expire after two weeks.

@memodi
Copy link
Contributor

memodi commented Feb 17, 2023

/qe-approved
Verified fix works for both IPv6 single stack and IPv4 clusters as well, thanks!

@memodi
Copy link
Contributor

memodi commented Feb 17, 2023

@jotak - is something wrong with labels? I don't see qe-approved label being added.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Feb 17, 2023

@msherif1234: This pull request references NETOBSERV-889 which is a valid jira issue.

In response to this:

This PR fixed two issues

1- when hostIP is IPv6 address we endup with following error when gRPC try to connect

collector="2604:1380:4642:7e00::5b:2055" component=exporter/GRPCProto error="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp: address 2604:1380:4642:7e00::5b:2055: too many colons in address\""

for IPv6 we need to use [2604:1380:4642:7e00::5b]:2055 format.

2- on single stack ipv6 cluster with IPType=="any" , ipv4 DNS address was incorrectly used which prevented ebpf agent to come up and the pod stay in crashloop with this error:-

time="2023-02-16T21:06:17Z" level=fatal msg="can't instantiate NetObserv eBPF Agent" error="acquiring Agent IP: can't establish an external connection dial udp 8.8.8.8:80: connect: network is unreachable"

Signed-off-by: msherif1234 mmahmoud@redhat.com

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor

@OlivierCazade OlivierCazade left a comment

Choose a reason for hiding this comment

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

LGTM

@jotak
Copy link
Member

jotak commented Feb 17, 2023

thanks @msherif1234 !
/approve

@openshift-ci
Copy link

openshift-ci bot commented Feb 17, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jotak

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 66d4247 into netobserv:main Feb 17, 2023
shach33 pushed a commit to praveingk/netobserv-ebpf-agent that referenced this pull request Apr 6, 2023
Signed-off-by: msherif1234 <mmahmoud@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved jira/valid-reference lgtm ok-to-test To set manually when a PR is safe to test. Triggers image build on PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants