-
Notifications
You must be signed in to change notification settings - Fork 39
Implement LHv2 volume expansion #2673
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
Merged
khushboo-rancher
merged 1 commit into
harvester:main
from
albinsun:lhv2_volume_expansion
Jun 17, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| *** Settings *** | ||
| Documentation StorageClass Keywords | ||
| Library ../libs/keywords/storage_keywords.py | ||
| Resource variables.resource | ||
|
|
||
|
|
||
| *** Keywords *** | ||
| Create Storage Class | ||
| [Arguments] ${name} ${data_engine} ${number_of_replicas} ${disk_selector} | ||
| [Documentation] Create a StorageClass with Longhorn provisioner. | ||
| ... disk_selector can be a comma-separated list (e.g. lhv2,fast). | ||
| storage_keywords.create_storageclass ${name} ${data_engine} ${number_of_replicas} ${disk_selector} | ||
| Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${RETRY_INTERVAL} | ||
| ... Storage Class Is Present ${name} | ||
|
|
||
| Create LHv2 Storage Class | ||
| [Arguments] ${name} ${number_of_replicas} ${disk_selector} | ||
| Create Storage Class ${name} v2 ${number_of_replicas} ${disk_selector} | ||
|
|
||
| Delete Storage Class | ||
| [Arguments] ${name} | ||
| storage_keywords.delete_storageclass ${name} | ||
|
|
||
| Storage Class Is Present | ||
| [Arguments] ${name} | ||
| ${sc}= storage_keywords.get_storageclass ${name} | ||
| Should Not Be Empty ${sc} |
This file contains hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| *** Settings *** | ||
| Documentation Volume Keywords | ||
| Resource variables.resource | ||
| Library ../libs/keywords/volume_keywords.py | ||
|
|
||
| *** Keywords *** | ||
| # size | ||
| Get Volume Size | ||
| [Arguments] ${vol_name} | ||
| ${status}= volume_keywords.get_volume_status ${vol_name} | ||
| RETURN ${status["capacity"]["storage"]} | ||
|
|
||
| Volume Size Is ${size_gi}Gi | ||
| [Arguments] ${vol_name} | ||
| ${actual_size}= Get Volume Size ${vol_name} | ||
| Should Be Equal As Strings ${actual_size} ${size_gi}Gi | ||
|
|
||
| Update Volume Size to ${new_size}Gi | ||
| [Arguments] ${vol_name} | ||
| volume_keywords.expand_volume ${vol_name} ${new_size}Gi | ||
|
|
||
| # status | ||
| Volume Phase Is ${phase} | ||
| [Arguments] ${vol_name} | ||
| ${status}= volume_keywords.get_volume_status ${vol_name} | ||
| Should Be Equal As Strings ${status["phase"]} ${phase} | ||
|
|
||
| Volume State Is Ready/In-use | ||
| [Arguments] ${vol_name} | ||
| ${status}= volume_keywords.get_volume_status ${vol_name} | ||
| Should Be Empty ${status["conditions"]} | ||
|
|
||
| Wait Until Volume Is Active | ||
| [Arguments] ${vol_name} | ||
| Sleep ${SLEEP_TIMEOUT}s reason=Buffer time for volume changes | ||
| Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${RETRY_INTERVAL} | ||
| ... Volume Phase Is Bound ${vol_name} | ||
| Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${RETRY_INTERVAL} | ||
| ... Volume State Is Ready/In-use ${vol_name} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.