Comment 6 for bug 1310340

Revision history for this message
marvel (marvelliu) wrote :

Yes, I met this problem, horizon give me nodes like "node1.expr", while the database has only "node1", causing live migration failure, a little fix is listed below:

 50 def populate_host_choices(self, request, initial):
 51 hosts = initial.get('hosts')
 52 current_host = initial.get('current_host')
 53 +host_list = [(host.service['host'],
 54 + host.service['host'])
 55 + for host in hosts
 56 + if host.service['host'] != current_host]
 57 -host_list = [(host.hypervisor_hostname,
 58 - host.hypervisor_hostname)
 59 - for host in hosts
 60 - if host.service['host'] != current_host]
 61 if host_list:
 62 host_list.insert(0, ("", _("Select a new host")))