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

Stuck in shutting down when target of "process_started" skipped #280

Closed
3 tasks done
laft2 opened this issue Nov 26, 2024 · 2 comments
Closed
3 tasks done

Stuck in shutting down when target of "process_started" skipped #280

laft2 opened this issue Nov 26, 2024 · 2 comments
Labels
bug Something isn't working done Done, awaiting release

Comments

@laft2
Copy link

laft2 commented Nov 26, 2024

Defect

  • Included the relevant configuration snippet
  • Included the relevant process-compose log (log location: process-compose info)
  • Included a [Minimal, Complete, and Verifiable example] (https://stackoverflow.com/help/mcve)

Version of process-compose:

v1.40.1

OS environment:

Ubuntu 22.04.5 LTS

Steps or code to reproduce the issue:

process-compose.yaml

processes:
  process1:
    command: "echo process1"
    depends_on:
      process2:
        condition: process_started
  process2:
    command: "echo process2"
    depends_on:
      process3:
        condition: process_completed_successfully
  process3:
    command: "sleep 9"
  1. Type process-compose up -D
  2. Type process-compose down before completing process3

Expected result:

The process1 becomes terminated or skipped, and the process process-compose is terminated.

Actual result:

The process1 remains in "Terminating" and cannot be terminated. (The image is the result of process-compose attach after process-compose down in Step. 2. )
image
To terminate process1 (and process-compose), I need to type killall -9 process-compose. (cannot kill by SIGTERM)

I've also tried availability.exit_on_skipped and availability.exit_on_end but they don't seem to have any effect.

Logs

process-compose.log

24-11-26 23:13:07.317 INF Process Compose v1.40.1
24-11-26 23:13:07.317 INF Loaded project from /home/user/process-compose.yaml
24-11-26 23:13:07.317 INF Global shell command: bash -c
24-11-26 23:13:07.317 INF start http server listening :8080
24-11-26 23:13:07.318 DBG Spinning up 3 processes. Order: ["process3" "process2" "process1"]
24-11-26 23:13:07.318 INF process1 is waiting for process2 to start
24-11-26 23:13:07.318 INF process2 is waiting for process3 to complete successfully
24-11-26 23:13:07.318 INF Started command=["bash","-c","sleep 9"] process=process3
24-11-26 23:13:09.135 DBG Shutting down 3 processes. Order: ["process3" "process2" "process1"]
24-11-26 23:13:09.135 DBG Stop Unix process. parentOnly=false pid=67617 signal=15
24-11-26 23:13:09.135 DBG process process2 is in state Pending not shutting down
24-11-26 23:13:09.135 DBG process process1 is in state Pending not shutting down
24-11-26 23:13:09.135 DBG process3 stdout done
24-11-26 23:13:09.135 DBG process3 stderr done
24-11-26 23:13:09.135 INF Exited exit_code=-1 process=process3
24-11-26 23:13:09.135 ERR Error: process process2 depended on process3 to complete successfully, but it exited with status -1
24-11-26 23:13:09.135 ERR Error: process process2 won't run
24-11-26 23:14:26.269 WRN Socket closed remotely
24-11-26 23:21:41.791 WRN Socket closed remotely

process-compose-client.log

24-11-26 23:13:11.589 INF Process Compose v1.40.1
24-11-26 23:13:11.593 INF Connecting to ws://localhost:8080/process/logs/ws?name=process1&offset=1000&follow=true
24-11-26 23:14:26.269 INF Connecting to ws://localhost:8080/process/logs/ws?name=process1&offset=1000&follow=true
24-11-26 23:21:41.791 DBG Logs monitoring canceled
@laft2 laft2 changed the title Stuck when target of "process_started" skipped Stuck in down command when target of "process_started" skipped Nov 26, 2024
@laft2 laft2 changed the title Stuck in down command when target of "process_started" skipped Stuck in shutting down when target of "process_started" skipped Nov 26, 2024
@F1bonacc1 F1bonacc1 added bug Something isn't working done Done, awaiting release labels Nov 29, 2024
@F1bonacc1
Copy link
Owner

Hey, @laft2,

Thanks for letting me know and for the detailed description!
I fixed the issue and will add it to the next release.

@F1bonacc1
Copy link
Owner

Fixed in v1.46.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done Done, awaiting release
Projects
None yet
Development

No branches or pull requests

2 participants