vmware / vic

vSphere Integrated Containers Engine is a container runtime for vSphere.
http://vmware.github.io/vic
Other
640 stars 173 forks source link

VCH Inspect API outputs VSAN dom storage paths #7959

Open AngieCris opened 6 years ago

AngieCris commented 6 years ago

Bug found by @rogeliosanchez when running inspect API test

Bug Summary when inspecting a VCH with volume store on vSAN datastore using vic-machine service API, the volume_stores field in the json response does not contain the volume store folder created for the VCH, but contains the vSAN DOM folder for the volume store.

Details Deploy a VCH named AAAAA with this CLI command:

sudo bin/vic-machine-linux create -t $GOVC_URL -u $GOVC_USER -p $GOVC_PASSWORD --image-store vsanDatastore --volume-store vsanDatastore/AAAAA-vol:default --bridge-network bridge --public-network vm-network --no-tls --thumbprint=$GOVC_THUMBPRINT --name AAAAA

From vic-machine log, vSAN datastore DOM folder 4278fc5a-ab59-35a4-8736-020035603167 is created:

INFO[0027] Creating directory [vsanDatastore] 4278fc5a-ab59-35a4-8736-020035603167 
INFO[0027] Datastore path is [vsanDatastore] 4278fc5a-ab59-35a4-8736-020035603167

In web client, volume store folder AAAAA-vol is created in vSAN datastore, and the DOM folder 4278fc5a-ab59-35a4-8736-020035603167 shows up in the inventory as well: screen shot 2018-05-16 at 2 27 30 pm

Inspect this VCH with API, the output for both volume store and image store contains vSAN DOM folders, instead of volume store folder AAAAA-vol and image store folder AAAAA:

"storage": {
    "base_image_size": {
      "units": "KB",
      "value": 8000000
    },
    "image_stores": [
      "ds://vsanDatastore/3b78fc5a-be91-2b3e-a37f-0200354c8bf4"
    ],
    "volume_stores": [
      {
        "datastore": "ds://vsanDatastore/4278fc5a-ab59-35a4-8736-020035603167",
        "label": "default"
      }
    ]
  },

Steps to reproduce

  1. Have a vSAN cluster set up
  2. Deploy a VCH to vSAN datastore with volume store
  3. Inspect the VCH using API

@zjs It seems that we should not be showing users vSAN internal dom folders. I'm not sure about the potential impacts. Is it something we should fix? What should be the priority?

AngieCris commented 6 years ago

Set to priority p2 for now After inspect API is used by wizard UI, bump it to p1 (probably)