Test-Scheduler Errand Failing
search cancel

Test-Scheduler Errand Failing

book

Article ID: 405332

calendar_today

Updated On:

Products

VMware Tanzu Application Service

Issue/Introduction

 

Test-Scheduler Errand Fails

Task 1813200 | 15:12:43 | Running errand: test-scheduler/8ce7ad8b-8e58-4cb4-a8ca-992276ced30a (0) (00:00:05)
Task 1813200 | 15:12:48 | Fetching logs for test-scheduler/8ce7ad8b-8e58-4cb4-a8ca-992276ced30a (0): Finding and packing log files (00:00:01)
Task 1813200 Started  Thu Jul 17 15:09:08 UTC 2025
Task 1813200 Finished Thu Jul 17 15:12:49 UTC 2025
Task 1813200 Duration 00:03:41
Task 1813200 done
Instance   test-scheduler/8ce7ad8b-8e58-4cb4-a8ca-992276ced30a
Exit Code  1
Stdout     /var/vcap/packages/smoke_test /var/vcap/bosh
           /var/vcap/bosh
Stderr     -

A successful run looks like:

The task debug output below/attached isn't much help. It says it's packing log files but the stderr value is empty. When running the errand with --keep-alive, you see the orgs/spaces are not created which means it doesn't even get to the smoke tests. It fails in less than 10 seconds.

 

{"time":1752769173,"stage":"Running errand","tags":[],"total":1,"task":"test-scheduler/8ce7ad8b-8e58-4cb4-a8ca-992276ced30a (0)","index":1,"state":"finished","progress":100}
{"time":1752769173,"stage":"Fetching logs for test-scheduler/8ce7ad8b-8e58-4cb4-a8ca-992276ced30a (0)","tags":[],"total":1,"task":"Finding and packing log files","index":1,"state":"started","progress":0}
{"time":1752769174,"stage":"Fetching logs for test-scheduler/8ce7ad8b-8e58-4cb4-a8ca-992276ced30a (0)","tags":[],"total":1,"task":"Finding and packing log files","index":1,"state":"finished","progress":100}
', "result_output" = '{"instance":{"group":"test-scheduler","id":"8ce7ad8b-8e58-4cb4-a8ca-992276ced30a"},"errand_name":"test-scheduler","exit_code":1,"stdout":"/var/vcap/packages/smoke_test /var/vcap/bosh\n/var/vcap/bosh\n","stderr":"","logs":{"blobstore_id":"3a37b91b-1b4a-42ed-70cd-ca3710cdd8ef","sha1":"e18ac6b0c983bf2af1a246568aa49b2602dc89e6"}}
', "context_id" = '' WHERE ("id" = 1813338)

When looking at the code here, it gets stuck during the go build.

test-scheduler/33ff04be-0bd7-427f-986d-4f0f8c466c19:/var/vcap/jobs/test-scheduler/bin# cat /var/vcap/packages/smoke_test/src/pcf-scheduler/cliplugin/scripts/reinstall.sh
#!/usr/bin/env bash

set -ex

cf uninstall-plugin SchedulerForPCF || true # suppress errors

pushd "$(dirname "$(dirname $0)")"
  go build -o SchedulerForPCF -ldflags "-X main.Major=0 -X main.Minor=0 -X main.Patch=0"
  cf install-plugin SchedulerForPCF -f



In order to get more details on why, edit the reinstall.sh file by adding the -v and -x flags to the go build command shown below.

go build -v -x -o SchedulerForPCF -ldflags "-X main.Major=0 -X main.Minor=0 -X main.Patch=0"


Once the file is edited and saved, edit the run script that is located in the /var/vcap/jobs/test-scheduler/bin directory.

Change from:

/var/vcap/packages/smoke_test/src/pcf-scheduler/cliplugin/scripts/reinstall.sh >/dev/null 2>&1 

Change to:

/var/vcap/packages/smoke_test/src/pcf-scheduler/cliplugin/scripts/reinstall.sh 2>&1

 

Then execute /var/vcap/jobs/test-scheduler/bin/run manually to see more details on the issue:

test-scheduler/8ce7ad8b-8e58-4cb4-a8ca-992276ced30a:/var/vcap/jobs/test-scheduler/bin# ./run /var/vcap/packages/smoke_test /var/vcap/jobs/test-scheduler/bin /var/vcap/jobs/test-scheduler/bin + cf uninstall-plugin SchedulerForPCF Plugin SchedulerForPCF does not exist. FAILED + true +++ dirname /var/vcap/packages/smoke_test/src/pcf-scheduler/cliplugin/scripts/reinstall.sh ++ dirname /var/vcap/packages/smoke_test/src/pcf-scheduler/cliplugin/scripts + pushd /var/vcap/packages/smoke_test/src/pcf-scheduler/cliplugin /var/vcap/packages/smoke_test/src/pcf-scheduler/cliplugin /var/vcap/jobs/test-scheduler/bin + go build -o SchedulerForPCF -ldflags '-X main.Major=0 -X main.Minor=0 -X main.Patch=0' go: downloading code.cloudfoundry.org/bytefmt v0.25.0 go: downloading golang.org/x/crypto v0.32.0 go: downloading github.com/fatih/color v1.18.0 go: downloading github.com/sirupsen/logrus v1.9.3 go: downloading golang.org/x/text v0.21.0 go: downloading golang.org/x/term v0.28.0 go: downloading github.com/mattn/go-colorable v0.1.13 go: downloading github.com/mattn/go-isatty v0.0.20 ../../../pkg/mod/code.cloudfoundry.org/[email protected]/util/configv3/load_config.go:12:2: golang.org/x/[email protected]: read "https://proxy.golang.org/golang.org/x/term/@v/v0.28.0.zip": http2: Transport received Server's graceful shutdown GOAWAY ../../../pkg/mod/github.com/vito/[email protected]/interact/interaction.go:10:2: golang.org/x/[email protected]: read "https://proxy.golang.org/golang.org/x/crypto/@v/v0.32.0.zip": http2: Transport received Server's graceful shutdown GOAWAY ../../../pkg/mod/code.cloudfoundry.org/[email protected]/util/ui/i18n.go:12:2: golang.org/x/[email protected]: read "https://proxy.golang.org/golang.org/x/text/@v/v0.21.0.zip": http2: Transport received Server's graceful shutdown GOAWAY

Resolution

To resolve this issue, upgrade to v2.0.16 which contains the fix with downloading go files as the CLI plugin is pre-compiled correctly for smoke tests in v2.0.16.