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

vmware serialnumber input sanitation #143

Open
TaLoN1x opened this issue May 6, 2024 · 6 comments
Open

vmware serialnumber input sanitation #143

TaLoN1x opened this issue May 6, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@TaLoN1x
Copy link
Contributor

TaLoN1x commented May 6, 2024

Currently virtual appliances are being created as devices, in fact there is no physical devices and thing runs on a VM instead of physical device. This creates two problems:

  • model is inaccurate and virtual appliances should be modeled as VM, not as physical device. The question remains how to detect if appliance is virtual or physical from the APIs
  • virtual appliances often have weird and long generated serial numbers, that are not accepted by netbox due to char limit

ERROR (vc-test): failed to add vmware host virtual-vsan-host.local with error: unexpected status code: 400: {"serial":["Ensure this field has no more than 50 characters."]}

I'd suggest there are 2 things:

  1. Ignore malformed serial numbers (if sn is longer than 50 characters, that in real world rarely happens, ignore it in case device reports garbage)
  2. Investigate and remodel virtual appliances as part of compute cluster. (affects all currently supported hypervisors)

I will think of the second point for some time in detils

@bl4ko
Copy link
Owner

bl4ko commented May 6, 2024

Yeah I aggree with this issue, but the problem is how netbox organizes objects. If you don't map virtual appliances that represent hosts to devices, then you lose useful netbox relation:

  • VMs can only be assigned to device (can't be to another vm), so lets say we have host that is virtualized. We add it as an vm but then we can't connect other vms running on this host with it.

@TaLoN1x
Copy link
Contributor Author

TaLoN1x commented May 6, 2024

Virtual appliances are mostly Firewalls, Virtual Storage Devices, Virtual Switches, etc. This would not affect this functionality, in some cases would even enable the use of abstraction layer for capacity planning.

@bl4ko
Copy link
Owner

bl4ko commented May 6, 2024

But you only have virtual machines object in netbox to represent virtual appliances. So would it make sense to create firewalls, virtual switches, etc. as virtual machines?

@TaLoN1x
Copy link
Contributor Author

TaLoN1x commented May 6, 2024

yes, but currently vsans, vswitches in vmware are being created as devices.

@bl4ko bl4ko added the enhancement New feature or request label May 6, 2024
@bl4ko
Copy link
Owner

bl4ko commented May 7, 2024

Would you be able to help me with this issue, e.g. provide some logic of how to implement this, and which devices to map to which virtualization appliances?

@TaLoN1x
Copy link
Contributor Author

TaLoN1x commented May 7, 2024

yes, I will dive deeper in this in a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants