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

connect_get_namespaced_pod_exec cannot run nohup command and return immediately #2352

Open
HuanjieGuo opened this issue Feb 17, 2025 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@HuanjieGuo
Copy link

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

@HuanjieGuo HuanjieGuo added the kind/bug Categorizes issue or PR as related to a bug. label Feb 17, 2025
@roycaihw
Copy link
Member

Is this reproducible with kubectl?

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

No branches or pull requests

2 participants