Bosh

 View Only

 How to find the bosh task id of the failed cluster

Shanthakumar Karuppusamy's profile image
Broadcom Employee Shanthakumar Karuppusamy posted Jul 25, 2018 12:18 PM

I have tried creating cluster and it got failed , how do I find that which is task associated with this cluster in the bosh.

 

+++++++++

 

pksadmin@New-PksCli:~$ pks clusters

 

Name     Plan Name UUID                 Status   Action

k8scluster03 small   553d7126-ab60-4c85-be5c-21ff6df82c05 succeeded CREATE

k8scluster06 small   6e79ed39-5938-4c86-8899-220b5a065691 failed   CREATE

k8scluster04 small   a0cd88c1-d507-4868-9e3e-601f91d39cfa succeeded CREATE

k8scluster05 small   b0605a77-3e38-4b55-939c-f98bd590ca95 succeeded CREATE

k8scluster02 small   c72d3f01-87a8-42fb-b591-518ee96b5f20 succeeded CREATE

 

pksadmin@New-PksCli:~$

Mark Nagle's profile image
Broadcom Employee Mark Nagle

Hi Shanthakumar,

 

You can run 'bosh tasks -r=10' to get the last 10 tasks run by bosh (you increase the number to find older tasks).

The following example is looking for all create deployment tasks for service instances in the last 1000 tasks.

bosh tasks -r=1000 | grep 'service-instance_' | grep 'create deployment'

If you run the following you should find the task you are looking for:

bosh tasks -r=1000 | grep 'service-instance_' | grep 'create deployment' | grep 6e79ed39-5938-4c86-8899-220b5a065691

Once you find the task you can run 'bosh task <task number>' to get the task details. You can also add --debug or --cpi for further information about the task.

 

Regards,

Mark

Shanthakumar Karuppusamy's profile image
Broadcom Employee Shanthakumar Karuppusamy

Thanks Mark.

 

I got the few other commands for the same

 

root@New-PksCli:~# export BOSH_DEPLOYMENT=service-instance_6e79ed39-5938-4c86-8899-220b5a065691 root@New-PksCli:~# root@New-PksCli:~# bosh tasks -d service-instance_6e79ed39-5938-4c86-8899-220b5a065691 -r Using environment '172.29.16.150' as client 'ops_manager' ID State Started At Last Activity At User Deployment Description Result   701 done Wed Jul 25 07:00:01 UTC 2018 Wed Jul 25 07:00:01 UTC 2018 scheduler service-instance_6e79ed39-5938-4c86-8899-220b5a065691 snapshot deployment snapshots of dep loyment 'service-instance_6e79ed39-5938-4c86-8899-220b5a065691' created 549 error Tue Jul 24 11:56:16 UTC 2018 Tue Jul 24 11:59:25 UTC 2018 pivotal-container-service-b82764c652ed159213e4 service-instance_6e79ed39-5938-4c86-8899-220b5a065691 create deployment Action Failed ge t_task: Task 2c658fa4-5e36-4c78-43af-5d0f4b136697 result: 1 of 8 pre-start scripts failed. Failed Jobs:...   2 task Succeeded   root@New-PksCli:~# bosh task 549 Using environment '172.29.16.150' as client 'ops_manager' Task 549 | 11:56:16 | Preparing deployment: Preparing deployment (00:00:13) Task 549 | 11:56:52 | Preparing package compilation: Finding packages to compile (00:00:00) Task 549 | 11:56:53 | Creating missing vms: master/f56a6520-0e2c-48ee-a8f3-4254b5dbbf0e (0) Task 549 | 11:56:53 | Creating missing vms: worker/48831f0f-eba0-4072-a498-e4ee9305b58a (2) Task 549 | 11:56:53 | Creating missing vms: worker/03d0fc52-1d50-4c72-8875-710a909ce6d8 (0) Task 549 | 11:56:53 | Creating missing vms: worker/9b3cc2bb-90c9-4607-8b48-f6a800fd9987 (1) (00:01:19) Tsk 549 | 11:58:12 | Creating missing vms: worker/03d0fc52-1d50-4c72-8875-710a909ce6d8 (0) (00:01:19) Task 549 | 11:58:15 | Creating missing vms: worker/48831f0f-eba0-4072-a498-e4ee9305b58a (2) (00:01:22) Task 549 | 11:58:19 | Creating missing vms: master/f56a6520-0e2c-48ee-a8f3-4254b5dbbf0e (0) (00:01:26) Task 549 | 11:58:20 | Updating instance master: master/f56a6520-0e2c-48ee-a8f3-4254b5dbbf0e (0) (canary) (00:01:05) L Error: Action Failed get_task: Task 2c658fa4-5e36-4c78-43af-5d0f4b136697 result: 1 of 8 pre-start scripts failed. Failed Jobs: pks-nsx-t-prepare-master-vm. Successful Jobs: kube-apiserver, e tcd, kube-controller-manager, bpm, bosh-dns-enable, bosh-dns, syslog_forwarder.   Task 549 | 11:59:25 | Error: Action Failed get_task: Task 2c658fa4-5e36-4c78-43af-5d0f4b136697 result: 1 of 8 pre-start scripts failed. Failed Jobs: pks-nsx-t-prepare-master-vm. Successful Jobs: kube-apiserver, e tcd, kube-controller-manager, bpm, bosh-dns-enable, bosh-dns, syslog_forwarder. Task 549 Started Tue Jul 24 11:56:16 UTC 2018 Task 549 Finished Tue Jul 24 11:59:25 UTC 2018 Task 549 Duration 00:03:09 Task 549 error Capturing task '549' output: Expected task '549' to succeed but state is 'error' Exit code 1 pksadmin@New-PksCli:~$   pksadmin@New-PksCli:~$ pks cluster k8scluster06   Name: k8scluster06 Plan Name: small UUID: 6e79ed39-5938-4c86-8899-220b5a065691 Last Action: CREATE Last Action State: failed Last Action Description: Instance provisioning failed: There was a problem completing your request. Please contact your operations team providing the following information: service: p.pks, service-instance-guid: 6e79ed39-5938-4c86-8899-220b5a065691, broker-request-id: 37c34a36-289d-4deb-be15-f20b43e73d69, task-id: 549, operation: create Kubernetes Master Host: pkscluster06.sfo01.rainpole.local Kubernetes Master Port: 8443 Worker Instances: 3 Kubernetes Master IP(s): In Progress   pksadmin@New-PksCli:~$