xen-org/xen-api — pull request #657 by robhoes (2012-06-01 14:18:14+00:00)
Title: Update Host.name_label if it is localhost.localdomain

The Host.name_label field is set to be the hostname when xapi
first starts and the Host record is created. If the hostname has
not yet been set at that point, for example due to a slow DHCP
response, you may end up with a "localhost.localdomain" name_label.
This became more likely since the init script of the network daemon
no longer waits for the DHCP reply.

This patch changes the Host.name_label of a host when the hostname
changes, and the name_label currently is "localhost.localdomain".

Signed-off-by: Rob Hoes