Uploaded image for project: 'Server Deployments and Scale'
  1. Server Deployments and Scale
  2. SCALE-151

In the Bitbucket Helm chart, provide an option to redirect core dump files to a different location or to disable core dump generation entirely.

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • None
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Current Behaviour

      In Bitbucket, sometimes git processes crash, creating large core dump files inside the repositories' locations on the Bitbucket server. This will increase the size of the repositories on the server side. Within Linux, the location of core dumps is controlled by the core_pattern file in /proc/sys/kernel/. As documented in the KB here, the location of the core files can be re-directed using the kernel.core_pattern options. With Kubernetes currently, no such option is available to redirect or entirely disable the core dump.

      Suggestion

      Provide an option in the helm chart to redirect the core dump location outside the repository location and possibly separate PVC.

      Workaround

      Currently, it's not possible to modify the entrypoint argument on the pod in the Bitbucket helm chart. However, the template can be changed to disable the core dump on the source itself. The full source of the Bitbucket statefulset.yaml definition can be obtained from here. Update the Bitbucket containers sections as per the following:

          containers:
            - name: {{ if .Values.bitbucket.useHelmReleaseNameAsContainerName}}{{ include "common.names.fullname" . }}{{ else }}{{ .Chart.Name }}{{ end }}
              command: ["sh"]
              args: ["-c", "ulimit -c 0; exec /entrypoint.py"]
              image: {{ include "bitbucket.image" . | quote }}
              imagePullPolicy: {{ .Values.image.pullPolicy }}
              ports:
      ...
      

      Required to redeploy the helm charts after making changes.

            [SCALE-151] In the Bitbucket Helm chart, provide an option to redirect core dump files to a different location or to disable core dump generation entirely.

            Moga made changes -
            Description Original: h3. Issue Summary

            In the Bitbucket Helm chart, provide an option to redirect core dump files to a different location or to disable core dump generation entirely.
            h3. Issue Description:

            In Bitbucket sometimes git process would crash creating large core dump files inside repositories in Bitbucket server. This will cause the size increase of the repos in the server side.



            Within the linux VM The location of core dumps is controlled by the {{core_pattern}} file in {{/proc/sys/kernel/ }}

            As documented in the KB [here|https://support.atlassian.com/bitbucket-data-center/kb/bitbucket-server-git-bare-repositories-contains-many-core-files/] the location of the core files can be re-directed using the kernel.core_pattern options

            With Kubernetes currently, there is no such option available to re-direct or disable the core dump all altogether 
            h4. Suggestion: 

            Provide an option in helm chart to re-direct the core dump location outside the repository location and possibly to separate PVC
            h3. Workaround
            Currently, we don't allow the modification of the `entrypoint` argument on the pod in our helm charts.

            However, the template can be changed to disable the core dump as below:

            You can see the full source of the Bitbucket statefulset.yaml definition: [https://github.com/atlassian/data-center-helm-charts/blob/main/src/main/charts/bitbucket/templates/statefulset.yaml]

            Find the section:
            {code:java}
                  containers:
                    - name: {{ if .Values.bitbucket.useHelmReleaseNameAsContainerName}}{{ include "common.names.fullname" . }}{{ else }}{{ .Chart.Name }}{{ end }}
            {code}
            and under {{name}} add the following:
            {code:java}
                      command: ["sh"]
                      args: ["-c", "ulimit -c 0; exec /entrypoint.py"]
            {code}
            then I think they will see that it works. They have to of course redeploy their helm charts after they made that change.

            Example:
            {code:java}
            ...
                  containers:
                    - name: {{ if .Values.bitbucket.useHelmReleaseNameAsContainerName}}{{ include "common.names.fullname" . }}{{ else }}{{ .Chart.Name }}{{ end }}
                      command: ["sh"]
                      args: ["-c", "ulimit -c 0; exec /entrypoint.py"]
                      image: {{ include "bitbucket.image" . | quote }}
                      imagePullPolicy: {{ .Values.image.pullPolicy }}
                      ports:
            ...
            {code}
             
            New: h3. Current Behaviour

            In Bitbucket, sometimes git processes crash, creating large core dump files inside the repositories' locations on the Bitbucket server. This will increase the size of the repositories on the server side. Within Linux, the location of core dumps is controlled by the {{core_pattern}} file in {{/proc/sys/kernel/}}. As documented in the KB [here|https://support.atlassian.com/bitbucket-data-center/kb/bitbucket-server-git-bare-repositories-contains-many-core-files], the location of the core files can be re-directed using the {{kernel.core_pattern}} options. With Kubernetes currently, no such option is available to redirect or entirely disable the core dump.

            h3. Suggestion

            Provide an option in the helm chart to redirect the core dump location outside the repository location and possibly separate PVC.

            h3. Workaround

            Currently, it's not possible to modify the {{entrypoint}} argument on the pod in the Bitbucket helm chart. However, the template can be changed to disable the core dump on the source itself. The full source of the Bitbucket {{statefulset.yaml}} definition can be obtained from [here|https://github.com/atlassian/data-center-helm-charts/blob/main/src/main/charts/bitbucket/templates/statefulset.yaml]. Update the [Bitbucket {{containers}} sections|https://github.com/atlassian/data-center-helm-charts/blob/c378d309ca8bfea3027a0403e9263e26b15f75b2/src/main/charts/bitbucket/templates/statefulset.yaml#L128] as per the following:
            {code:java}
                containers:
                  - name: {{ if .Values.bitbucket.useHelmReleaseNameAsContainerName}}{{ include "common.names.fullname" . }}{{ else }}{{ .Chart.Name }}{{ end }}
                    command: ["sh"]
                    args: ["-c", "ulimit -c 0; exec /entrypoint.py"]
                    image: {{ include "bitbucket.image" . | quote }}
                    imagePullPolicy: {{ .Values.image.pullPolicy }}
                    ports:
            ...
            {code}
            (i) Required to redeploy the helm charts after making changes.
            Prashant Mulya created issue -

              Unassigned Unassigned
              3833708f677e Prashant Mulya
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: