carbynestack / klyshko

Carbyne Stack correlated randomness generation subsystem
Apache License 2.0
4 stars 6 forks source link

Scheduler fails generating new TupleGenerationJobs #60

Closed sbckr closed 1 year ago

sbckr commented 1 year ago

The klyshko-controller-manager continuously fails generating new jobs:

$ kubectl logs klyshko-controller-manager-74f799cb7c-5pr6c -c manager
> 2023-04-15T00:04:05.094Z  ERROR   controller-runtime.manager.controller.tuplegenerationscheduler  Reconciler
> error {"reconciler group": "klyshko.carbnyestack.io", "reconciler kind": "TupleGenerationScheduler", "name": "cs-klyshko-config-
> tuplegenerationscheduler", "namespace": "default", "error": "failed to create tuple generation job:
> TupleGenerationJob.klyshko.carbnyestack.io \"cs-klyshko-config-tuplegenerationscheduler-197595d5-bc3b-4892-
> ac3b-395784cbb5e9\" is invalid: spec.count: Invalid value: 0: spec.count in body should be greater than 0"}

The cause of this issue is the configuration parameter for tuplesPerJob not being picked up in the scheduler's CRD:

$ kubectl get tgs cs-klyshko-config-tuplegenerationscheduler -o yaml
> apiVersion: klyshko.carbnyestack.io/v1alpha1
> kind: TupleGenerationScheduler
> metadata:
>   annotations:
>     meta.helm.sh/release-name: cs-klyshko-config
>     meta.helm.sh/release-namespace: default
>   creationTimestamp: "2023-04-15T00:40:23Z"
>   generation: 1
>   labels:
>     app.kubernetes.io/managed-by: Helm
>   name: cs-klyshko-config-tuplegenerationscheduler
>   namespace: default
>   resourceVersion: "2967003"
>   uid: 202e1a23-dfff-4dd4-9e9d-eae7bb9c303d
> spec:
>   concurrency: 2
>   generator:
>     image: ghcr.io/carbynestack/klyshko-mp-spdz:0.2.0
>     imagePullPolicy: IfNotPresent
>   threshold: 50000
>   ttlSecondsAfterFinished: 120

However, even adding the required configuration for tuplesPerJob manually using

EDITOR=nano kubectl edit tgs cs-klyshko-config-tuplegenerationscheduler

failes with an exception as tuplesPerJob is not a valid parameter for tuplegenerationscheduler.

$ EDITOR=nano kubectl edit tgs cs-klyshko-config-tuplegenerationscheduler        
> error: tuplegenerationschedulers.klyshko.carbnyestack.io "cs-klyshko-config-tuplegenerationscheduler" is invalid
> A copy of your changes has been stored to "/tmp/kubectl-edit-4223271568.yaml"
> error: Edit cancelled, no valid changes were saved.