<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><base href="x-msg://2608/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>In the osapi name from the request is always converted to display_name. There is no logic for appending a launch_index, although I also remember that something like that was done before.</div><div><br></div><div>Code for generating hostname is here:</div><div><br></div><a href="https://github.com/openstack/nova/blob/master/nova/compute/api.py#L653">https://github.com/openstack/nova/blob/master/nova/compute/api.py#L653</a><div><br></div><div>The display name is sanitized here:</div><div><br></div><div><a href="https://github.com/openstack/nova/blob/master/nova/utils.py#L1076">https://github.com/openstack/nova/blob/master/nova/utils.py#L1076</a></div><div><br></div><div>There is no per tenant uniqueness check, although that might be useful, as well as the option to add .tenant_name onto the hostname.</div><div><br></div><div>Vish</div><div><br></div><div><div><div>On Aug 30, 2012, at 8:06 AM, "Day, Phil" <<a href="mailto:philip.day@hp.com">philip.day@hp.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-GB" link="blue" vlink="purple" style="font-family: Menlo; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Hi Folks,<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">I’m trying to understand the difference between “display_name” and “hostname” in the instances table, and struggling a bit to track their use though the code.   It looks to me as if:<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">                display_name is always the name specified by the user<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">                hostname is a sanitized version of this (always converted to lowercase, etc)<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Is that correct, and if so:<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: -18pt; "><span>-<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman'; ">         <span class="Apple-converted-space"> </span></span></span>Is there anything which makes sure that the sanitized hostname is always unique for a particular customer (or are they meant to understand and anticipate the consequences of this sanitization)<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: -18pt; "><span>-<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman'; ">         <span class="Apple-converted-space"> </span></span></span>How is the hostname set when creating more than one instance at the same time (I thought I’d remembered seeing something in the code sometime back to add the an integer to the hostname, but I can’t seem to see anything in the current code that does this)<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Thanks<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Phil<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p></o:p></div></div>_______________________________________________<br>Mailing list:<span class="Apple-converted-space"> </span><a href="https://launchpad.net/~openstack" style="color: purple; text-decoration: underline; ">https://launchpad.net/~openstack</a><br>Post to     :<span class="Apple-converted-space"> </span><a href="mailto:openstack@lists.launchpad.net" style="color: purple; text-decoration: underline; ">openstack@lists.launchpad.net</a><br>Unsubscribe :<span class="Apple-converted-space"> </span><a href="https://launchpad.net/~openstack" style="color: purple; text-decoration: underline; ">https://launchpad.net/~openstack</a><br>More help   :<span class="Apple-converted-space"> </span><a href="https://help.launchpad.net/ListHelp" style="color: purple; text-decoration: underline; ">https://help.launchpad.net/ListHelp</a><br></div></blockquote></div><br></div></body></html>