vSphere integration does not create "juju-kubernetes" folder

Bug #1847419 reported by Pedro Guimarães
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
CDK Addons
Triaged
Medium
Unassigned
Kubernetes Control Plane Charm
Triaged
Medium
Unassigned
vSphere Integrator Charm
Triaged
Medium
Unassigned

Bug Description

Juju: 2.6.9
k8s: 1.16
vSphere: 6.5

Running vsphere integrator with an admin account.

When creating PVs, they fail because folder "juju-kubernetes" was not found.

As per VMWare documentation: https://vmware.github.io/vsphere-storage-for-kubernetes/documentation/storageclass.html
Note: VMDK is created inside kubevols folder in datastore which is mentioned in ‘vsphere’ cloudprovider configuration. The cloudprovider config is created during setup of Kubernetes cluster on vSphere.

I will try manually creating this folder and see if the error changes.

------

Manually creating the folder did not work.
Actually, Kubernetes is looking for the folder where the k8s VMs are placed and not finding because the value is hard-wired for "juju-kubernetes" out of the box.

There is a manual step to fix it, described on the comments below.

description: updated
Revision history for this message
Pedro Guimarães (pguimaraes) wrote :

To find out the right folder for the "folder" parameter on vpshere-integrator, do:

1) Pull govc (from VMWare's govmomi lib) from github and install it on your PATH
2) Grab the CA cert for your vCenter (follow steps available online)
3) Fine one machine to grab its name, on juju, with "juju list-machines":
## List the machines available with juju list-machines:
Machine State DNS Inst id Series AZ Message
0 started REDACTED juju-uuid-0 bionic poweredOn

4) Run govc with:
## Get one of the instance names, for example: juju-10f793-0 and search for it via govc
## Remember that special characters such as ?, ! or $ need to be replaced by \?, \! or \$
$ govc find -u USER@VCENTER_DOMAIN:PASSWORD@VCENTER_IP/URL vm -name juju-uuid-0

5) Output should look like:
/DATACENTER/vm/CONTROLLER_UUID_FOLDER/MODEL_FOLDER/<all the VMs>

6) The folder name is the value for "CONTROLLER_UUID_FOLDER". Run:
juju config vsphere-integrator folder="CONTROLLER_UUID_FOLDER"

Revision history for this message
Chris Carver (ccarver01) wrote :

Saw this error during a fresh installation and manually created the folder. I am wondering if this is the reason why volumes are being created but never being bound. I opened a ticket (https://bugs.launchpad.net/charm-vsphere-integrator/+bug/1847809) and the two may be related.

Revision history for this message
Chris Carver (ccarver01) wrote :

After correcting the folder configuration, the PVC is still in a "pending" state. The issues don't seem to be related.

Revision history for this message
Pedro Guimarães (pguimaraes) wrote :

Hi Chris,

Yes, my PVs were never moving to bound state either.

Do you mind trying the steps described on comment #1 and reporting back here the results? It worked fine for me that time.

Revision history for this message
Chris Carver (ccarver01) wrote :

Pedro,

After following your instructions, the PVC remains in a pending state even though the volume is created. There are no claim errors with the PV in question.

I am wondering if the folder parameter requires more than just "CONTROLLER_UUID_FOLDER", as the VM's aren't available in that folder. I tried setting it to "CONTROLLER_UUID_FOLDER/MODEL_FOLDER" but the PVC error states that it cannot find that folder. Perhaps it doesn't like the quotes Juju uses in the folder name?

I am stumped at this point.

George Kraft (cynerva)
Changed in cdk-addons:
importance: Undecided → Medium
Changed in charm-kubernetes-master:
importance: Undecided → Medium
Changed in charm-vsphere-integrator:
importance: Undecided → Medium
Changed in cdk-addons:
status: New → Triaged
Changed in charm-kubernetes-master:
status: New → Triaged
Changed in charm-vsphere-integrator:
status: New → Triaged
Revision history for this message
Miguel Felix Barrera Diaz (miguelix) wrote :

I'm having the same problem.
When the pv are created they remain pending.
I have tried the above indicated options in case the path is wrong, but it still does not work. The bootstrap with vsphere performs it correctly for me and provisions the machines for me. The problem comes when adding the vsphere-integrator charm. I find it no log that gives me any idea about the problem.

Revision history for this message
Miguel Felix Barrera Diaz (miguelix) wrote :

My environment:

Juju: 2.9.0
k8s: 1.21 (charmed-kubernetes-679)
vSphere: 6.7 U3

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.