Skip to content

fix(build): blockstore.db permission denied after upgrade#1179

Merged
lklimek merged 4 commits into
v1.5-devfrom
fix/docker-update-perms
Oct 1, 2025
Merged

fix(build): blockstore.db permission denied after upgrade#1179
lklimek merged 4 commits into
v1.5-devfrom
fix/docker-update-perms

Conversation

@lklimek
Copy link
Copy Markdown
Collaborator

@lklimek lklimek commented Oct 1, 2025

Issue being fixed or feature implemented

ERROR: failed to create node: unable to initialize blockstore: failed to initialize database: stat /tenderdash/data/blockstore.db: permission denied
Sleeping for 10 seconds as workaround for the busy port problem. See entrypoint code for details.

What was done?

Delete klogd user to ensure we can reuse uid 100 (which was used in previous version of image)

How Has This Been Tested?

On a local devnet

Breaking Changes

None

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

Summary by CodeRabbit

  • New Features

    • None
  • Bug Fixes

    • Standardized container app user UID/GID and removed a conflicting system user to improve compatibility on newer Alpine-based images.
  • Build

    • Adjusted Docker image setup and preserved dependency updates for more reliable runtime behavior.
  • Documentation

    • Consolidated changelog entries into a single 1.5.0 release entry, merging prior dev notes.
  • Chores

    • Updated default application version to 1.5.0.

@lklimek lklimek added this to the v1.5 milestone Oct 1, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 1, 2025

Walkthrough

Consolidates multiple 1.5.0-dev.* changelog entries into a single 1.5.0 release entry, updates the default version constant to "1.5.0", and adjusts Docker image user creation (tmuser UID/GID) and related packaging/notes for Alpine compatibility.

Changes

Cohort / File(s) Summary
Release metadata
CHANGELOG.md, version/version.go
Consolidated 1.5.0-dev.* subsections into a single [1.5.0] entry; updated TMVersionDefault constant from "1.5.0-dev.3" to "1.5.0".
Docker image build
DOCKER/Dockerfile
Reordered and changed user/group setup: remove klogd, create tmuser with uid 100 and gid 1000 and home at $TMHOME; added explanatory comments about Alpine 3.21 UID conflict; adjusted package installs and added /etc/passwd dump for diagnostics.

Sequence Diagram(s)

(omitted — changes are simple file edits and metadata/user setup; no new runtime control flow requiring a sequence diagram)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • QuantumExplorer
  • shumkov

Poem

A hop, a tag, a tidy log—
I tidy notes and tweak the bog.
tmuser now wears uid one-double-oh,
klogd hops off — set to go.
With 1.5.0 I thump in cheer! 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly describes the main issue addressed, namely the blockstore.db permission denied error after upgrade and indicates it’s a build-related fix, aligning with the changes to the Dockerfile and image user configuration.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/docker-update-perms

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
DOCKER/Dockerfile (1)

83-83: Remove trailing whitespace.

There's trailing whitespace after klogd that should be removed for consistency.

Apply this diff:

-    deluser klogd  && \ 
+    deluser klogd && \
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bcf47c9 and e2e4ef0.

