When adding new synthetic-tests, the controller periodically fails with the following error.
"error": "error selecting random agent, index out of range", "errorVerbose": "error selecting random agent, index out of range"
github.com/cisco-open/synthetic-heart/controller/internal/controller.SelectRandomAgent/workspace/controller/internal/controller/synthetictest_controller.go:291
github.com/cisco-open/synthetic-heart/controller/internal/controller.(*SyntheticTestReconciler).Reconcile
/workspace/controller/internal/controller/synthetictest_controller.go:170
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:119
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:316
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:227
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1695](http://ngithub.com/cisco-open/synthetic-heart/controller/internal/controller.SelectRandomAgent%5Cn%5Ct/workspace/controller/internal/controller/synthetictest_controller.go:291%5Cngithub.com/cisco-open/synthetic-heart/controller/internal/controller.(*SyntheticTestReconciler).Reconcile%5Cn%5Ct/workspace/controller/internal/controller/synthetictest_controller.go:170%5Cnsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile%5Cn%5Ct/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:119%5Cnsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler%5Cn%5Ct/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:316%5Cnsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem%5Cn%5Ct/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:266%5Cnsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2%5Cn%5Ct/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:227%5Cnruntime.goexit%5Cn%5Ct/usr/local/go/src/runtime/asm_amd64.s:1695)"
This causes multiple reconcile attempts to schedule a single synthetic-test to an agent, and eventually tests get scheduled.
Expected Behavior
When synthetic-tests are applied to a cluster, they are automatically scheduled to agents without controller errors.
Actual Behavior
The controller logs the above error and attempts multiple reconcile loops untill the error dissapears and a test then is scheduled.
Affected Version
v1.2.0-dev
Steps to Reproduce
Deploy synthetic-heart agent, controller and restapi v1.2.0-dev to a cluster.
Description
When adding new synthetic-tests, the controller periodically fails with the following error.
This causes multiple reconcile attempts to schedule a single synthetic-test to an agent, and eventually tests get scheduled.
Expected Behavior
When synthetic-tests are applied to a cluster, they are automatically scheduled to agents without controller errors.
Actual Behavior
The controller logs the above error and attempts multiple reconcile loops untill the error dissapears and a test then is scheduled.
Affected Version
v1.2.0-dev
Steps to Reproduce
Checklist