<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 10, 2012, at 6:37 PM, Joshua Harlow <<a href="mailto:harlowja@yahoo-inc.com">harlowja@yahoo-inc.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif; "><div><br></div><span id="OLK_SRC_BODY_SECTION"><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif; "><div>I was wondering about the following case (and am not sure if its been addressed in folsom).</div><div><br></div><div>At yahoo, instead of the default hostname that seems to be automatically established (ie 'server-XYZ.novalocal' was in essex) we were wondering if there is anything in folsom that say lets us override that generation with either a module (or a subclass) or a new function without having to patch nova code. Sometimes we want a default hostname of a different format (as probably do others) and I just am not sure if quantum is directing this default hostname, or if nova still is, or if its some mix of both (the metadata + cloud-init can affect the hostname as well, so perhaps the configdrive work should be the only one establish a 'real' hostname?). </div><div><br></div><div>I have found the following pieces of hostname related code but am not sure if this is all the places that make hostnames :-)</div><ul><li><a href="https://github.com/openstack/nova/blob/master/nova/api/metadata/base.py#L109">https://github.com/openstack/nova/blob/master/nova/api/metadata/base.py#L109</a></li></ul><div>Is this the only place nowadays?? Is there something in quantum also?</div></div></div></span></div></blockquote><div><br></div><div>Hostname in metadata (it moved a little):</div><div><br></div><div><a href="https://github.com/openstack/nova/blob/master/nova/api/metadata/base.py#L122">https://github.com/openstack/nova/blob/master/nova/api/metadata/base.py#L122</a></div><div><br></div><div>Hostname from dhcp:</div><div><br></div><div><a href="https://github.com/openstack/nova/blob/master/nova/network/linux_net.py#L811">https://github.com/openstack/nova/blob/master/nova/network/linux_net.py#L811</a></div><div><br></div>instance_hostname comes from instance['hostname'] in the db, which is generated here:</div><div><br></div><div><a href="https://github.com/openstack/nova/blob/master/nova/compute/api.py#L636">https://github.com/openstack/nova/blob/master/nova/compute/api.py#L636</a></div><div><br></div><div>Seems like there is no plugin mechanism, but one we could easily add a flag that could be a format string applied to the instance record so it is easy to customize.</div><div><br></div><div>Vish</div><br></body></html>