Skip to content

fix(dashmate): set permissions for dashcore log file - #1037

Merged
shumkov merged 13 commits into
v0.24-devfrom
fix/dashmate-dashcore-log-perms
May 8, 2023
Merged

shumkov merged 13 commits into
v0.24-devfrom
fix/dashmate-dashcore-log-perms

Conversation

@pshenmic

@pshenmic pshenmic commented May 5, 2023

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

Set permissions for dashcore log files to R+W for anyone. This is needed because we dashcore container being run as its own user (1000:1000), and dashmate cannot change file owners without sudo. This PR explicitly sets 666 mode for dashcore log file (~/.dashmate/logs//core.log)

What was done?

  • Added chmod command in the ensureFileMountExists
  • Set 666 mode for dashcore log files

How Has This Been Tested?

  • Locally
  • Devnet

Breaking Changes

No

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@pshenmic pshenmic added this to the v0.24.0 milestone May 5, 2023
@pshenmic
pshenmic requested review from antouhou and shumkov as code owners May 5, 2023 21:30
@pshenmic
pshenmic marked this pull request as draft May 5, 2023 21:30
@pshenmic

pshenmic commented May 6, 2023

Copy link
Copy Markdown
Contributor Author

This issue does not reproduces on the macos, because of the tricky permissions system. This issue reproduces on the Ubuntu, devnet as an example. After start, core container continuously crash with message Error: Could not open debug log file /var/log/dash/core.log

Test results:

  1. I tested this branch on my local computer, dashcore container is working in both regular and local modes
  2. Deploying nodes with v0.24-dev crash my dashcore containers on hpmns in the devnet. After redeploying my devnet with this branch applied, my dashcore containers start working correctly.

@pshenmic
pshenmic marked this pull request as ready for review May 6, 2023 15:14
@pshenmic
pshenmic marked this pull request as draft May 6, 2023 15:19
@pshenmic
pshenmic marked this pull request as ready for review May 6, 2023 19:09

@shumkov shumkov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@shumkov
shumkov merged commit f1c9b45 into v0.24-dev May 8, 2023
@shumkov
shumkov deleted the fix/dashmate-dashcore-log-perms branch May 8, 2023 12:25
antouhou pushed a commit that referenced this pull request May 11, 2023
Co-authored-by: Ivan Shumkov <[email protected]>
(cherry picked from commit f1c9b45)
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.

2 participants