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

Changes to allow core/vstack in the container #230

Merged
merged 1 commit into from
Jul 5, 2022

Conversation

spilchen
Copy link
Collaborator

@spilchen spilchen commented Jul 4, 2022

There are two changes in the PR to aid in debugging:

  • Added the SYS_PTRACE capability and gdb to the container. This allows us to run vstack to collect stacks of the vertica process.
  • Added an option to allow a custom securityContext to be specified. This was necessary since you need to run in privileged mode to set the core ulimit in order to collect core files in the container. Note, by default the vertica container still does not run in privileged mode. This new option is just to allow us to run in that mode.

To capture core files, the following needs to be done:

  1. Set the privileged mode in the container. This can be set now with the securityContext parameter like this:
apiVersion: vertica.com/v1beta1
kind: VerticaDB
metadata:
  name: v
spec:
  image: "vertica/vertica-k8s:12.0.0-0-minimal"
  communal:
    path: "s3://nimbusdb/db"
    endpoint: "http://minio"
    credentialSecret: s3-auth
    includeUIDInPath: true
  kSafety: "0"
  securityContext:
    privileged: true
  subclusters:
    - name: defaultsubcluster
      size: 1
  1. Ensure /proc/sys/kernel/core_pattern is set to core in the host machine. This file is not namespaced, so when setting this value in the host it effects all containers running on that host.
$ cat /proc/sys/kernel/core_pattern 
core

If vertica does generate a core, a message is written to the vertica.log to indicate where the file is written too.

@spilchen spilchen self-assigned this Jul 4, 2022
@spilchen spilchen merged commit 02940aa into vertica:main Jul 5, 2022
@spilchen spilchen deleted the core-vstack branch July 5, 2022 14:07
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.

1 participant