📒 Files selected for processing (3)
  • CHANGELOG.md (7 hunks)
  • DOCKER/Dockerfile (1 hunks)
  • version/version.go (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-11-04T12:05:19.844Z
Learnt from: lklimek
PR: dashpay/tenderdash#973
File: .github/workflows/tests.yml:22-22
Timestamp: 2024-11-04T12:05:19.844Z
Learning: Go version 1.23.2 has been released and is valid to use in CI workflows.

Applied to files:

  • CHANGELOG.md
🪛 markdownlint-cli2 (0.18.1)
CHANGELOG.md

1-1: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: test_apps
  • GitHub Check: test_abci_cli
  • GitHub Check: Super linter
  • GitHub Check: tests (04)
  • GitHub Check: tests (01)
  • GitHub Check: tests (02)
  • GitHub Check: tests (00)
  • GitHub Check: e2e-test (dashcore)
  • GitHub Check: e2e-test (rotate)
  • GitHub Check: golangci-lint
🔇 Additional comments (8)
version/version.go (1)

12-12: LGTM! Version bump to stable release.

The update from "1.5.0-dev.3" to "1.5.0" appropriately marks the stable release.

DOCKER/Dockerfile (3)

74-76: Clear documentation of the Alpine 3.21 UID conflict.

The comments effectively explain the klogd UID 100 conflict and the backwards-compatibility requirement.


81-84: Verify that removing klogd has no operational impact.

The workaround deletes the system klogd user to reclaim UID 100 for backwards compatibility. While this addresses the Alpine 3.21 conflict, ensure that:

  1. The klogd service is not required for container logging or kernel message handling
  2. The removal doesn't affect any monitoring or diagnostic capabilities
  3. This approach has been tested on both fresh installations and upgrades from pre-3.21 images

Consider documenting in the PR description or commit message whether klogd functionality is needed and what alternatives (if any) are in place.


79-79: Package additions appear reasonable.

The added packages support Kubernetes deployment (curl, jq) and user convenience (bash). The remaining packages (gmp, libsodium-dev, libstdc++, libpcap) are likely runtime dependencies for tenderdash or the BLS library compiled in earlier stages.

CHANGELOG.md (4)

3-20: LGTM! Proper consolidation of dev releases into stable 1.5.0.

The changelog entries from 1.5.0-dev.1, 1.5.0-dev.2, and 1.5.0-dev.3 have been appropriately consolidated under the 1.5.0 release header. The structure follows standard changelog conventions.


90-137: Dependency updates properly documented.

The extensive list of dependency bumps reflects active maintenance and security updates. The entries follow the established format consistently.


225-287: Minor formatting cleanup in historical entries.

The formatting adjustments to older version sections maintain consistency without altering historical information.


1-1: Release date is correct. Date format matches other entries and a 2025-09-24 release preceding the PR (2025-10-01) is valid.

Comment thread DOCKER/Dockerfile Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e2e4ef0 and eba2e5a.

📒 Files selected for processing (1)
  • DOCKER/Dockerfile (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: build
  • GitHub Check: golangci-lint
  • GitHub Check: tests (03)
  • GitHub Check: tests (01)
  • GitHub Check: tests (02)
  • GitHub Check: tests (05)
  • GitHub Check: e2e-test (rotate)
  • GitHub Check: tests (04)
  • GitHub Check: tests (00)
  • GitHub Check: e2e-test (dashcore)
  • GitHub Check: Build (amd64, linux)
  • GitHub Check: Super linter

Comment thread DOCKER/Dockerfile
@lklimek lklimek merged commit 2646e50 into v1.5-dev Oct 1, 2025
25 of 26 checks passed
@lklimek lklimek deleted the fix/docker-update-perms branch October 1, 2025 09:22
lklimek added a commit that referenced this pull request Oct 1, 2025
* chore(release): update changelog and version to 1.5.0

* fix(build): blockstore.db permission denied after upgrade

* chore: remove debug
lklimek added a commit that referenced this pull request Oct 1, 2025
* fix(blocksync): potential deadlock in updateMonitor

* build(deps): Bump docker/login-action from 3.5.0 to 3.6.0 (#1178)

Bumps [docker/login-action](https://github.com/docker/login-action) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@v3.5.0...v3.6.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 3.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(build): blockstore.db permission denied after upgrade (#1179)

* chore(release): update changelog and version to 1.5.0

* fix(build): blockstore.db permission denied after upgrade

* chore: remove debug

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
lklimek added a commit that referenced this pull request Oct 1, 2025
* build(deps): Bump docker/login-action from 3.5.0 to 3.6.0 (#1178)

Bumps [docker/login-action](https://github.com/docker/login-action) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@v3.5.0...v3.6.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 3.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(build): blockstore.db permission denied after upgrade (#1179)

* chore(release): update changelog and version to 1.5.0

* fix(build): blockstore.db permission denied after upgrade

* chore: remove debug

* chore(release): update changelog and version to 1.5.1

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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