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

rabbitmq chart does not work in IPv6 environments #6845

Closed
nicolaerosia opened this issue Jul 5, 2021 · 7 comments
Closed

rabbitmq chart does not work in IPv6 environments #6845

nicolaerosia opened this issue Jul 5, 2021 · 7 comments

Comments

@nicolaerosia
Copy link

nicolaerosia commented Jul 5, 2021

The Bitnami rabbitmq chart does not work in IPv6 environments.

More info here:
https://www.rabbitmq.com/networking.html#distribution-ipv6

I'm not sure what would be the elegant solution here, in my chart I've added a flag ipv6_only and I'm adding the following environment values based on it:

          {{- if .Values.ipv6_only }}
          - name: RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS
            value: "-kernel inetrc '/etc/rabbitmq/erl_inetrc' -proto_dist inet6_tcp"
          - name: RABBITMQ_CTL_ERL_ARGS
            value: "-proto_dist inet6_tcp"
          {{- end }}

A file has to be created as well, /etc/rabbitmq/erl_inetrc with:

{inet6, true}.

LE:
First part can be done with

extraEnvVars:
  - name: RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS
    value: "-kernel inetrc '/etc/rabbitmq/erl_inetrc' -proto_dist inet6_tcp"
  - name: RABBITMQ_CTL_ERL_ARGS
    value: "-proto_dist inet6_tcp"

not sure about the file creation though

@carrodher
Copy link
Member

You're right, at chart level, something like what you are proposing should work, users can customize the arguments.
Although if it is something we want to support in a permanent way maybe the best approach is to create some specific environment variables for IPv6.

Then, the container image (https://github.com/bitnami/bitnami-docker-rabbitmq) should be adapted to 1) use the new environment variables and 2) create/modify the /etc/rabbitmq/erl_inetrc file.

The source code of the Helm Chart and container image is publicly available on GitHub, just in case you want to contribute with this feature, the team will be happy to review the PRs and provide feedback. Otherwise, I can create an internal task to evaluate the addition of IPv6, but it is going to depend on other priorities the team have and I can't provide an ETA

@nicolaerosia
Copy link
Author

@carrodher thank you for the guidance. Please open an internal task, in the mean time, I will also try to take a look, the scripts in the container image are quite big and I need to figure out exactly where I need to add what I need.

Thanks!

@carrodher
Copy link
Member

Sure, thank you. I just created the internal task; we will update this issue when we've any new about the topic

@carrodher carrodher added the on-hold Issues or Pull Requests with this label will never be considered stale label Jul 8, 2021
@nicolaerosia
Copy link
Author

I'm using the following workaround which seems to be working fine:

    - initContainers:
      - name: ipv6-init
        image: "docker.io/busybox:1.33.1"
        imagePullPolicy: IfNotPresent
        volumeMounts:
        - name: ipv6-cfg
          mountPath: /ipv6
        command: ['sh', '-c', 'echo "{inet6, true}." > /ipv6/erl_inetrc']
    - extraVolumes:
      - name: ipv6-cfg
        emptyDir: {}
    - extraVolumeMounts:
      - name: ipv6-cfg
        mountPath: /ipv6
    - extraEnvVars:
      - name: RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS
        value: "-kernel inetrc '/ipv6/erl_inetrc' -proto_dist inet6_tcp"
      - name: RABBITMQ_CTL_ERL_ARGS
        value: "-proto_dist inet6_tcp"

@nicolaerosia nicolaerosia changed the title rabbitmq bitnami chart does not work in IPv6 environments rabbitmq chart does not work in IPv6 environments Aug 21, 2021
@carrodher
Copy link
Member

Thanks for adding this information, it can be useful for other people!

@alemorcuq
Copy link
Member

I'm closing this as the chart works with IPv6 as shown in #6845 (comment)

@carrodher carrodher removed the on-hold Issues or Pull Requests with this label will never be considered stale label Jan 31, 2022
@SarwarSaif
Copy link

I'm using the following workaround which seems to be working fine:

    - initContainers:
      - name: ipv6-init
        image: "docker.io/busybox:1.33.1"
        imagePullPolicy: IfNotPresent
        volumeMounts:
        - name: ipv6-cfg
          mountPath: /ipv6
        command: ['sh', '-c', 'echo "{inet6, true}." > /ipv6/erl_inetrc']
    - extraVolumes:
      - name: ipv6-cfg
        emptyDir: {}
    - extraVolumeMounts:
      - name: ipv6-cfg
        mountPath: /ipv6
    - extraEnvVars:
      - name: RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS
        value: "-kernel inetrc '/ipv6/erl_inetrc' -proto_dist inet6_tcp"
      - name: RABBITMQ_CTL_ERL_ARGS
        value: "-proto_dist inet6_tcp"

This solution was really helpful as the environment I am working is IPv6. Thank you!

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

4 participants