Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change queue status from open to closed without vcctl? #3778

Open
UsachevDY opened this issue Oct 16, 2024 · 1 comment
Open

How to change queue status from open to closed without vcctl? #3778

UsachevDY opened this issue Oct 16, 2024 · 1 comment
Labels
kind/question Categorizes issue related to a new question

Comments

@UsachevDY
Copy link

UsachevDY commented Oct 16, 2024

Please describe your problem in detail

Dear Volcano team,

I want to change queue status from open to closed programmatically in application. I am using python kube client calling apply function, but when I modify manifest, kuber returns code 200, but the changes do not apply.
Volcano version: 1.9

  1. What I have before applying changes
apiVersion: scheduling.volcano.sh/v1beta1
kind: Queue
metadata:
  creationTimestamp: '2024-08-21T12:52:48Z'
  generation: 1
  managedFields:
    - apiVersion: scheduling.volcano.sh/v1beta1
      fieldsType: FieldsV1
      fieldsV1:
        f:status:
          .: {}
          f:allocated:
            .: {}
            f:cpu: {}
            f:memory: {}
          f:reservation: {}
          f:state: {}
      manager: Go-http-client
      operation: Update
      subresource: status
      time: '2024-08-21T12:52:48Z'
    - apiVersion: scheduling.volcano.sh/v1beta1
      fieldsType: FieldsV1
      fieldsV1:
        f:metadata:
          f:labels:
            .: {}
            f:oip/tenant-id: {}
            f:oip/workspace-id: {}
        f:spec:
          .: {}
          f:reclaimable: {}
          f:weight: {}
      manager: OpenAPI-Generator
      operation: Update
      time: '2024-08-21T12:52:48Z'
  name: 4bba785b-003d-400d-8a23-a68c1e9f0b72
  resourceVersion: '126398065'
  uid: ae66c91a-7690-45d6-8a93-0a5c31446fa0
  selfLink: >-
    /apis/scheduling.volcano.sh/v1beta1/queues/4bba785b-003d-400d-8a23-a68c1e9f0b72
status:
  allocated:
    cpu: '0'
    memory: '0'
  reservation: {}
  state: Open
spec:
  reclaimable: false
  weight: 1
  1. I modify state over command kube apply API call
...
status:
  allocated:
    cpu: '0'
    memory: '0'
  reservation: {}
  state: Closed
...
  1. And get again the same
...
status:
  allocated:
    cpu: '0'
    memory: '0'
  reservation: {}
  state: Open
...

Please, explain how can I change state over kube apply command?

P.S. I know that I can change status using 'vcctl queue operate -a close' but I want to find simply way programmatically change state over Python.

Best regards,
Denis

Any other relevant information

No response

@UsachevDY UsachevDY added the kind/question Categorizes issue related to a new question label Oct 16, 2024
@UsachevDY UsachevDY changed the title How to change queue status from open to closed? How to change queue status from open to closed without vcctl? Oct 16, 2024
@Monokaix
Copy link
Member

Queue status is reconciled by controller and it's an actual state of queue just like other k8s resource, so it's not recommended to change the status manually, you can find that k8s resources like pod and node is not allowed to modify status by kubectl either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Categorizes issue related to a new question
Projects
None yet
Development

No branches or pull requests

2 participants