VMware Beta Community
returntrip
Contributor
Contributor
Jump to solution

Unable remove instance - CSE not found

I am not sure if "CSE4" is referring to a VM or vApp or if that is just some hardcoded name and of no consequence to the search.

I am asking cause I have just updated CSE to 4.1 and delete the previous vApp/VM (IIRC both called CSE4).

Would be great to have some help with this as I need to remove this instance and reinstall it.

root@PhotonOS-001 [ ~ ]# /mnt/cdrom/linux.run delete instance --name $TMC_SM_INSTANCE_NAME --accept --host $VCD_HOSTNAME --username $VCD_USERNAME --certificate-file /tmp/vcd.pem --encryption-key ${TMC_SM_ENCRYPTION_KEY} --accept --password $VCD_EXT_PASSWORD
INFO [0019] Triggering action action=hook event=PreDelete
INFO [0021] All global roles are ready to delete action=hook event=PreDelete
INFO [0021] cluster:tmc action=hook event=PreDelete
INFO [0021] Get Solution Org action=hook event=PreDelete
INFO [0021] Solution Org: CSE action=hook event=PreDelete
INFO [0021] Search CSE4 Cluster action=hook event=PreDelete
ERROR [0021] Failed to find any cse cluster in org CSE action=hook event=PreDelete
ERROR [0021] Failed to delete instance 'tmc' name=tmc
ERROR [0021] Failed to find any cse cluster in org CSE: exit status 23: failed to execute trigger hook errorCode=5012120012191213

0 Kudos
1 Solution

Accepted Solutions
jeffmace
VMware Employee
VMware Employee
Jump to solution

The TMC-SM for VCD tech preview only has support for CSE 4.0.3. This is the cause of the initial error you had.

The tech preview utilizes an unreleased build of the UI which allows you to inject trusted certificates into the cluster. CSE 4.1 is the first release which allows you to specify certificates to be trusted by the bootstrap VM or cluster. As you've identified, these certificates are now specified at the provider level. This behavior is closer to what the experience will be like when TMC-SM for VCD is released.

View solution in original post

0 Kudos
5 Replies
jeffmace
VMware Employee
VMware Employee
Jump to solution

I will discuss this with the engineering team and get back to you.

returntrip
Contributor
Contributor
Jump to solution

I managed to delete it manually by:

"curl -ks -H "Accept: application/json;version=37.0" -H "Content-Type: application/json" -H "Authorization: Bearer ${VCLOUD_ACCESS_TOKEN}" -X DELETE https://$VCD_HOSTNAME/cloudapi/1.0.0/entities/urn:vcloud:entity:vmware:solutions_add_on_instance:72f..."

The next problem is that the CSI 4.1 Plugin does not have a certificate session during cluster creation. I will need to find a way to add the certificate after cluster creation

returntrip
Contributor
Contributor
Jump to solution

I think the answer to the root CA issue is to add teh certificate to "" in the  "CSE Management" window. Will try and see if it works.

jeffmace
VMware Employee
VMware Employee
Jump to solution

The TMC-SM for VCD tech preview only has support for CSE 4.0.3. This is the cause of the initial error you had.

The tech preview utilizes an unreleased build of the UI which allows you to inject trusted certificates into the cluster. CSE 4.1 is the first release which allows you to specify certificates to be trusted by the bootstrap VM or cluster. As you've identified, these certificates are now specified at the provider level. This behavior is closer to what the experience will be like when TMC-SM for VCD is released.

0 Kudos
returntrip
Contributor
Contributor
Jump to solution

Is there a newer version of TMC local that is compatible with CSE 4.1?

I tried to install it but it is complaining that no CSE server is available

```

root@PhotonOS-001 [ ~ ]# /mnt/cdrom/linux.run create instance --name $TMC_SM_INSTANCE_NAME --host $VCD_HOSTNAME --username $VCD_USERNAME --certificate-file /tmp/vcd.pem --encryption-key ${TMC_SM_ENCRYPTION_KEY} --input-kube-cluster-name=${TMC_SM_KUBE_CLUSTER_NAME} --input-cert-provider=cluster-issuer --input-cert-cluster-issuer-name=selfsigned-ca-clusterissuer --input-dns-zone=${TMC_SM_DNS_ZONE} --input-contour-envoy-load-balancer-ip=${TMC_SM_LOAD_BALANCER_IP} --input-harbor-url=${TMC_SM_HARBOR_URL} --input-harbor-username=${TMC_SM_HARBOR_USERNAME} --accept
INFO [0019] Creating Solution instance entity instance=vmware.vcd-tmc-0.1.0-21897297-tmc
INFO [0019] Triggering action action=hook event=PreCreate
INFO [0020] Run EventPreCreate Hook action=hook event=PreCreate
INFO [0020] Run EventPreCreate Hook successfully action=hook event=PreCreate
INFO [0021] Creating element name=rde
INFO [0021] Creating element name=tmc-admin-global-role
INFO [0022] Creating element name=tmc-member-global-role
INFO [0023] Creating element name=rights-bundle
INFO [0023] Triggering action action=hook event=PostCreate
INFO [0024] Run EventPostCreate Hook action=hook event=PostCreate
INFO [0024] Copy the rights from global roles [Kubernetes Cluster Author] to the global role [tmc:member] action=hook event=PostCreate
INFO [0025] Update rights of global role tmc:member action=hook event=PostCreate
INFO [0025] Copy the rights from global roles [Organization Administrator Kubernetes Cluster Author] to the global role [tmc:admin] action=hook event=PostCreate
INFO [0025] Update rights of global role tmc:admin action=hook event=PostCreate
INFO [0025] Get Solution Org action=hook event=PostCreate
INFO [0025] Solution Org: CSE action=hook event=PostCreate
INFO [0025] Search CSE4 Cluster action=hook event=PostCreate
ERROR [0025] Failed to find any cse cluster in org CSE action=hook event=PostCreate
ERROR [0026] Failed to create instance 'tmc' name=tmc
ERROR [0026] Failed to find any cse cluster in org CSE: exit status 6: failed to execute trigger hook errorCode=5012110011142353

```