Skip to content

add API fallback for DHCP address detection#294

Merged
runleveldev merged 1 commit intomainfrom
rgingras/292-bug-importing-containers-with-dhcp-addresses-fails-with-duplicate
Apr 29, 2026
Merged

add API fallback for DHCP address detection#294
runleveldev merged 1 commit intomainfrom
rgingras/292-bug-importing-containers-with-dhcp-addresses-fails-with-duplicate

Conversation

@runleveldev
Copy link
Copy Markdown
Collaborator

Copilot Summary

This pull request improves the way MAC and IPv4 addresses are extracted for imported LXC containers, especially handling containers configured with DHCP. The changes ensure more robust parsing and retrieval of network information, including error handling for cases where the IP address must be dynamically queried.

Enhancements to network information extraction:

  • Improved extraction of the MAC address and IPv4 address from the net0 configuration, with safer parsing and null checks to prevent runtime errors.
  • Added logic to handle containers using DHCP by querying the actual IPv4 address from the running container, including error handling if the query fails.

Copy link
Copy Markdown
Collaborator

@cmyers-mieweb cmyers-mieweb left a comment

Choose a reason for hiding this comment

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

LGTM

@runleveldev runleveldev merged commit ee76e99 into main Apr 29, 2026
5 checks passed
@runleveldev runleveldev deleted the rgingras/292-bug-importing-containers-with-dhcp-addresses-fails-with-duplicate branch April 29, 2026 15:52
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

Successfully merging this pull request may close these issues.

[Bug]: Importing containers with DHCP addresses fails with duplicate

2 participants