Skip to content

fix(script): fix changing the system core pattern#358

Merged
kmova merged 3 commits intoopenebs-archive:masterfrom
akhilerm:core-pattern-fix
Dec 27, 2019
Merged

fix(script): fix changing the system core pattern#358
kmova merged 3 commits intoopenebs-archive:masterfrom
akhilerm:core-pattern-fix

Conversation

@akhilerm
Copy link
Copy Markdown
Contributor

Earlier NDM used to rewrite the system core pattern so that the core
dump is available in the persistent /var/openebs/sparse directory.
But this will cause all process on the host to write core files to that directory.
Now NDM process will be launched from the openebs directory, so core
files will get automatically written to the $PWD. This will help to
remove changing the system core pattern.

Signed-off-by: Akhil Mohan akhil.mohan@mayadata.io

earlier NDM used to rewrite the system core pattern so that the core
dump is available in the persistent /var/openebs/sparse directory.
But this will cause all process to write core files to that directory.
Now NDM process will be launched from the openebs directory, so core
files will get automatically written to the $PWD. This will help to
remove changing the system core pattern.

Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #358 into master will decrease coverage by 0.49%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #358     +/-   ##
=========================================
- Coverage   51.51%   51.02%   -0.5%     
=========================================
  Files          55       55             
  Lines        2634     2634             
=========================================
- Hits         1357     1344     -13     
- Misses       1170     1180     +10     
- Partials      107      110      +3
Impacted Files Coverage Δ
cmd/ndm_daemonset/probe/eventhandler.go 46.05% <0%> (-7.9%) ⬇️
cmd/ndm_daemonset/probe/udevprobe.go 60.3% <0%> (-5.35%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec102f7...ebb1be2. Read the comment docs.

@kmova kmova merged commit 1c5a671 into openebs-archive:master Dec 27, 2019
@akhilerm akhilerm deleted the core-pattern-fix branch December 30, 2019 05:22
echo "[entrypoint.sh] creating /var/openebs/sparse if not exists."
mkdir -p /var/openebs/sparse
echo "[entrypoint.sh] changing directory to /var/openebs/sparse"
cd /var/openebs/sparse || exit
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will it work if SPARSE_FILE_DIR env is different than /var/openebs/sparse? should we use SPARSE_FILE_DIR env instead /var/openebs/sparse?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the mountPath is dependent. SPARSE_FILE_DIR is the directory inside the container .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, so if I have changed that path to something else what will happen? since in the entrypint.sh it is fixed to /var/openebs/sparse.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the mountPath is also changed, the core dump wont be persisted. Will raise a PR to fix it. The SPARSE_FILE_DIR and mountPath should always be the same.

akhilerm added a commit to akhilerm/node-disk-manager that referenced this pull request Jan 3, 2020
…rchive#358)

Earlier NDM used to rewrite the system core pattern so that the core
dump is available in the persistent /var/openebs/sparse directory.
But this will cause all process to write core files to that directory.
Now NDM process will be launched from the openebs directory, so core
files will get automatically written to the $PWD. This will help to
remove changing the system core pattern.

Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
kmova pushed a commit that referenced this pull request Jan 6, 2020
Earlier NDM used to rewrite the system core pattern so that the core
dump is available in the persistent /var/openebs/sparse directory.
But this will cause all process to write core files to that directory.
Now NDM process will be launched from the openebs directory, so core
files will get automatically written to the $PWD. This will help to
remove changing the system core pattern.

Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
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.

4 participants