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

Synchronise with netbox fails when pool name already exists in a different cluster type #5834

Closed
bokkepoot opened this issue Jul 1, 2021 · 3 comments · Fixed by #5842
Closed
Assignees

Comments

@bokkepoot
Copy link

bokkepoot commented Jul 1, 2021

Upon importing information from XO towards netbox, the plugin test works as expected.

However, if the name of the pool is already taken (maybe if the slug is taken, unknown), for instance as a name in a different cluster type, it will fail.

Context

  • XO origin: from source
  • Versions:
    • Node: v14.17.1
    • xo-web: 5.83.0
    • xo-server: 5.79.6

Expected behavior

Failure message describing the issue

Current behavior

Error 400

netbox.synchronize
{
  "pools": [
    "96fb7dc7-f265-5a2c-8e4e-dde30d722dbf"
  ]
}
{
  "code": 400,
  "url": "https://netbox.protagio.org/api/virtualization/clusters/",
  "message": "Bad Request",
  "name": "Error",
  "stack": "Error: Bad Request
    at onResponse (/opt/xo/xo-builds/xen-orchestra-202106252210/node_modules/http-request-plus/index.js:243:21)
    at AsyncResource.runInAsyncScope (async_hooks.js:197:9)
    at cb (/opt/xo/xo-builds/xen-orchestra-202106252210/node_modules/bluebird/js/release/util.js:355:42)
    at tryCatcher (/opt/xo/xo-builds/xen-orchestra-202106252210/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/opt/xo/xo-builds/xen-orchestra-202106252210/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/opt/xo/xo-builds/xen-orchestra-202106252210/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/opt/xo/xo-builds/xen-orchestra-202106252210/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/opt/xo/xo-builds/xen-orchestra-202106252210/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/opt/xo/xo-builds/xen-orchestra-202106252210/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/opt/xo/xo-builds/xen-orchestra-202106252210/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/opt/xo/xo-builds/xen-orchestra-202106252210/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/opt/xo/xo-builds/xen-orchestra-202106252210/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:464:21)
    at process.topLevelDomainCallback (domain.js:147:15)
    at process.callbackTrampoline (internal/async_hooks.js:129:24)"
} 
@pdonias
Copy link
Member

pdonias commented Jul 12, 2021

Hi, thanks for the report. What behavior would you expect in that case? Also, do you have a use case for already having a cluster with the same name?

@bokkepoot
Copy link
Author

I don't have a use case for having the same name/slug already being used. (it was actually an obsolete config)

However, if possible, an error message with an indication what actually goes wrong would be appreciated.

@pdonias
Copy link
Member

pdonias commented Jul 12, 2021

Ok, we'll try to improve error messages on specific cases like this one. Thanks!

pdonias added a commit that referenced this issue Sep 16, 2021
Fixes #5905
See #5806
See #5834
See xoa-support#3812

- Check if `uuid` custom field has correctly been configured before
   synchronizing
- Delete VMs that don't have a UUID before synchronizing VMs to avoid conflicts
pdonias added a commit that referenced this issue Sep 16, 2021
Fixes #5905
See #5806
See #5834
See xoa-support#3812

- Check if `uuid` custom field has correctly been configured before
   synchronizing
- Delete VMs that don't have a UUID before synchronizing VMs to avoid conflicts
julien-f pushed a commit that referenced this issue Sep 22, 2021
Fixes #5905
See #5806
See #5834
See xoa-support#3812

- Check if `uuid` custom field has correctly been configured before synchronizing
- Delete VMs that don't have a UUID before synchronizing VMs to avoid conflicts
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.

2 participants