[openstack-dev] [nova] Does not hook for validating resource name (name/hostname for instance) required?

Matt Riedemann mriedemos at gmail.com
Fri Mar 16 15:04:10 UTC 2018


On 3/16/2018 1:22 AM, 양유석 wrote:
> Our company operates Openstack clusters and we had legacy DNS system, 
> and it needs to check hostname check more strictly including RFC952. 
> Also our operators demands for unique hostname in a region (we do not 
> have tenant network yet using l3 only network). So for those reasons, we 
> maintained custom validation logic for instance name.
> 
> But as everyone knows maintenance for custom codes are so burden, I am 
> trying to find the applicable location for the demand.
> 
> imho, since there is schema validation for every resource, if any 
> validation hooking API provided we can happily use it. Does anyone 
> experience similar issue? Any advices will be appreciated.

There is a config option, "osapi_compute_unique_server_name_scope", 
which you can set to 'global' which should enforce in the DB layer that 
instance hostnames are unique.

However, thinking about this now, it's validated down in the cell DB 
layer, which is not global, so this likely doesn't work if you're using 
multiple cells, but I doubt you are right now.

Another related option is "multi_instance_display_name_template" but I 
see that's deprecated now, but I'm not aware of a proposed alternative 
for that option.

The names used should conform to RFC952, see:

https://github.com/openstack/nova/blob/7cbb5764d499dfdc90ef4a963daf217d58c840d4/nova//utils.py#L543

-- 

Thanks,

Matt



More information about the OpenStack-dev mailing list