Unitech / Unitech/pm2

pullAndReload call stops my application and reloads the caller module instead

Open
#2,270 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S: Icebox T: Bug
Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

Issue

When using the module pm2-auto-pull, which makes a pm2.pullAndReload call, it pulls the correct repo, but it starts the module a second time instead of the application I am running. It just flat out stops the newly pulled application.

I have written my own module to test pullAndReload and I am getting the same behavior.

Log output

PM2: 2016-07-08 12:27:02: [PM2][WORKER] Started with refreshing interval: 30000
PM2: 2016-07-08 12:27:22: Starting execution sequence in -fork mode- for app name:MYAPP id:0
PM2: 2016-07-08 12:27:22: App name:MYAPP id:0 online
PM2: 2016-07-08 12:27:44: Starting execution sequence in -fork mode- for app name:pm2-auto-pull id:1
PM2: 2016-07-08 12:27:44: App name:pm2-auto-pull id:1 online
PM2: 2016-07-08 12:29:21: Process 0 in a stopped status, starting it
PM2: 2016-07-08 12:29:21: Stopping app:MYAPP id:0
PM2: 2016-07-08 12:29:21: App [MYAPP] with id [0] and pid [27333], exited with code [0] via signal [SIGINT]
PM2: 2016-07-08 12:29:21: Starting execution sequence in -fork mode- for app name:pm2-auto-pull id:1
PM2: 2016-07-08 12:29:21: App name:pm2-auto-pull id:1 online

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior using pm2-auto-pull and the pullAndReload call, then compare the log sequence for MYAPP and pm2-auto-pull. Trace why the caller module is started again and the newly pulled application is stopped; done means pullAndReload reloads the intended application without restarting the caller module.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.