-
Notifications
You must be signed in to change notification settings - Fork 23
[ADBDEV-8748] Add resource estimation #2167
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
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
| strategy) | ||
| return (conf, host_mapping) | ||
|
|
||
| class PortAllocator: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to add unit tests for the PortAllocator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add them later, after handling the KnightMurloc's comment with removed hosts
This comment was marked as resolved.
This comment was marked as resolved.
That's the issue of DiskFree command mostly. If the dir does not exist it errors out when reaching the root. Also the unexistent directory is chosen because of ADR for 3.1.22 where it written: |
This comment was marked as resolved.
This comment was marked as resolved.
|
Are there any tablespace tests? |
Only a couple unit tests in test_unit_resources. |
|
Now corresponding filesystems at target hosts are considered when tablespaces are validated |
Add basic support of resource planning
This patch implements the following changes:
The support of IP addresses in 'target-hosts, add-hosts, remove-hosts' is
added. Their validation requires hostname resolution, thus, the HostResolver()
class is added in rebalance_commons.py Without validation we may face the case
when passed through options IP address corresponds to existing host but is
interpreted by ggrebalance as a new one.
The support hosts files is added.
The target directories handling is reworked. TemplateParser() class is added
to support several placeholders. Now if 'target-datadirs' options is not passed
all moves will choose default template directories as target ones.
The port planning is added in simple form (since doing network communication
is overhead here) via PortAllocator() class. It forms per host per segment type
port patterns and assigns them incrementally to moves.
The storage estimation is implemented. DiskUsage, DiskFree commands are used.
The source datadirs and tablespaces are taken into account and validation of
available space is provided.
Corresponding unit tests are added for basic scenarios.