-
Notifications
You must be signed in to change notification settings - Fork 686
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 a basic noble migration check script #7334
base: develop
Are you sure you want to change the base?
Conversation
I'm still thinking of a few more checks to add, but I think this is ready for review + merge and other checks can be added incrementally. |
securedrop/debian/config/usr/bin/securedrop-noble-migration-check.py
Outdated
Show resolved
Hide resolved
91a2314
to
d685227
Compare
I plan to port this to Rust based on #7332 (comment). |
d685227
to
b2408f6
Compare
Now that this is in Rust, need to do a few more cargo vet reviews:
The main new dependency triggering reviews is |
ffbfd35
to
814c084
Compare
In the end we only needed one audit for zerofrom-derive 0.1.3 -> 0.1.4 (done); I hadn't configured the new crate to use the safe-to-run standard. Went a bit out of the way to upgrade cargo-vet since a newer version was available. |
814c084
to
7f463f4
Compare
Marking this as ready for review, I went through and added a bunch of docs and tried to make the error handling a bit more robust and obvious. Staging CI will fail until the new kernels are on apt-test. |
Establish a folder where we can build Rust binaries that will be shipped in the securedrop-config deb. That package is now architecture-dependent and only built for amd64. We are using Rust because a statically compiled binary is going to be the most robust option during a system upgrade when Python itself is being removed and installed (not to mention all the other Rust benefits).
ee7bf43
to
3f9ea29
Compare
On staging we get:
Free space is understandable, I'll have it ignore that one. I'm confused by ssh, that should've been resolved. Will add some debug code 🤔 |
fade6db
to
e471c94
Compare
I had a bug in my getent output parser when I ported the logic from Python to Rust. I have paid penance by adding a unit/regression test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added some comments. Haven't tested yet tho.
println!("All ready for migration!"); | ||
} else { | ||
println!( | ||
"Some errors were found that will block migration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing to consider would be adding a "getting ready for Noble" page in the docs, that lists steps admins should take, and linking to that here as well/instead of the support link. Giving folks the tools to solve problems themselves drives down our support overhead and also helps admins who don't want to work with FPF for whatever reason.
(Just added freedomofpress/securedrop-docs#610)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will spend some time working on the documentation and agree that we should link it here, but don't think it should hold up review/approval of this since it'll be trivial to add in afterwards but before the release.
7645507
to
0024364
Compare
Hm, and CI is failing now that I've removed the apt-test/apt-qa URLs... 🤔 |
0024364
to
0eb8a4c
Compare
They just yanked the |
0eb8a4c
to
1b59c9f
Compare
Perform a number of checks to ensure the system is ready for the noble migration. The results are written to a JSON file in /etc/ that other things like the JI and the upgrade script itself can read from. The script is run hourly on a systemd timer but can also be run interactively for administrators who want slightly more details. Refs #7322.
85720a7
to
7f8479a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM based on visual review and testing in staging.
Status
Ready for review
Description of Changes
Perform a number of checks to ensure the system is ready for the noble migration. The results are written to a JSON file in /etc/ that other things like the JI and the upgrade script itself can read from.
The script is run hourly on a systemd timer but can also be run interactively for administrators who want slightly more details.
For ease of review, this is split into two commits: first set up all the configuration needed to ship Rust code in the securedrop-config package; and then second the actual check script, Rust dependencies, and systemd units.
Out of scope for this PR: OSSEC alerts, JI banner.
Refs #7322.
Testing
How should the reviewer test this PR?
Deployment
Any special considerations for deployment? n/a
Checklist