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

Netbox Synchronization failed: #5801

Closed
notscottsmith opened this issue Jun 3, 2021 · 6 comments · Fixed by #5805
Closed

Netbox Synchronization failed: #5801

notscottsmith opened this issue Jun 3, 2021 · 6 comments · Fixed by #5805
Assignees

Comments

@notscottsmith
Copy link

notscottsmith commented Jun 3, 2021

Context

  • XO origin: the sources
    • xo-web 5.82.0
    • xo-server 5.79.5

Expected behavior

Successful synchronisation to a netbox instance

Current behavior

netbox.synchronize
{
  "pools": [
    "47a37b4a-cd5c-abb2-a2e4-7d2cb7f103e3"
  ]
}
{
  "message": "not a valid IPv4 or IPv6 address: 172.16.x.x 192.168.x.x",
  "name": "Error",
  "stack": "Error: not a valid IPv4 or IPv6 address: 172.16.x.x 192.168.x.x
    at /home/node/xen-orchestra/node_modules/is-in-subnet/src/index.ts:49:13
    at isInSubnet (/home/node/xen-orchestra/node_modules/is-in-subnet/src/index.ts:16:40)
    at find (/home/node/xen-orchestra/packages/xo-server-netbox/src/index.js:496:58)
    at Array.find (<anonymous>)
    at Netbox.#synchronize (/home/node/xen-orchestra/packages/xo-server-netbox/src/index.js:496:37)
    at Api.callApiMethod (file:///home/node/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:304:20)"
}

VM is configured with 2 IPs on a single interface

@notscottsmith notscottsmith changed the title Netbox Synchronisation failed: Netbox Synchronization failed: Jun 3, 2021
@olivierlambert
Copy link
Member

That's a use case we didn't plan for :) Thanks for the report, we'll have to fix that.

@pdonias
Copy link
Member

pdonias commented Jun 3, 2021

Having 2 IPs on a single interface shouldn't be an issue, but there, it looks like there are 2 IPs in the same IP field.

@notscottsmith I guess you obfuscated the IPs yourself? Can you confirm that there were actually 2 IPs as shown in the error message by running this on your server:

xe vm-list params=networks uuid=<VM UUID>

Thanks!

@notscottsmith
Copy link
Author

Having 2 IPs on a single interface shouldn't be an issue, but there, it looks like there are 2 IPs in the same IP field.

@notscottsmith I guess you obfuscated the IPs yourself? Can you confirm that there were actually 2 IPs as shown in the error message by running this on your server:

xe vm-list params=networks uuid=<VM UUID>

Thanks!

Can definitely confirm it has two. From Xen-Orchestra:
image

From console:
image

We have several VMs which this issue would apply to and they all display this way.

@olivierlambert
Copy link
Member

olivierlambert commented Jun 4, 2021

That seems to be the way old tools are displaying IPs. On recent tools, if you have multiple IPs on the same VIF, it will be, for example: 0/ipv4/1: 10.1.1.1; 0/ipv4/0: 192.168.1.1

Please use more recent tools in your guest, that might fix the situation. I don't know the difficulty to be compatible with old ones on our side.

@notscottsmith
Copy link
Author

We have a mix of 7.6 and 8.x XCP servers but I'd put money on the tools not being updated.

@pdonias
Copy link
Member

pdonias commented Jun 4, 2021

I don't know the difficulty to be compatible with old ones on our side.

It's an easy change, we already tried to be compatible but probably missed that space-delimited case.

@notscottsmith We'll handle it in XO but you may still want to update your guest tools to avoid any further issues :)

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 a pull request may close this issue.

3 participants