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

Components fail to listen on IPv6 Pod IPs #1731

Open
michaelbeaumont opened this issue Aug 30, 2024 · 5 comments
Open

Components fail to listen on IPv6 Pod IPs #1731

michaelbeaumont opened this issue Aug 30, 2024 · 5 comments

Comments

@michaelbeaumont
Copy link
Contributor

michaelbeaumont commented Aug 30, 2024

Describe the bug
Some components directly embed the Pod IP into strings like:

- "--grpc-endpoint=$(MY_POD_IP):10199"

which results in invalid URIs like 2001::1:10199 which should be [2001::1]:10199.

I don't know of a particularly clever way of solving this, unfortunately IPv4 IPs can't be parsed inside [], maybe the host needs to be passed separately from the port and parsed into IPv4/IPv6.

To Reproduce
Deploy OpenEBS on a cluster where PodIP is IPv6

Expected behavior
These components should work independent of the IP family.

OS info (please complete the following information):

  • Distro: Talos
  • 6.6.33
  • MayaStor 4.1
@tiagolobocastro
Copy link
Contributor

This is rather unfortunate :(

So probably we have 2 ways here:

  1. add wrapper of SocketAddr to support IPv4 with brackets
  2. add extra optional argument for port

CC @Abhinandan-Purkait

@Abhinandan-Purkait
Copy link
Member

@tiagolobocastro The approach 1 sounds reasonable to me.

@tiagolobocastro
Copy link
Contributor

@michaelbeaumont
Copy link
Contributor Author

I personally would slightly prefer separate arguments I think, just because seeing an IPv4 address inside [ ] might be confusing and seem like a mistake. I'd be curious how other rust-based projects solve this but I wasn't able to find anything. But of course whatever gets the job done IMO

@tiagolobocastro
Copy link
Contributor

an IPv4 address inside [ ] might be confusing and seem like a mistake

It's a fair point.
Alright, seems like this is the way to go then.

bors-openebs-mayastor bot pushed a commit that referenced this issue Oct 7, 2024
1743: feat(io-engine): listen on IPv6 unspecified by default r=dsharma-dc a=michaelbeaumont

Not able to fully build/test this because of SPDK issues yet but looks good in editor.

I removed the indirection with macros and strings, not sure if there was a particular need for that.

See #1731. This will need changes to the helm chart after being merged.

Co-authored-by: Mike Beaumont <[email protected]>
bors-openebs-mayastor bot pushed a commit to openebs/mayastor-control-plane that referenced this issue Oct 14, 2024
873: feat(ha-node): allow listening on IPv6 Pod IPs r=michaelbeaumont a=michaelbeaumont

See openebs/mayastor#1731

Co-authored-by: Mike Beaumont <[email protected]>
bors-openebs-mayastor bot pushed a commit to openebs/mayastor-control-plane that referenced this issue Oct 14, 2024
872: feat(csi-node): allow listening on IPv6 Pod IPs r=michaelbeaumont a=michaelbeaumont

See openebs/mayastor#1731

Co-authored-by: Mike Beaumont <[email protected]>
bors-openebs-mayastor bot pushed a commit to openebs/mayastor-extensions that referenced this issue Oct 18, 2024
551: feat(metrics-exporter): support IPv6 Pod IPs r=michaelbeaumont a=michaelbeaumont

## Description

Related to openebs/mayastor#1731. The metrics exporter can't connect to the gRPC client if it's an IPv6 address because there's raw string manipulation that fails in the case of IPv6, no surrounding `[]` are added.

## Motivation and Context
It allows the metrics exporter to connect to IPv6 Pod IPs.


## Regression
No

## How Has This Been Tested?
Hasn't yet.

## Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Checklist:
<!

Co-authored-by: Mike Beaumont <[email protected]>
bors-openebs-mayastor bot pushed a commit to openebs/mayastor-extensions that referenced this issue Oct 23, 2024
552: feat(helm): support IPv6 Pod IPs r=michaelbeaumont a=michaelbeaumont

Incorporates all the changes from openebs/mayastor#1731 into the chart. Depends on the PRs there.

## Description
Use the new separated IP, port args.

## Motivation and Context
See the linked issue.

## Regression
No

## How Has This Been Tested?
Hasn't yet

## Types of changes
<!

Co-authored-by: Mike Beaumont <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants