walter-cd / walter

Tiny deployment pipeline
http://walter-cd.net
Apache License 2.0
438 stars 39 forks source link

parallel command processes are not killed when to kill walter process #160

Closed takyoshi closed 7 years ago

takyoshi commented 8 years ago

I have a question about the behavior when a walter process is canceled.

I expected that when walter process is killed, parallel processes are killed. But theses processes were running after the walter process was killed. Is that behavior by design?

below my pipeline and results:

pipeline:
  - name: Start parallel pipelines
  - name: Env var checks
    type: command
    command: echo "hello, $USER_NAME"
    report_full_output: true
  - name: parallel start
    parallel:
    - name: long running 1
      type: command
      command: ./long_run.sh
      directory: /home/vagrant/scripts 
    - name: long running 2
      type: command
      command: ./long_run.sh
      directory: /home/vagrant/scripts 
    - name: long running 3
      type: command
      command: ./long_run.sh
      directory: /home/vagrant/scripts 
  - name: End parallel pipelines

operation and results:

$ [vagrant@rundeck ~]$ walter -c pipelines/mypipe.yml 
08:29:11  INFO Pipeline file path: "pipelines/mypipe.yml"
08:29:11  INFO not found "require" block
08:29:11  INFO not found "service" block
08:29:11  INFO local client was created
08:29:11  INFO found messenger block
08:29:11  INFO type of reporter is slack
08:29:11  INFO not found cleanup block in the input file
08:29:11  INFO running Walter
08:29:11  INFO Starting Walter in local mode
08:29:11  INFO Preparing to run pipeline process...
08:29:11  INFO [command] exec: Start parallel pipelines
08:29:12  INFO Slack post result...: ok
08:29:12  INFO [command] exec: Env var checks
08:29:12  INFO [Env var checks][command] exec output: hello, 
08:29:13  INFO Slack post result...: ok
08:29:13  INFO Slack post result...: ok
08:29:13  INFO [command] exec: parallel start
08:29:14  INFO Slack post result...: ok
08:29:14  INFO [command] exec: long running 1
08:29:14  INFO [command] exec: long running 3
08:29:14  INFO [command] exec: long running 2
08:29:14  INFO [long running 1][command] exec output: hogehoge
08:29:14  INFO [long running 3][command] exec output: hogehoge
08:29:14  INFO [long running 2][command] exec output: hogehoge
[vagrant@rundeck ~]$ date && ps auxfw | grep walter
Fri Jun 10 08:29:22 BST 2016
vagrant   4067  0.4  1.8 322872 11612 pts/1    Sl+  08:29   0:00  |           \_ walter -c pipelines/mypipe.yml
vagrant   4101  0.0  0.1 103304   876 pts/2    S+   08:29   0:00              \_ grep walter
[vagrant@rundeck ~]$ pkill walter
[vagrant@rundeck ~]$ date && ps auxfw | grep long_run | grep -v "grep"
Fri Jun 10 08:29:28 BST 2016
vagrant   4084  0.0  0.2 106064  1320 pts/1    S    08:29   0:00 /bin/bash ./long_run.sh
vagrant   4085  0.0  0.2 106064  1316 pts/1    S    08:29   0:00 /bin/bash ./long_run.sh
vagrant   4089  0.0  0.2 106064  1320 pts/1    S    08:29   0:00 /bin/bash ./long_run.sh
[vagrant@rundeck ~]$ date && ps auxfw | grep long_run | grep -v "grep"
Fri Jun 10 08:29:52 BST 2016
[vagrant@rundeck ~]$ 

Best regards.

takahi-i commented 8 years ago

Hello @takyoshi! Thank you very much for giving us the interesting topic on Walter. We will discuss the behavior with the team members.

mizzy commented 7 years ago

I close this for cleaning issues. We will not develop v1 anymore. Please use v2 beta if you would like. https://github.com/walter-cd/walter/releases/tag/v2.0.0.beta1