operator icon indicating copy to clipboard operation
operator copied to clipboard

Pools.0.tolerations.0.tolerationSeconds.seconds in body is required when trying to specify NoSchedule without seconds

Open VPelmeSHko opened this issue 3 years ago • 4 comments

Got Pools.0.tolerations.0.tolerationSeconds.seconds in body is required. when trying to specify NoSchedule without seconds in PodPlacement -> Tolerations screen. Specifying seconds to 0 this will cause invalid: spec.tolerations[0].effect issue on statefulset

kubectl minio version v4.5.0

kubectl -n test describe statefulset test-pool-0

Events:
  Type     Reason            Age                  From                    Message
  ----     ------            ----                 ----                    -------
  Warning  FailedCreate      2m6s (x69 over 37m)  statefulset-controller  create Pod test-pool-0-3 in StatefulSet test-pool-0 failed error: Pod "test-pool-0-3" is invalid: spec.tolerations[0].effect: Invalid value: "NoSchedule": effect must be 'NoExecute' when `tolerationSeconds` is set

kubectl -n test get statefulset test-pool-0 -o yaml

tolerations:                          
      - effect: NoSchedule                                                                                            
        key: nvidia.com/gpu                            
        operator: Equal              
        tolerationSeconds: 0
        value: "true"

VPelmeSHko avatar Sep 21 '22 18:09 VPelmeSHko

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 12 '23 17:08 stale[bot]

Facing same issue. If i don't set tolerationSeconds it says pools.0.tolerations.0.tolerationSeconds.seconds in body is required

If I set it to non zero it says Invalid value: \"NoSchedule\": effect must be 'NoExecute' when tolerationSeconds is set

debugger24 avatar Nov 16 '23 16:11 debugger24

In the minio console, I checked the API call being made and updated the API call to set tolerationSeconds to null, it worked after that.

@bexsoft is this bug related to console given the API call is being made from console ?

Old payload (only tolerations section)

"tolerations": [
    {
      "key": "demo",
      "tolerationSeconds": {
        "seconds": null
      },
      "value": "core",
      "effect": "NoSchedule",
      "operator": "Equal"
    }
  ]

New Payload (only tolerations section)

"tolerations": [
  {
    "key": "demo",
    "tolerationSeconds": null,
    "value": "core",
    "effect": "NoSchedule",
    "operator": "Equal"
  }
]

debugger24 avatar Nov 16 '23 16:11 debugger24

Hi @debugger24!

Thank you for the information, we will review this behavior

bexsoft avatar Dec 05 '23 17:12 bexsoft