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

bugfix: add judge for whether pidfile path is given #1374

Merged
merged 1 commit into from
May 23, 2018
Merged

bugfix: add judge for whether pidfile path is given #1374

merged 1 commit into from
May 23, 2018

Conversation

Ace-Tang
Copy link
Contributor

Signed-off-by: Ace-Tang aceapril@126.com

Ⅰ. Describe what this PR did

save pid into pidfile only when pidfile path is given, make code more reasonable.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how you did it

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@pouchrobot pouchrobot added kind/bug This is bug report for project size/S labels May 22, 2018
@codecov-io
Copy link

Codecov Report

Merging #1374 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1374   +/-   ##
=======================================
  Coverage   17.29%   17.29%           
=======================================
  Files         190      190           
  Lines       11913    11913           
=======================================
  Hits         2060     2060           
  Misses       9706     9706           
  Partials      147      147

@HusterWan
Copy link
Contributor

@Ace-Tang please create PR base on branch 0.5.x, thanks a lot !!!

@Ace-Tang Ace-Tang changed the base branch from master to 0.5.x May 22, 2018 12:19
@Ace-Tang Ace-Tang changed the base branch from 0.5.x to master May 22, 2018 12:19
Signed-off-by: Ace-Tang <aceapril@126.com>
@Ace-Tang Ace-Tang changed the base branch from master to 0.5.x May 22, 2018 12:24
@HusterWan HusterWan added this to the v0.5.0-milestone milestone May 22, 2018
defer func() {
if err := os.Remove(cfg.Pidfile); err != nil {
logrus.Errorf("failed to delete pidfile: %s", err)
if cfg.Pidfile != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Pidfile exists, do we need to truncate it's content ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at utils.NewPidfile, it won't go ahead when pidfile has value, it a common logic most process deal with.

@HusterWan
Copy link
Contributor

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label May 23, 2018
@HusterWan HusterWan merged commit 89ac7b0 into AliyunContainerService:0.5.x May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is bug report for project LGTM one maintainer or community participant agrees to merge the pull reuqest. size/S size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants