Volume management fixes #45

Merged
inex merged 8 commits from fix/do-volumes into master 2023-08-02 15:16:13 +03:00

This PR fixes issues related to volume handling on DigitalOcean. This include:

  • Root volume is now marked as such if it has "/" in its mountpoints. Old assumption of root volume being sda1 was wrong, as on DO it is vda1
  • Unmovable services now no longer imply that they are on sda1. Instead, they now imply that they are on the system disk. This fixes crashes on user side.
  • Volumes with iso9660 filesystem are now ignored: generally it is a file system used on optical disks, and it is used on DigitalOcean as vdb drive with JSON containing server metadata.
  • Mailserver now looks for its location on the email field of userdata.json as Nix config looks for email and it is too late to change it to mailserver on Nix side.
  • Other linting on changed files: removing unused imports and adding check=False for subproccess calls

No API changes, version bumped from 2.2.0 to 2.2.1

This PR fixes issues related to volume handling on DigitalOcean. This include: - Root volume is now marked as such if it has "/" in its mountpoints. Old assumption of root volume being `sda1` was wrong, as on DO it is `vda1` - Unmovable services now no longer imply that they are on `sda1`. Instead, they now imply that they are on the system disk. This fixes crashes on user side. - Volumes with `iso9660` filesystem are now ignored: generally it is a file system used on optical disks, and it is used on DigitalOcean as `vdb` drive with JSON containing server metadata. - `Mailserver` now looks for its location on the `email` field of `userdata.json` as Nix config looks for `email` and it is too late to change it to `mailserver` on Nix side. - Other linting on changed files: removing unused imports and adding `check=False` for subproccess calls No API changes, version bumped from 2.2.0 to 2.2.1
inex added 5 commits 2023-07-28 03:47:32 +03:00
inex requested review from houkime 2023-07-28 03:47:36 +03:00
houkime reviewed 2023-07-31 16:21:16 +03:00
@ -114,3 +112,3 @@
return user_data.get("mailserver", {}).get("location", "sda1")
return user_data.get("email", {}).get("location", "sda1")
else:
return "sda1"
Collaborator

mail service still returns sda1 by default?

mail service still returns sda1 by default?
Poster
Owner

Just like other movable services do. So it might be a good idea to use the system drive as a fallback for all services.

Just like other movable services do. So it might be a good idea to use the system drive as a fallback for all services.
inex added 2 commits 2023-08-02 08:51:48 +03:00
inex added 1 commit 2023-08-02 08:54:23 +03:00
continuous-integration/drone/push Build is failing Details
f4263b0288
style: remove unused imports
Collaborator

LGTM

LGTM
houkime approved these changes 2023-08-02 14:40:17 +03:00
inex merged commit a1267946fc into master 2023-08-02 15:16:13 +03:00
inex deleted branch fix/do-volumes 2023-08-02 15:16:13 +03:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SelfPrivacy/selfprivacy-rest-api#45
There is no content yet.