Nova dhcp_domain flag overwrites the dnsmasq config file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hi,
I'm trying to manage my DNS with a combination of dnsmasq trickery. I would like to be able to have specific domain per subnet. This is already done by the adding a specific configuration file to dnsmasq via the nova flag --dnsmasq_
domain=
domain=
domain=
...
Within the VMs, the /etc/resolv.conf is ok. No problem.
But the problem is on the lease file generated by nova. The default --domain, setup or not in nova.conf overwrites the lease file. If I don't set anything in nova.conf, my lease file gets:
fa:16:3e:
fa:16:3e:
fa:16:3e:
And if I put something on this flag, the behavior is the same. It tried to put an empty flag but nova complains about an empty parameter which makes sense.
I would like to be able to get lease file like so:
fa:16:3e:
fa:16:3e:
fa:16:3e:
...
And so on according to each tenant lease file. I think I will be able to get what I want by removing the dhcp_domain flag from the nova code.
At the moment nova seems overwrite the dnsmasq config file, I don't understand why since --domain is not a mandatory parameter. I dived into the code, removed everything related to --domain : flag etc... In those files:
-/usr/lib/
-/usr/lib/
-/usr/lib/
But I discovered that nova builds his own lease file so the lease file is written but without any domain now. It's not a problem to rollback my files but I wish I could achieve my goal.
Any idea?
Thank you in advance.
Cheers!
Changed in nova: | |
status: | New → Invalid |
you could do something tricky like set config option to: domain= domain. net
--dhcp_
and modify the server create code nova/compute/api.py that sets the hostname to append the tenant name.
so the instance hostname would be xxx.tenant1, then you would get a different domain name per tenant.