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

feat: script to update the datastore on c1 and selectively run the migration #39

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

gvelez17
Copy link
Contributor

@gvelez17 gvelez17 commented Oct 11, 2024

This script will

  1. find the latest common snapshot between go-ipfs and c1 nodes

  2. create a new snapshot on go-ipfs and send to c1 node

  3. on c1 node, generate a list of modified blocks

  4. run the migration on the list of modified blocks and track errors

the c1 migration logs are piped to a file and include checkpointing

@gvelez17

This comment was marked as outdated.

@gvelez17

This comment was marked as outdated.

Comment on lines +34 to +42
- name: Find latest common snapshot
ansible.builtin.shell:
cmd: |
kubo_snaps="{{ kubo_snapshots.stdout_lines | join('\n') }}"
c1_snaps="{{ c1_snapshots.stdout_lines | join('\n') }}"
echo "$kubo_snaps" | grep -F "$(echo "$c1_snaps" | sed 's/migrationpool\/data-store@//')" | tail -n 1
register: common_snapshot
failed_when: common_snapshot.rc != 0 or common_snapshot.stdout == ""
delegate_to: localhost
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this look for the latest common migrated snapshot? We don't just want to find the latest common snapshot, we want to find the one we know for sure was migrated last. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, i don't think so, i think we just want to bring over everything since the latest common

if we make holes we can fix them manually, we want this whole process done in the next day or so

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think the main thing is to keep the files, and snapshots, and to have each filename labeled by date range so that the data is all available for reruns

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