-
Notifications
You must be signed in to change notification settings - Fork 201
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
fix(volumes): Miscellaneous fixes #2402
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use Press Job arguments for setting labels ```json { "labels": { "alertname": "Disk Almost Full", "cluster": "Mumbai", "device": "/dev/nvm0n1p1", "fstype": "ext4", "instance": "n1.local.frappe.cloud", "job": "node", "mountpoint": "/", "severity": "critical" } } ``` We need to use this to find the mountpoint of the disk that's almost full.
The default behavior remains unchanged. i.e. Pick the first volume from the list.
Handles partitioned and un-partitioned devices. Handles any device (unlike the hardcoded /dev/nvme0n1)
TODO: Free space and prediction calculations still use data from the / mount point
Filter for all three possible mountpoints. Root, MariaDB and Benches. Show multiline charts for iops and disk space.
On single volume machines this defaults to / On multi-volume machines defaults to /opt/volumes/mariadb and /opt/volumes/benches After this the required-space calculations will use query metrics for the correct mount point.
Before VM.disk_size - Set from Plan.size - Used to set root volume size on boot - Always fetched from VM.volumes[0].size Now We can have one or two disks (root, data). So we use two fields VM.root_disk_size - Set default to 10G - Used to set root volume size on boot - Fetched from get_root_volume() VM.disk_size (Stand-in for VM.data_disk_size) - Set based on Plan.size - Used to set the data disk size on boot - Fetched from get_root_volume()
Size and root_size they serve the same purpose as VM.disk_size and VM.root_disk_size
Root Disk Size now stores the size of the root disk
Data volume in the Virtual Machine Image is very small (~10GB) All plans use larger volumes (~25+), so we resize the filesystem Root partition (and filesystem) seems to auto-extend on first boot
Before this we'd rely on number of volumes to determine if we have a data volume It's possible to have multiple volumes that aren't data volumes (e.g. volumes for temporary data copying) This field should only be edited in Virtual Machine DocType Virtual Machine dictates if Server / Database Server has data volume Virtual Machine Image copies this value at the time of image creation Virtual Machines created from an image inherit the value
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2402 +/- ##
==========================================
- Coverage 38.52% 38.45% -0.07%
==========================================
Files 377 377
Lines 29286 29380 +94
==========================================
+ Hits 11282 11299 +17
- Misses 18004 18081 +77 ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Show disk size for single and multi-volume machines
Metrics for all volumes
Mountpoint-specific disk usage reactions
Explicitly handle machines with data volumes
Virtual Machine, Virtual Machine Image, Server, and Database Server DocTypes now have a
has_data_volume
field.