Instance name set in horizon is not set in VMware vCenter

Bug #1330873 reported by Kiran Kumar Vaddi on 2014-06-17
40
This bug affects 6 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Medium
Gary Kotton

Bug Description

Instance name set in horizon is not set in VMware vCenter. In vCenter the name of the instance is the id (in UUID format) of the instance. This makes it difficult for the administrator to locate the instance in vCenter using the name displayed in horizon.

This issue was discussed on IRC and the decision was to
1. Have the name in <name>-<uuid> format
2. Make this a configurable option
3. Add a docImpact flag and add adequate documentation
4. Since vCenter allows instances with only unique names, there will not be additional checks introduced in the driver. Instead the task will fail if the instance with the same name exists.

Changed in nova:
assignee: nobody → Kiran Kumar Vaddi (kiran-kumar-vaddi)

@Kiran,

Seems like older versions ended up truncating the vm names at least the directory names to 32 chars. Are these restrictions no longer applicable to 5.x?

http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=2051649

thanks,
dims

@Davanum Srinivas,

The KB indicates that the name restriction has been increased to 80 characters starting from vCenter versions 5.0.
For vCenter versions before 5.0, it is 32 characters. So for vCenters 4.x the <name>-<uuid> might not be the solution for all versions, just having the <name> should be fine for both versions

Gary Kotton (garyk) wrote :

My concern with this is that the name needs to be unique on the ESX. In Nova the name does not need to be unique. There may be cases, real edge cases, that the user chooses long names and these have the same prefix.
This will cause an error when creating the config spec.

Tracy Jones (tjones-i) on 2014-07-16
Changed in nova:
status: New → Triaged
importance: Undecided → Medium
Tracy Jones (tjones-i) wrote :

i think we would like this change in kilo - as customers have all complained about this. If multiple instances are booted, the name is already be <name>-<uuid>, so we need to check for this and only append the uuid if it is not already there.

Kiran are you still going to work on this? It's not been updated since june. If you are not, please let someone else take this.

Jun Xie (junxiebj) on 2014-12-29
Changed in nova:
assignee: Kiran Kumar Vaddi (kiran-kumar-vaddi) → Jun Xie (junxiebj)
Sean Dague (sdague) on 2015-03-30
Changed in nova:
status: Triaged → Confirmed
Gary Kotton (garyk) wrote :
Changed in nova:
assignee: Jun Xie (junxiebj) → Gary Kotton (garyk)
status: Confirmed → In Progress
Dan Smith (danms) wrote :

I'm concerned about this behavior. If the instance name must be unique, and it's truncated at any level, then if we specify the display_name as long enough, we can cause a name clash in vmware. I understand that conventional vmware ops are used to seeing human-readable names in vcenter, but this is cloud. It's one thing if we set the display_name in metadata somewhere for tracking, but the unique bits should be generated, and are for the other drivers AFAIK. IMHO, we should use nothing other than the uuid for the instance name.

Sean Dague (sdague) wrote :

I think the point of using UUID for instance names is probably spot on. Marking as Opinion, because it seems like for consistency it should be done that way.

Changed in nova:
status: In Progress → Opinion
Changed in nova:
status: Opinion → In Progress

This is a very sensitive issue for customers, so I really would like to see it solved.

About the trunking problem, if the limit is 80 characters that means it will be possible to create instance with names up to 43 characters... who would give so long name to instances?

In any case this is not a good reason to ignore the issue: a simple solution could be a check on resulting name length and force a trunking of the <name> part while keeping the <uuid> part untouched.

Radoslav Gerganov (rgerganov) wrote :

FYI, we are targeting this for Mitaka with the following blueprint: https://blueprints.launchpad.net/nova/+spec/vmware-better-display-names

Reviewed: https://review.openstack.org/166608
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=47e3a4e96189486b53d3f8f0aac0ea56931adac8
Submitter: Jenkins
Branch: master

commit 47e3a4e96189486b53d3f8f0aac0ea56931adac8
Author: Gary Kotton <email address hidden>
Date: Sun Mar 22 06:57:09 2015 -0700

    VMware: improve instance names on VC

    Up until now the instance name of the VM on the VC was the UUID of
    the instance. This is very confusing for administrators and they
    would like some context for the VM.

    This will now be:
     <display-name> (<instance-uuid>)

    Once the the instance is created we will perform a rename. The reason
    for this is that the disks are all stored under a folder on the datastore
    that has the name of the instance UUID.

    NOTE: this is only for the display on the VC. The search for the VM's
          is done via the instanceUUID configured on the VM. If that fails
          then the nvp.uuid extra spec is used for the search.

    This completed the blueprint vmware-better-display-names

    Closes-bug: #1330873

    Change-Id: Ibeb000f4c1d88fa296390143b0cf98e05e735086

Changed in nova:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers