Skip to content

Conversation

@agners
Copy link
Member

@agners agners commented Jul 16, 2025

Proposed change

Enable IPv6 by default for new Supervisor installations. Let's also make the enable_ipv6 attribute nullable, so we can distinguish between "not set" and "set to false".

Since enabling IPv6 requires (re)creating the hassio network, for now only new installations are migrated. If you want to enable IPv6 for containers (add-ons) use ha docker options --enable-ipv6=true.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to the supervisor)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to cli pull request:
  • Link to client library pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Ruff (ruff format supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints or add-on configuration are added/changed:

agners added 3 commits July 16, 2025 13:01
Enable IPv6 by default for new Supervisor installations. Let's also
make the `enable_ipv6` attribute nullable, so we can distinguish
between "not set" and "set to false".
@agners agners added the new-feature A new feature label Jul 16, 2025
@agners
Copy link
Member Author

agners commented Jul 16, 2025

/cc @davidrapan

Copy link
Contributor

@mdegat01 mdegat01 left a comment

Choose a reason for hiding this comment

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

It looks good other then that one log. I think a host reboot is required here. If so we should say "host reboot" rather then "system restart" and pop that repair. If its something else lets clarify and see if we can either help the user more or do more for them.

@agners agners requested a review from Copilot July 29, 2025 11:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables IPv6 by default for new Supervisor installations while maintaining backward compatibility for existing setups. The change makes the enable_ipv6 attribute nullable to distinguish between "not set" (new installations get IPv6 enabled) and "explicitly set to false" (existing configurations are preserved).

  • Makes enable_ipv6 nullable throughout the codebase to support tri-state logic
  • Sets IPv6 as enabled by default for new installations when no explicit configuration exists
  • Adds reboot notification when IPv6 settings are changed via API

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
supervisor/docker/network.py Core logic to enable IPv6 by default for new networks and handle nullable enable_ipv6
supervisor/docker/manager.py Updates property types to support nullable enable_ipv6 configuration
supervisor/validate.py Schema changes to make enable_ipv6 nullable with None default
supervisor/api/docker.py API endpoint updates for nullable IPv6 and reboot notification
tests/docker/test_network.py Test coverage for IPv6 default behavior on new installations
tests/api/test_docker.py Test assertion update to reflect new None default
Comments suppressed due to low confidence (1)

tests/docker/test_network.py:137

  • [nitpick] The third parameter True for MockNetwork constructor should be named explicitly for clarity, e.g., enableIPv6=True.
            return_value=MockNetwork(False, None, True),

@agners agners merged commit 7dcf5ba into main Jul 29, 2025
23 checks passed
@agners agners deleted the enable-ipv6-for-new-installations branch July 29, 2025 13:59
@github-actions github-actions bot locked and limited conversation to collaborators Jul 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants