-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAT-16283]Add support bundle size estimate api
Summary: This diff has the following changes: - Added a handler to remove excess logic from controller - We were converting back and forth between Paths and Strings in a bunch of places which was inefficient, so refactored the code to only use Paths when required. - Added new interface method which will return file sizes and paths for applicable components. This is used by both the support bundle creation and size estimate APIs. - Adjusted UTs where required for new behaviour. - Added new size estimation API which will return a map of all component sizes and total size ``` Request: GET /customers/:cUUID/universes/:uniUUID/support_bundle/estimate_size { "startDate": "2024-12-26T10:50:21Z", "endDate": "2024-12-27T10:50:21Z", "components": [ "ApplicationLogs", "YbaMetadata", "UniverseLogs", "OutputFiles", "ErrorFiles", "GFlags", "Instance", "ConsensusMeta", "TabletMeta", "NodeAgent", "CoreFiles", "YbcLogs" ], "maxNumRecentCores": 1, "maxCoreFileSize": 26843545600 } Response: { "data": { "yb-admin-asharma-aws-test-3n-n7": { "GFlags": 10000, "Instance": 10000, "YbcLogs": 13840, "OutputFiles": 10000, "TabletMeta": 135390, "NodeAgent": 47640, "UniverseLogs": 2827537, "ErrorFiles": 10000, "ConsensusMeta": 8888, "CoreFiles": 0 }, "YBA": { "YbaMetadata": 180580, "PrometheusMetrics": 51910000, "ApplicationLogs": 4541851 },... } } Test Plan: Existing UTs and iTests. Verified that size returned by the new API is equal to the size of the bundle after being unzipped. For prometheus component, verified that the estimates are ok in 15 mins - 3 hrs range. Beyond this time range, the actual data collected goes into GBs and the estimates are off but it should be ok since prom data is usually only collected for a short period of time around some task failure. Tested the new API on 1n, 3n and 10n universes. The API response time in all cases is < 2 secs and should be similar for even larger universes since all the data collection happens in parallel. Reviewers: #yba-api-review!, skurapati Reviewed By: skurapati Subscribers: yugaware Differential Revision: https://phorge.dev.yugabyte.com/D40910
- Loading branch information
1 parent
a8d9bbd
commit d6cea59
Showing
32 changed files
with
1,080 additions
and
321 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.