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

fix: docker: Dockerfile import snapshot #11579

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

vidbregar
Copy link
Contributor

Related Issues

Proposed Changes

  • Updates Dockerfile to default to a working snapshot endpoint
    curl -I https://snapshots.mainnet.filops.net/minimal/latest
    HTTP/1.1 503 Service Unavailable: Back-end server is at capacity
    Connection: keep-alive
      curl -I https://forest-archive.chainsafe.dev/latest/mainnet/
      HTTP/2 302
      ...
  • Since 1.25.2, entrypoint script requires yes to import the snapshot

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • If the PR affects users (e.g., new feature, bug fix, system requirements change), update the CHANGELOG.md and add details to the UNRELEASED section.
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

GATE="$LOTUS_PATH"/date_initialized
# Don't init if already initialized.
if [ ! -f "$GATE" ]; then
echo importing minimal snapshot
/usr/local/bin/lotus daemon --import-snapshot "$DOCKER_LOTUS_IMPORT_SNAPSHOT" --halt-after-import
printf 'yes\n' | /usr/local/bin/lotus daemon --import-snapshot "$DOCKER_LOTUS_IMPORT_SNAPSHOT" --halt-after-import
Copy link
Member

Choose a reason for hiding this comment

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

This actually seems like a bug. We should only be prompting the user if there's actually a chain to remove.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Fixed on master, this change shouldn't be necessary anymore. Although it may help to pass --remove-existing-chain=false (which will cause an immediate failure if there's an existing change, which there shouldn't be given that the node isn't initialized).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rebased and added the flag. Although, I'm not sure what happened to the unreleased changelog.

@Stebalien
Copy link
Member

@vidbregar can you rebase on master and address my comment?

@Stebalien Stebalien merged commit e430d33 into filecoin-project:master Jan 19, 2024
88 checks passed
@Stebalien
Copy link
Member

Thanks!

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