Skip to content

Remove aptitude, disable install-recommends - #5793

Merged
rmol merged 1 commit into
developfrom
no-aptitude
Feb 19, 2021
Merged

Remove aptitude, disable install-recommends#5793
rmol merged 1 commit into
developfrom
no-aptitude

Conversation

@conorsch

@conorsch conorsch commented Feb 16, 2021

Copy link
Copy Markdown
Contributor

Status

Ready for review

Description of Changes

We were using "aptitude" in a few places, but it's not really necessary.
We can rely on apt-get for the functionality we need. In fact, it's more
predictable in terms of server state, especially using "dist-upgrade"
and also disabling automatic installation of "recommended" packages.

Testing

  1. Visual review.
  2. Is the slight reduction in community/universe packages worthwhile? I'd say so.

Deployment

The disabling-install-recommends functionality is applied to both Xenial & Focal hosts. The setting is mostly useful during initial install, when "recommended" packages will be pulled in.

The goal of this change is to ensure predictable end state on new Focal installs, with a minimum of unnecessary packages.

@conorsch
conorsch marked this pull request as ready for review February 17, 2021 13:26
@rmol rmol self-assigned this Feb 17, 2021
@eloquence eloquence added this to the 1.8.0 milestone Feb 17, 2021
rmol
rmol previously approved these changes Feb 17, 2021

@rmol rmol left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This worked perfectly in staging. There were no unexpected errors in the configuration tests. I was able to submit, then download and decrypt the submission. The background worker processes were functioning.

On hardware I did run into a problem with the order of operations when setting up the FPF apt repo. Since Focal packages are only on apt-test.freedom.press at this point, I had to adjust my working copy before running the playbook, and the current order overwrites the keyring when securedrop-keyring is installed. I appended a commit moving the configuration of the custom key to the end of that playbook. After that the installation completed without error, and the servers again passed manual inspection. The configuration tests do have a number of expected failures, but again none of them are due to these changes.

apt:
upgrade: safe
upgrade: dist
install_recommends: no

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is install_recommends: no necessary here after installing the new 80securedrop.j2 with APT::Install-Recommends "false";?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is not, it's completely superfluous. I started by adding install_recommends: no, then realized it would take a lot of edits. So provided that the 80securedrop file gets written before the upgrade, as here, then we can remove the install_recommends parameter.

@conorsch

Copy link
Copy Markdown
Contributor Author

On hardware I did run into a problem with the order of operations when setting up the FPF apt repo. Since Focal packages are only on apt-test.freedom.press at this point, I had to adjust my working copy before running the playbook, and the current order overwrites the keyring when securedrop-keyring is installed.

I'm thinking that deserves its own issue, @rmol, simply because the whole team is about to encounter that same problem during Focal QA. Up to you on how to handle this PR. I'd recommend adding #5793 (comment) and squashing it into the primary commit, then experimenting with d279727 in a separate branch. All that after #5799, of course, so we can trust CI again.

@rmol

rmol commented Feb 17, 2021

Copy link
Copy Markdown
Contributor

Good call. I've removed the install_recommends: no and squashed into the original commit. I've got tests for an apt bootstrapping fix running, should have a PR for that tomorrow.

We were using "aptitude" in a few places, but it's not really necessary.
We can rely on apt-get for the functionality we need. In fact, it's more
predictable in terms of server state, especially using "dist-upgrade"
and also disabling automatic installation of "recommended" packages.
@rmol
rmol merged commit 55fb4f7 into develop Feb 19, 2021
@rmol
rmol deleted the no-aptitude branch February 19, 2021 21:33
@kushaldas kushaldas mentioned this pull request Feb 26, 2021
27 tasks
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.

3 participants