Skip to content

connect_get_namespaced_pod_exec cannot run nohup command and return immediately #2352

@HuanjieGuo

Description

@HuanjieGuo

What happened (please include outputs or screenshots):

Here is the command

    command = ['bash', '/mnt_target/rsync_command.sh']
    res = stream(tess_client.api.connect_get_namespaced_pod_exec,
        pod_name,
        namespace,
        command=command,
        stderr=True,
        stdin=False,
        stdout=True,
        tty=False,
        async_req = False
    )
    return res

cat /mnt_target/rsync_command.sh
nohup rsync -vr /mnt_source/ /mnt_target > /mnt_target/rsync.log 2>&1 && echo 1 > /mnt_target/rsync_done.txt &

when I call connect_get_namespaced_pod_exec, it will block there and cannot return immediately.

What you expected to happen:
It should return immediately because I use nohub &

Name: kubernetes
Version: 31.0.0

Activity

roycaihw

roycaihw commented on Feb 26, 2025

@roycaihw
Member

Is this reproducible with kubectl?

k8s-triage-robot

k8s-triage-robot commented on May 27, 2025

@k8s-triage-robot

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

added
lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
on May 27, 2025
k8s-triage-robot

k8s-triage-robot commented on Jun 26, 2025

@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

added
lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.
and removed
lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
on Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @roycaihw@k8s-ci-robot@HuanjieGuo@k8s-triage-robot

        Issue actions

          connect_get_namespaced_pod_exec cannot run nohup command and return immediately · Issue #2352 · kubernetes-client/python