XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Netbox plugin: XO tries to create an already existing IP address

    Scheduled Pinned Locked Moved Advanced features
    2 Posts 2 Posters 40 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      r10n_fumo
      last edited by

      Hello,

      I believe there is an issue with Netbox synchronization plugin. In short, Xen Orchestra does not appear to check if an address of a newly-created VM is already in Netbox and blindly tries to create it. This makes the whole IP address creation step fail for all other VMs even during subsequent synchronizations.

      Steps to reproduce the issue:

      1. Create an address in Netbox
      2. Create a VM in XO with the address from the previous step
      3. Run synchronization
      4. You will see a "400 Bad Request" error with a message stating that "Duplicate IP address found in global table"
        Xen Orchestra creates your VM with an interface in Netbox, but fails to create and assign the IP address.

      I think there are two ways to fix the issue: You could either make XO "adopt" the address when it has to be assigned to a VM, or you could delete the address and create it again. I Think the latter makes more sense as that would strip away all attributes (i.e. tags) which could no longer be correct after the address is assigned to a virtual machine.

      I am using a source-built version of XO.

      Netbox version: 4.2.7
      Xen Orchestra commit: 3c54363

      Thanks

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Hi,

        It was never meant to be a 2 ways synchronization plugin. Making it 2 ways considerably raise the complexity of such plugin (because we would need to make configuration for decision on when to take it one way and the other, and each use case is different).

        I would say: you shouldn't have any IP that's already in Netbox from other source in the IP range that's used for your VMs.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post