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

Add 'pid_file' config option #3321

Merged
merged 5 commits into from
Sep 16, 2017
Merged

Add 'pid_file' config option #3321

merged 5 commits into from
Sep 16, 2017

Conversation

vishalnayak
Copy link
Member

No description provided.

@@ -50,6 +50,8 @@ import (

// ServerCommand is a Command that starts the Vault server.
type ServerCommand struct {
Config *server.Config
Copy link
Member

Choose a reason for hiding this comment

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

This seems unnecessary, why not just give the path to storePid?

Copy link
Member Author

Choose a reason for hiding this comment

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

We could. Fixed.

Copy link
Contributor

@chrishoffman chrishoffman left a comment

Choose a reason for hiding this comment

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

I think we need to clean up the pid file on clean shutdown. It looks like we create it but never remove it on shutdown.

@jefferai jefferai added this to the 0.8.3 milestone Sep 13, 2017
@vishalnayak
Copy link
Member Author

@chrishoffman I'm now removing it on shutdown.

chrishoffman
chrishoffman previously approved these changes Sep 14, 2017
}

// Open the PID file
pidFile, err := os.OpenFile(pidPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0666)
Copy link
Member

Choose a reason for hiding this comment

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

These permissions are too open -- certainly the file should not be world-writable. I suggest 0644.

@@ -105,6 +105,9 @@ to specify where the configuration is.
the standard Vault API address will automatically redirect there. This can also
be provided via the environment variable `VAULT_UI`.

- `pid_file` `(string: "")` - Path to the file in which Vault server PID should
Copy link
Member

Choose a reason for hiding this comment

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

I'd say "Path to the file in which the Vault server's Process ID (PID) should be stored."

Just in case people think PID is something Vault-y. You never know...

Copy link
Member

@jefferai jefferai left a comment

Choose a reason for hiding this comment

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

Two comments, feel free to merge after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants