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

XO Netbox plugin overrides primary IP (in Netbox) on sync when first VM interface unassigned #6978

Closed
sam-agnew-pqs opened this issue Aug 11, 2023 · 1 comment · Fixed by #6989
Assignees

Comments

@sam-agnew-pqs
Copy link

  1. ⚠️ If you don't follow this template, the issue will be closed.
  2. ⚠️ If your issue can't be easily reproduced, please report it on the forum first.

Are you using XOA or XO from the sources?
XO from the sources

If XOA:

If XO from the sources:

  • Provide your commit number. If it's older than a week, we won't investigate
  • Don't forget to read this first
  • As well as follow this guide

Xen Orchestra, commit d307730

Describe the bug
A clear and concise description of what the bug is.

I have several VMs with two network interfaces. The first interface has no assigned IP address (future use). The second interface has an IP which is the "primary IP" for the VM. On sync, the Netbox sync plugin overrides my assigned "primary IP" so that there is no primary IP. This is a regression as this didn't happen with the previous version of the Netbox sync plugin.

To Reproduce
Steps to reproduce the behavior:

  1. Create VM with two interfaces
  2. Assign an IP only to second interface
  3. Sync to Netbox using the XO plugin (VM appears with both interfaces but no "primary IP")
  4. Manually set "primary IP" in Netbox to be IP address of second interface
  5. Sync again (or allow scheduled hourly sync to run)

Result will be the unassigning of the "primary IP" in Netbox which was manually set earlier

Expected behavior
A clear and concise description of what you expected to happen.

Netbox does one of two things:
either
a. Assigns the interface 2 IP as primary (since it is the only IP on the VM)
or
b. Leaves alone my manual assignment of "primary IP"

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please provide the following information):

  • Node: [e.g. 16.12.1] 18.17.0
  • hypervisor: [e.g. XCP-ng 8.2.0] 8.2.1

Additional context
Add any other context about the problem here.

@sam-agnew-pqs sam-agnew-pqs changed the title Netbox overrides primary IP on sync when first interface unassigned XO Netbox plugin overrides primary IP on sync when first interface unassigned (in Netbox) Aug 11, 2023
@sam-agnew-pqs sam-agnew-pqs changed the title XO Netbox plugin overrides primary IP on sync when first interface unassigned (in Netbox) XO Netbox plugin overrides primary IP (in Netbox) on sync when first VM interface unassigned Aug 11, 2023
@pdonias pdonias self-assigned this Aug 17, 2023
@pdonias
Copy link
Member

pdonias commented Aug 17, 2023

Thanks for the report, that makes sense! We'll fix it by assigning the IP address of the 2nd VIF, then fallback to the 3rd VIF and so on.

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

Successfully merging a pull request may close this issue.

2 participants