[Openstack] [Nova] hostname vs hostIP in live-migration

Wangpan hzwangpan at corp.netease.com
Mon Aug 20 08:01:47 UTC 2012


Hi all,
I have a doubt about the configuration of live-migration, when we want to use the live-migration feature, we show change /etc/hosts on every host, so they can establish connection with each other by "hostname", if we don't of forget to do this, the live-migration will fail. and also I have look into the source code of nova, it uses hostname everywhere instead of hostIP.
So my questions are listed below,
1. Why nova use hostname instead of hostIP ?
2. If there are many compute Nodes, we should change the /etc/hosts on every node, and if we want to add one compute Node, we also need to change the /etc/hosts of every node, I think this isn't flexible or convenient, is there any good ideas? should I configure a DNS server instead of modifing the /etc/hosts?
3. I want to modify the source code to change the original implementation by add the hostIP to the table 'services' in nova database, so I can get the hostIP by querying this table using 'host' as the filter, then I needn't to modify the /etc/hosts or add a DNS server to support live-migration. is this a feasible plan?

Many Thanks,
Wangpan





More information about the Openstack mailing list