apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.06k stars 1.1k forks source link

Option to restrict duplicate instance names in same network domain, VPC etc #9775

Open rajujith opened 2 weeks ago

rajujith commented 2 weeks ago
ISSUE TYPE
COMPONENT NAME
API,UI 
CLOUDSTACK VERSION
4.19.1.1
SUMMARY

When creating multiple VPCs in a project it gets created with a network domain like this: cs. This means all VPCs in the same project gets the same network domain. Creating instances with duplicate names in a project with the same FQDN is currently possible. This can create issues when registering these instances to FreeIPA etc.

Similarly, duplicate hostnames within a VPC can be created if the instances are in different tiers.

It would be nice to have an option to restrict duplicate instance names in a project, network domain and VPC.

DaanHoogland commented 2 weeks ago

@rajujith I can think of two solutions

rajujith commented 2 weeks ago

@rajujith I can think of two solutions

* automatic resolution by adding a counter or adding vpc-id

* making the field obligatory and/or throw an error on conflict and let the user add the name
  not sure what is preferable, but I think user friendliness may suffer in both approaches.

@DaanHoogland these should do, there is one more option. A global setting to restrict duplicate instance names per network domain.

kiranchavala commented 1 week ago

@rajujith can this PR solve the issue to some extent #9780

rajujith commented 1 week ago

@rajujith can this PR solve the issue to some extent #9780

Doesn't look like it @kiranchavala .