Symptoms
PKS cluster creation fails with an error similar to the following:
-Task 1180 | 17:53:02 | Updating instance master: master/8aecb927-19ef-4bc8-ad8d-46176edbc1bc (0) (canary) (00:06:21)- Error: Action Failed get_task: Task d73bb225-b670-42ba-4aa2-59929709aad9 result: 1 of 8 pre-start scripts failed. Failed Jobs: pks-nsx-t-prepare-master-vm. Successful Jobs: etcd, bosh-dns-enable, bpm, bosh-dns, syslog_forwarder, ncp, pks-nsx-t-ncp.Task 1180 | 17:59:23 | Error: Action Failed get_task: Task d73bb225-b670-42ba-4aa2-59929709aad9 result: 1 of 8 pre-start scripts failed. Failed Jobs: pks-nsx-t-prepare-master-vm. Successful Jobs: etcd, bosh-dns-enable, bpm, bosh-dns, syslog_forwarder, ncp, pks-nsx-t-ncp.
You see messages similar to the following in the /var/vcap/log/pks-nsx-t-prepare-master-vm/pre-start.stderr.log file:
"Cannot find logical port id for vm with bosh_id b90291d5-f842-441f-b75d-d71bf497b716"
You see messages similar to the following in the /var/vcap/sys/log/pks-nsx-t-prepare-master-vm/pre-start.stdout.log file:
Registering client certificateab9109db-2708-4bb1-a1ec-b28b12d3bc7cRegistration of client certificate is successfulChecking if client certificate is ready to be usedThe credential is workingClient certificate is ready to be usedCreating Load BalancerLoadbalancer <Name: lb-pks-1c49f37e-18e7-4267-acfe-5b0c8793b095, ID: 68fb922e-4472-48fd-bb10-7870bdbc2ce3, Size: SMALL> creation succeededLoad Balancer is createdPKS NSX-T Tagging Master VMCannot find logical port id for vm with bosh_id b90291d5-f842-441f-b75d-d71bf497b716 at 0-th tryCannot find logical port id for vm with bosh_id b90291d5-f842-441f-b75d-d71bf497b716 at 1-th tryCannot find logical port id for vm with bosh_id b90291d5-f842-441f-b75d-d71bf497b716 at 2-th tryCannot find logical port id for vm with bosh_id b90291d5-f842-441f-b75d-d71bf497b716 at 3-th tryCannot find logical port id for vm with bosh_id b90291d5-f842-441f-b75d-d71bf497b716 at 4-th try
Resolution
This issue can occur when NSX-T is not enabled on the bosh tile. Enable the NSX mode to NSX-T on the Bosh Tile under Vcenter config