close
Skip to content

[7.2] Fix Docker fixed MAC assignment#2623

Merged
limetech merged 2 commits into7.2from
codex/7.2-docker-mac-assignment
Apr 24, 2026
Merged

[7.2] Fix Docker fixed MAC assignment#2623
limetech merged 2 commits into7.2from
codex/7.2-docker-mac-assignment

Conversation

@elibosley
Copy link
Copy Markdown
Member

Summary

  • Backports the Docker network restore helper work from master so 7.2 has the same reconnect path required by fixed MAC assignment.
  • Backports the fixed MAC assignment flow from master, including the template MyMAC field, legacy --mac-address migration, endpoint-aware Docker network arguments, and MAC-aware network reconnects.

Why

7.2 was missing the network restore helper that the master MAC assignment fix builds on. Bringing that prerequisite over keeps the 7.2 behavior aligned with master instead of carrying a one-off adaptation.

Validation

  • bash -n etc/rc.d/rc.docker
  • php -l emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
  • php -l emhttp/plugins/dynamix.docker.manager/include/Helpers.php
  • git diff --check origin/7.2..HEAD

- Purpose: backport the Docker network reconnect helper work required by the fixed MAC assignment flow.
- Before: 7.2 rebuilt custom Docker networks with inline reconnect logic that did not preserve all endpoint details consistently.
- Problem: the later fixed MAC assignment fix depends on the helper path that restores primary and secondary network attachments predictably.
- Change: introduce the network restore helper flow from master before applying the MAC endpoint assignment fix.
- Implementation: collect restore entries with network, container, IP, and MAC data, reconnect them through a shared helper, and rebuild primary custom-network containers only when needed.
- Purpose: backport the Docker fixed MAC assignment fix from master to 7.2.
- Before: fixed MACs were handled through legacy container-level extra parameters or were lost during network reconnects.
- Problem: Docker endpoint MAC assignment needs to happen on the selected network endpoint so bridge and custom networks keep the intended address.
- Change: add a fixed MAC template field, normalize and migrate legacy extra parameters, and restore MACs during Docker network reconnects.
- Implementation: store MyMAC in templates, build endpoint-aware --network arguments for container creation, and use Docker network connect API calls when restoring fixed MAC endpoints.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: dd191bec-6ab8-427c-9872-eb8a3153692b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/7.2-docker-mac-assignment

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

🔧 PR Test Plugin Available

A test plugin has been generated for this PR that includes the modified files.

Version: 2026.04.23.2102
Build: View Workflow Run

📥 Installation Instructions:

Install via Unraid Web UI:

  1. Go to Plugins → Install Plugin
  2. Copy and paste this URL:
https://preview.dl.unraid.net/pr-plugins/pr-2623/webgui-pr-2623.plg
  1. Click Install

Alternative: Direct Download

⚠️ Important Notes:

  • Testing only: This plugin is for testing PR changes
  • Backup included: Original files are automatically backed up
  • Easy removal: Files are restored when plugin is removed
  • Conflicts: Remove this plugin before installing production updates
  • Post-merge behavior: This preview stays available after merge until preview storage expires or it is manually cleaned up

📝 Modified Files:

Click to expand file list
emhttp/languages/en_US/helptext.txt
emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
emhttp/plugins/dynamix.docker.manager/include/Helpers.php

🔄 To Remove:

Navigate to Plugins → Installed Plugins and remove webgui-pr-2623, or run:

plugin remove webgui-pr-2623

🤖 This comment is automatically generated and will be updated with each new push to this PR.

@elibosley elibosley added the 7.2 label Apr 23, 2026
@elibosley elibosley marked this pull request as ready for review April 24, 2026 15:38
@limetech limetech merged commit ec18cf9 into 7.2 Apr 24, 2026
2 checks passed
@limetech limetech deleted the codex/7.2-docker-mac-assignment branch April 24, 2026 19:06
@github-actions
Copy link
Copy Markdown

🧹 PR Test Plugin Cleaned Up

The test plugin and associated files for this PR have been removed from the preview environment.


🤖 This comment is automatically generated when a PR is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants