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

Plugin process not exited properly after server process exit with error #2332

Closed
lapwingcloud opened this issue Aug 8, 2022 · 2 comments · Fixed by #2333
Closed

Plugin process not exited properly after server process exit with error #2332

lapwingcloud opened this issue Aug 8, 2022 · 2 comments · Fixed by #2333

Comments

@lapwingcloud
Copy link

lapwingcloud commented Aug 8, 2022

Describe the bug

image

To Reproduce
See above screenshot

When the database not initialized, run sudo -u boundary /usr/bin/boundary server -config /etc/boundary/controller.hcl twice

config

disable_mlock = true

controller {
  name = "vm-tools-stg-boundary-main000000"
  database {
    url = "[redacted]"
  }
}

listener "tcp" {
  purpose = "api"
  address = "10.45.100.5"

  tls_disable = true
}

listener "tcp" {
  purpose = "cluster"
  address = "127.0.0.1"

  tls_disable = true
}

plugins {
  execution_dir = "/var/run/boundary/plugin-exec"
}

kms "azurekeyvault" {
  purpose        = "root"
  tenant_id      = "[redacted]"
  client_id      = "[redacted]"
  vault_name     = "[redacted]"
  key_name       = "boundary-root"
}

Expected behavior
The second time it should return the same error

The database has not been initialized. Please run 'boundary database init'.

instead of

Error parsing KMS configuration: error writing out plugin for execution: open /var/run/boundary/plugin-exec/boundary-plugin-kms-azurekeyvault.gz: text file busy

Additional context
Add any other context about the problem here.

@lapwingcloud
Copy link
Author

seems like it only happens in certain scenario, if the boundary server is fully started , then stopping the server process will stop the plugin process as well

@louisruch
Copy link
Collaborator

@jchenship thanks for reporting this issue. I was able to reproduce it locally and I have a PR up that fixes this and some other situations that would produce the same/similar error. You might notice that we also did not cleanup the plugins after running database init even without an error.

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 a pull request may close this issue.

2 participants