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

Add noble migration instructions #632

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add noble migration instructions #632

wants to merge 1 commit into from

Conversation

legoktm
Copy link
Member

@legoktm legoktm commented Feb 6, 2025

Status

Ready for review

Description of Changes

  • Description: Documentation for the noble migration.

Testing

Release

  • should be published as part of 2.12.0 changes

Checklist (Optional)

  • Doc linting (make docs-lint) passed locally
  • Doc link linting (make docs-linkcheck) passed
  • You have previewed (make docs) docs at http://localhost:8000

@legoktm
Copy link
Member Author

legoktm commented Feb 6, 2025

Still WIP; needs some links and other stuff added. A few placeholders around dates need figuring out. Just wanted to post this so people can see the general direction.

@nathandyer
Copy link
Contributor

Thanks @legoktm, this looks great! I think it covers all the questions I would have as an admin. The only thing missing that I'm seeing is a recommendation for folks to take a backup, just to be on the safe side. Is there any reason we wouldn't want to advise that beforehand?

@legoktm
Copy link
Member Author

legoktm commented Feb 14, 2025

The only thing missing that I'm seeing is a recommendation for folks to take a backup, just to be on the safe side. Is there any reason we wouldn't want to advise that beforehand?

The upgrade script already takes a backup, except it leaves it on the app server. Transferring it to the Admin Workstation could be slow, especially if it's SSH-over-Tor. Of course, people who don't have local access probably benefit the most from having a backup on the AW.

It didn't really hit me until now, but in the manual case, we can just automatically start the backup for them as step 0. And then clean it up once we're done. The server will generate its own backup still, but that's not an issue.

@legoktm legoktm changed the title WIP: Noble migration instructions Add noble migration instructions Feb 19, 2025
@legoktm
Copy link
Member Author

legoktm commented Feb 19, 2025

It didn't really hit me until now, but in the manual case, we can just automatically start the backup for them as step 0. And then clean it up once we're done. The server will generate its own backup still, but that's not an issue.

This ended up being more complicated technically than I anticipated, so for now I've just added a bullet to run the backup script first.

@legoktm
Copy link
Member Author

legoktm commented Feb 19, 2025

Marking this as ready for review. Key highlights:

  • terminology is "semi-automated upgrade" and "fully automated upgrade".
  • I've tentatively set March 21, 2025 as the deadline to semi-automatically upgrade. Depending on the final release time, that gives folks 2-3 weeks. I think we can revisit this after the release and extend it if necessary.
  • Mentioned that we'll publish technical details in the future - I think we should do it before the release, but this allows the docs PR to land first.

@nathandyer
Copy link
Contributor

Hypothetical scenario:

I'm an admin who didn't get a chance to run the semi-automated upgrade prior to March 21.

It is now March 23 and I wish to upgrade, but my servers apparently aren't part of the batch that is receiving the rollout.

Am I safe to run the ./securedrop-admin noble_migration command? What will happen? When my "real" batch comes around, will it attempt the upgrade again or otherwise cause any breakage?

@legoktm
Copy link
Member Author

legoktm commented Feb 19, 2025

Am I safe to run the ./securedrop-admin noble_migration command?

Yes.

What will happen?

The semi-automated upgrade will run as it normally does.

When my "real" batch comes around, will it attempt the upgrade again or otherwise cause any breakage?

Nope, once you're on noble, you're all set, the script won't do anything.


For technical context, https://github.com/freedomofpress/securedrop/blob/develop/securedrop/debian/config/usr/share/securedrop/noble-upgrade.json is the file that controls which upgrades should happen. The semi-automated upgrade works by overwriting this file to say "upgrade everything now" (https://github.com/freedomofpress/securedrop/blob/35e4b2df2b5c3197c605884e078adc6116cffc69/install_files/ansible-base/roles/noble-migration/tasks/main.yml#L13).

So even in the worst-case scenario race condition in which you server receives receives the fully automated instructions to begin the upgrade, and you manually initiate an upgrade at the same time, it'll just work because they use the same instruction file, and start the same systemd unit. (There is some small gotchas around how the ./securedrop-admin playbook expects to see exactly 2 reboots, so if the automated upgrade has already started, and it only sees one reboot, the playbook might hang, but the actual server upgrade will complete fine, and a second playbook run will succeed.

Or to look at it another way, the semi-automated way basically just starts the fully automatic upgrade and then waits for it to finish, so they can't really conflict.

@cfm cfm self-requested a review February 19, 2025 22:14
@nathandyer
Copy link
Contributor

Thanks @legoktm, that's excellent. I wanted to make sure that we didn't need to include any additional language to protect against running that command after the deadline. Since there's no harm in doing so, I think this PR is in good shape.

nathandyer
nathandyer previously approved these changes Feb 19, 2025
Copy link
Contributor

@nathandyer nathandyer left a comment

Choose a reason for hiding this comment

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

This PR LGTM. Leaving open for @cfm to review as well before merging.

Copy link
Member

@cfm cfm left a comment

Choose a reason for hiding this comment

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

Looks good! One non-blocking suggestion inline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Under Review
Development

Successfully merging this pull request may close these issues.

3 participants