Skip to content

grace_period_seconds=0 ignored for stop requests #2370

Open
@oalbrigt

Description

@oalbrigt

What happened (please include outputs or screenshots):
grace_period_seconds=0 is ignored when running the following code:

        from kubernetes import config
        from openshift.dynamic import DynamicClient
        kubeconfig = options.get('--kubeconfig')
        k8s_client = config.new_client_from_config(config_file=kubeconfig)
        conn = DynamicClient(k8s_client)
        conn.request('put', path, header_params={'accept': '*/*'}, grace_period_seconds=0 if action == 'stop' else None)

https://github.com/ClusterLabs/fence-agents/pull/616/files

We have upgraded to the following lib versions to try to solve the issue (the earlier openshift version was overriding the request() function):
openshift: 0.13.2
kubernetes: 32.0.1

What you expected to happen:
I expected instant force-off, but instead it takes the same amount of time to stop as regular stop.

How to reproduce it (as minimally and precisely as possible):
Use fence_kubevirt from the PR linked above.

Anything else we need to know?:

Environment:

  • Kubernetes version (kubectl version): 4.17
  • OS (e.g., MacOS 10.13.6): RHEL 9.5
  • Python version (python --version): 3.9.21
  • Python client version (pip list | grep kubernetes):

Metadata

Metadata

Assignees

Labels

help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions