python icon indicating copy to clipboard operation
python copied to clipboard

Watch Method stops detecting change in events

Open samskan opened this issue 2 years ago • 7 comments

After sometime watch method is not detecting any change in secret/configmaps.

  • Kubernetes version (kubectl version): Client Version: v1.28.2 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.25.5

No timeout set for watch w = watch.Watch() for event in w.stream(v1.list_secret_for_all_namespaces): print(event['type'], event['object'].kind, event['object'].metadata.name)

I dont see any events in the print line

samskan avatar Nov 13 '23 07:11 samskan

Hey @samskan can u give more info on the issue... I am able to get the event updates for secrets

Ananya2001-an avatar Nov 17 '23 09:11 Ananya2001-an

The watch method fails to detect changes despite pod termination, persisting in an unresponsive state. w = watch.Watch() for event in w.stream( kube_client.list_namespaced_pod, namespace=environ.get('NAMESPACE')): pod = event['object']

vivekdixit2510 avatar Dec 14 '23 07:12 vivekdixit2510

/assign @Ananya2001-an Thanks for following up the question.

Also here are some examples for watch: https://github.com/kubernetes-client/python/tree/master/examples/watch

roycaihw avatar Dec 18 '23 17:12 roycaihw

I need to watch a POD lifecycle process for 6 hours and delete it after. If it ends early, I should capture the EVENT it as successful. But sometimes, I don't receive Event after POD ends. This happens inconsistently.

vivekdixit2510 avatar Dec 19 '23 06:12 vivekdixit2510

Any update on this Bug?

vivekdixit2510 avatar Jan 02 '24 05:01 vivekdixit2510

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Apr 01 '24 06:04 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar May 01 '24 06:05 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar May 31 '24 06:05 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar May 31 '24 06:05 k8s-ci-robot