hashicorp / hashicorp/vault-testing-stepwise

Vault cannot mount plugin: no such file or directory

Open
#30 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
0
Forks
4
Avg merge
18h 17m
Merged PRs (30d)
1

Description

I am using the latest version of stepwise the docker environment.

Stepwise is set up as follows:
```go
envOptions := &stepwise.MountOptions{
RegistryName: "myplugin",
PluginType: api.PluginTypeSecrets,
PluginName: "vault-plugin-secrets-myplugin",
MountPathPrefix: "myplugin",
}

roleName := "vault-stepwise-user-role"
cred := new(string)
stepwise.Run(t, stepwise.Case{
Precheck: func() { testAccPreCheck(t) },
Environment: dockerEnvironment.NewEnvironment("myplugin", envOptions),
Steps: []stepwise.Step{
testAccConfig(t),
testAccUserRole(t, roleName),
testAccUserRoleRead(t, roleName),
testAccUserCredRead(t, roleName, cred),
},
})
```
Stepwise fails to start with the following error:
```
stepwise_test.go:40: Error making API request.

URL: POST https://127.0.0.1:32768/v1/sys/mounts/myplugin_4818a767-82c9-3e51-d6d3-34b12a1ec883
Code: 400. Errors:

* invalid backend version: 2 errors occurred:
* fork/exec /vault/config/vault-plugin-myplugin: no such file or directory
* fork/exec /vault/config/vault-plugin-myplugin: no such file or directory
```

When I enter the docker container, I confirmed that `/vault/config/vault-plugin-myplugin` exists and is the right size.

Wondering if this is because the plugin is built on Ubuntu, but the Vault image uses alpine linux, leading to some compatibility problems.

I think [CompilePlugin](https://github.com/hashicorp/vault-testing-stepwise/blob/main/helpers.go#L29) needs to build the plugin statically and with CGO disabled.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.