-
Notifications
You must be signed in to change notification settings - Fork 696
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
[xenial] Updated release-upgrades Prompt for Trusty, Xenial as appropriate #4116
Conversation
ff73169
to
a9ca2b8
Compare
a9ca2b8
to
047a15b
Compare
These changes appear well structured, based on visual review. Will step through the test plan to validate functionality. Flagging that we should add config tests to verify the LTS upgrade strings are set correctly on both Trusty & Xenial. |
We should also verify as part of review that the OSSEC notification that is triggered includes the expected text: |
Stepped through Trusty test plan today:
Will leave these VMs running overnight to see if OSSEC emails contain the correct text (although I used staging machines, I made sure to configure OSSEC via email). Given that the |
Validates that Trusty should honor an upgrade request to Xenial, but Xenial should not honor upgrade requests to Bionic.
Went through the Xenial test plan, LGTM:
Also did an upgrade test under trusty, since these will be shipped to Trusty installs via the securedrop-config package, LGTM:
I am (seemingly unrelated) error while upgrading, likely introduced by #4080, for which I have opened #4125 |
Happy to do so, @heartsucker . I am also seeing the same behavior @conorsch is experiencing when upgrading in trusty: After running the cron.weekly updater-notifier-common, |
I'm in the middle of another PR review right now so I can't start up a VM, but I think what's happening is that the permissions are wrong on that file and it's breaking things because cron cant' access it. |
I think what's happening is in some cases the |
I just added a line that should trigger all the above logic. If that's not actually the fix, feel free to remove it. |
Codecov Report
@@ Coverage Diff @@
## develop #4116 +/- ##
========================================
Coverage 84.77% 84.77%
========================================
Files 43 43
Lines 2779 2779
Branches 303 303
========================================
Hits 2356 2356
Misses 355 355
Partials 68 68 Continue to review full report at Codecov.
|
Confirming that the Why the Have not yet verified the Xenial story functionality, nor confirmed the OSSEC emails, so more testing still required. |
Thanks for the fix @heartsucker ! I can also confim that The final piece is the ossec alert and unfortunately I still have not received an ossec alert requesting me to upgrade. I do get a syscheck alert informing me that the file was changed. I can't seem to find a relevant ossec alert/rule for this in the upstream repo ( https://github.com/ossec/ossec-hids/tree/master/etc/rules) The easiest path would be to add a custom ossec notification (that would require xenial-specific logic to remove):
|
That Python script will download the |
About that OSSEC rule, I think we could ship either two different deb packges or two different conf files and then move the right one into place on |
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.
Worked as expected, approved.
-
Build Trusty
-
Install on Trusty box
-
Verify that
/etc/update-manager/release-upgrades
containsPrompt=lts
-
Verify that
/usr/lib/ubuntu-release-upgrader/check-new-release
contains "Visit https://securedrop.org/xenial-upgrade for more information" -
Build xenial
-
Install on xenial box
-
Verify that
/etc/update-manager/release-upgrades
containsPrompt=never
-
Verify that
/usr/lib/ubuntu-release-upgrader/check-new-release
does not contain "Visit https://securedrop.org/xenial-upgrade for more information" (and neither does/var/lib/ubuntu-release-upgrader/release-upgrade-available
if it exits)
So as this stands, we don't have the OSSEC rule for this. Since @conorsch seems to do the most Debian packaging stuff here, it would be good to get your feedback on whether or not we should update those rules via some |
Given the short timeline for 0.12.0 and the complexities around the management of separate ossec rules, we could also write a very simple cron job on the mon server that simply calls |
@emkll, take a peeksy at the change I pushed. This should do the thing. |
@heartsucker thanks for the change. We've discussed this in the engineering meeting and concluded that perhaps more research was required on the ossec front. Any objections to removing ce49036 and opening a follow up to monitor/update the ossec rule? We can keep the scope of this PR to only the release-upgrades for the purposes of admins running |
I think that's reasonable. I'll for push with this change yanked. |
ce49036
to
cf14d40
Compare
@kushaldas Can you stamp this one again? I added a commit since your review, then removed it, so it's unchanged since your last approval. |
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.
Restampping.
Status
Ready for review
Description of Changes
Fixes #4104
Update the
Prompt
in the release manage file depending on system codename. Additionally, attempt to rewrite the OSSEC alerts to prevent admins from runningdo-release-upgrade
and breaking everything.Testing
/etc/update-manager/release-upgrades
containsPrompt=lts
/usr/lib/ubuntu-release-upgrader/check-new-release
contains "Visit https://securedrop.org/xenial-upgrade for more information" (and so does/var/lib/ubuntu-release-upgrader/release-upgrade-available
if it exits)/etc/update-manager/release-upgrades
containsPrompt=never
/usr/lib/ubuntu-release-upgrader/check-new-release
does not contain "Visit https://securedrop.org/xenial-upgrade for more information" (and neither does/var/lib/ubuntu-release-upgrader/release-upgrade-available
if it exits)Deployment
All installs on Trusty will have files modified to the state SD requires. All installs on Xenial will have their files reverted to the default state.
Checklist
If you made changes to the system configuration:
If you made non-trivial code changes: