Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Vault fails to provision using vagrant centos7 #188

Open
ghost opened this issue Feb 27, 2020 · 3 comments
Open

Vault fails to provision using vagrant centos7 #188

ghost opened this issue Feb 27, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Feb 27, 2020

While using Vagrant with a centos/7 box. The provisioning script install-vault would fail due to the mlock function.

I found that vault is being placed in /usr/local/bin/vault while mlock needs it in /usr/bin to pass with an exit 0.

Not sure when to make the change in the script to resolve this.

@brikis98
Copy link
Collaborator

Is this specific to CentOS?

@ghost
Copy link
Author

ghost commented Feb 28, 2020

@brikis98 I have only tested with centos/7 vagrantbox

I noticed later on that if I do this /opt/vault/bin/vault server -dev vagrant will no longer throw an error.

Here is a snip of my provision section of my vagrantfile. If I remove the last line, I will get the mlock error.

echo 'export PATH="/usr/local/bin:$PATH"' >> "/root/.bashrc"
git clone --branch v0.13.6 https://github.com/hashicorp/terraform-aws-vault.git
terraform-aws-vault/modules/install-vault/install-vault --version '1.3.2+ent.hsm'
**/opt/vault/bin/vault server -dev**

@brikis98
Copy link
Collaborator

brikis98 commented Mar 2, 2020

Before changing this for everyone, we'll need to understand if this only affects CentOS? Or even just the Vagrant image for CentOS? If someone wants to do that research and contribute a fix (if necessary), a PR is welcome!

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

No branches or pull requests

1 participant