Skip to content

fix(add-iptag): merge live IPv4 addresses for running LXCs #16765

Description

@phillf

✅ Have you read and understood the above guidelines?

yes

🔎 Did you run the script with verbose mode enabled?

No (this issue will likely be closed automatically)

📜 What is the name of the script you are using?

add-iptag

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/add-iptag.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 13

🧱 Is this Proxmox host running arm64?

No

📈 Which Proxmox version are you on?

pve-manager/9.2.11/f6997e698c7933ea (running kernel: 7.0.14-8-pve)

📝 Provide a clear and concise description of the issue.

Fixes inconsistent IPv4 tag discovery for LXC containers with a statically configured net0 address.

Previously, discovery could find the primary interface address before reaching the direct pct exec probe. Because that probe ran only when no prior address was found, additional in-container interfaces—such as Docker bridges and Tailscale—were omitted from IP tags.

The direct pct exec <vmid> -- ip -4 addr show result is now merged for running LXCs. Existing normalization de-duplicates addresses, and the existing composite cache key, lxc_${vmid}, is used to determine whether an LXC is running.

🔄 Steps to reproduce the issue.

  • bash -n tools/pve/add-iptag.sh
  • git diff --check
  • Tested in production with static-IP LXCs running Docker and Tailscale
  • Confirmed Docker bridge and Tailscale IPv4 tags are added
  • Confirmed existing non-IP tags are preserved
  • Confirmed duplicate primary-interface addresses are removed by existing normalization

❌ Paste the full error output (if available).

The error is the incomplete tagging of IP addresses.

🖼️ Additional context (optional).

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions