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

Support Ubuntu 24.04 LTS (noble) #7210

Open
legoktm opened this issue Aug 5, 2024 · 11 comments
Open

Support Ubuntu 24.04 LTS (noble) #7210

legoktm opened this issue Aug 5, 2024 · 11 comments
Labels
noble Ubuntu Noble related work

Comments

@legoktm
Copy link
Member

legoktm commented Aug 5, 2024

Description

As our current Ubuntu version, 20.04 LTS aka focal, approaches end of life, SecureDrop should support Ubuntu 24.04 LTS, aka noble numbat.

A separate issue will track work for the upgrade path.

legoktm added a commit that referenced this issue Aug 5, 2024
This is a no-op, but will ensure these steps are run in noble.

Refs #7210.
legoktm added a commit that referenced this issue Aug 5, 2024
Just as a baseline to see how far away we are.

Refs #7210.
legoktm added a commit that referenced this issue Aug 5, 2024
Just as a baseline to see how far away we are.

Some changes:
* switch to enchant-2, which is already in focal

Refs #7210.
legoktm added a commit that referenced this issue Aug 5, 2024
Just as a baseline to see how far away we are.

Some changes:
* switch to enchant-2, which is already in focal

Refs #7210.
@zenmonkeykstop
Copy link
Contributor

zenmonkeykstop commented Sep 11, 2024

Probably should consider:

  • impacts of Python bump
    • (yaay dependency updates for all)
    • picking a minimal Debian/Ubuntu version required for development
    • resyncing version of Ansible used in dev and Tails envs
  • moving to nftables over iptables for server fw rules
  • bumping OSSEC (or switching to Wazuh or similar)
  • setting up sftp on the servers and updating Ansible to use it instead of scp
  • TBD (probably a lot of TBDs)

@legoktm
Copy link
Member Author

legoktm commented Oct 7, 2024

Note that there are no Tor packages for noble yet: https://gitlab.torproject.org/tpo/tpa/team/-/issues/41605

legoktm added a commit that referenced this issue Oct 8, 2024
Just as a baseline to see how far away we are.

Some changes:
* switch to enchant-2, which is already in focal

Refs #7210.
legoktm added a commit that referenced this issue Oct 8, 2024
Just as a baseline to see how far away we are.

Some changes:
* switch to enchant-2, which is already in focal

Refs #7210.
legoktm added a commit that referenced this issue Oct 9, 2024
Just as a baseline to see how far away we are.

Some changes:
* switch to enchant-2, which is already in focal

Refs #7210.
@legoktm
Copy link
Member Author

legoktm commented Oct 10, 2024

Overall things seem smoother than expected on the Python application side (haven't tested ansible, etc. yet). Everything basically works, with small updates needed for alembic and six and some other non-prod dependencies. With the noble-dev branch, basic SI and JI functionality work and all tests pass in CI.

There are a lot of warnings being emittted from flask, etc., so we may want to upgrade them regardless (#6963). But I think we should be able to do everything in a dual-compat way, keeping both focal and noble support without much branching.

@legoktm legoktm added the noble Ubuntu Noble related work label Oct 11, 2024
legoktm added a commit that referenced this issue Oct 15, 2024
Just as a baseline to see how far away we are.

Some changes:
* switch to enchant-2, which is already in focal

Refs #7210.
@legoktm
Copy link
Member Author

legoktm commented Oct 15, 2024

Two updates for today:

legoktm added a commit to freedomofpress/securedrop-apt-test that referenced this issue Oct 16, 2024
This just sets up the noble component, so people can later create
a `core/noble` folder with debs.

The auto-fetching tor part isn't configured since Tor isn't providing
noble packages yet (<freedomofpress/securedrop#7250>).

Refs <freedomofpress/securedrop#7210>.
@legoktm
Copy link
Member Author

legoktm commented Oct 23, 2024

The noble installer is basically the same as focal, except it'll now prompt you whether you want to install the normal Ubuntu server or if you want to install a "minimized" version of it. From [https://askubuntu.com/questions/1511204/what-is-the-difference-between-ubuntu-24-04-default-minimal-installation-and-f](looking online), it seems the difference is https://ubuntu-archive-team.ubuntu.com/seeds/ubuntu.noble/server vs https://ubuntu-archive-team.ubuntu.com/seeds/ubuntu.noble/server-minimal. For now in my testing I'm going with the full version, I don't think we need to bother with the headache minimal versions bring.

@legoktm
Copy link
Member Author

legoktm commented Oct 23, 2024

Also the installer no longer runs a system update, so you have to do it yourself. Our playbooks do that pretty early on so I don't think it's an issue, but just a heads up.

@legoktm
Copy link
Member Author

legoktm commented Oct 23, 2024

I naively tried setting up a noble CI staging job, it didn't work and really didn't even get very far. The bento/ubuntu-24.04 box appears to be a "version 2" box as described at https://vagrant-libvirt.github.io/vagrant-libvirt/boxes.html#box-formats. Running it with our old-ish vagrant version turns into "No image virtual size specified for box" (which is technically correct, it's not in the metadata.json file).

I tried a few workarounds, but nothing easy worked. Tomorrow I'm planning to just try a real prod install instead of fiddling with staging.

@legoktm
Copy link
Member Author

legoktm commented Oct 25, 2024

I've been slowly working through running an install on real hardware and it hasn't been super bad (but also I'm not done yet), all of my fixes are being iteratively pushed to the noble-install branch.

Main gotchas so far:

  • in linux 6.6 or noble, the behavior of sysctl has changed in that once the grsec_lock is set, running sysctl -p to reload settings that are locked will error even if the change is a no-op. I've worked around this for now, but I think we should be moving most of our settings to the kernel package itself so we don't need to manually set them via ansible.
  • iptables is now nftables. This is what I'm working through right now and where I'm taking a break, because the 6.6 kernel I built didn't have all the necessary modules, so rebuilding it now.

@legoktm
Copy link
Member Author

legoktm commented Oct 26, 2024

Now with a fixed kernel package, I was able to get through the initial iptables rules and after fixing some apparmor issues, successfully installed SecureDrop on noble \o/

Definitely a lot of things under the surface that need fixing but it's functional.

@legoktm
Copy link
Member Author

legoktm commented Oct 29, 2024

Definitely a lot of things under the surface that need fixing but it's functional.

I was iteratively working through these in a noble-install branch, I've now started splitting that up into bite-sized PRs that are ready for review. The ones tagged noble are actual unblocking of things, the rest are cleanup that I spotted.

@legoktm
Copy link
Member Author

legoktm commented Nov 7, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
noble Ubuntu Noble related work
Projects
None yet
Development

No branches or pull requests

2 participants