-
Notifications
You must be signed in to change notification settings - Fork 216
USHIFT-5723: Add test to verify count in GDP config #5300
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
USHIFT-5723: Add test to verify count in GDP config #5300
Conversation
264513f
to
ebf5ecd
Compare
ebf5ecd
to
31c38b0
Compare
31c38b0
to
baf6fa9
Compare
@pmtk could you please help review ? thanks !! |
Verify FUSE device allocation and accessibility | ||
[Documentation] Verifies FUSE device configuration, allocation, and accessibility in pods | ||
[Tags] fuse-device | ||
Enable And Configure GDP ${GDP_CONFIG_FUSE_COUNT} |
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.
Enable And Configure GDP ${GDP_CONFIG_FUSE_COUNT} | |
[Setup] Enable And Configure GDP ${GDP_CONFIG_FUSE_COUNT} |
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.
Done.
Enable And Configure GDP ${GDP_CONFIG_FUSE_COUNT} | ||
Wait Until Device Is Allocatable 10 fuse | ||
# Create and deploy pod requesting 4 FUSE devices | ||
${path}= Create Random Temp File ${POD_FUSE_DEVICE} |
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.
How about moving the string into a dedicated file in test/assets/generic-device-plugin/?
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.
okay, i can do that.
Oc Wait -n ${NAMESPACE} pod/fuse-test-pod --for=condition=Ready --timeout=120s | ||
|
||
# Verify /dev/fuse is accessible in the pod | ||
${fuse_device}= Run With Kubeconfig oc exec -n ${NAMESPACE} fuse-test-pod -- ls -l /dev/fuse |
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.
We have Oc Exec
keyword, can we use it instead?
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.
Done.
${describe_output}= Run With Kubeconfig oc describe node ${node_name} | ||
Should Contain ${describe_output} device.microshift.io/fuse: 10 | ||
Should Contain ${describe_output} device.microshift.io/fuse 4 4 | ||
|
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.
Missing [Teardown]
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.
Based on the test case i see i do not need individual teardown, since Teardown Suite With GDP Cleanup
would be sufficient. Do i still need the Missing [Teardown]
?
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.
True :D
Should Contain ${describe_output} device.microshift.io/fuse: 10 | ||
Should Contain ${describe_output} device.microshift.io/fuse 4 4 |
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.
There are 2+ spaces after fuse and numbers, this means they are separate arguments to the keyword
Should Contain ${describe_output} device.microshift.io/fuse 4 4
--- arg 1 ------- --- arg 2 ----------- arg3 arg4
You can see it in the execution log:
Arguments: [ ... | 'device.microshift.io/fuse' | '4' | '4' ]
I think it skips the fours and just matches the first string. I think we need to create string with 4 spaces inside in another way
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.
Done.
@kasturinarra: This pull request references USHIFT-5723 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
baf6fa9
to
ebdb11e
Compare
@pmtk addressed all your comments, could you please help review again ? |
VAR ${path}= ./assets/generic-device-plugin/fuse-test-pod.yaml | ||
Oc Create -f ${path} -n ${NAMESPACE} | ||
|
||
# Wait for pod to be ready and verify device accessibility |
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 feel like this comment is redundant. "verify device accessibility" applies more to next block which has its own comment
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.
removed.
[Tags] fuse-device | ||
[Setup] Enable And Configure GDP ${GDP_CONFIG_FUSE_COUNT} | ||
Wait Until Device Is Allocatable 10 fuse | ||
# Create and deploy pod requesting 4 FUSE devices |
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 feel like this comment is redundant
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.
Removed
VAR ${path}= ./assets/generic-device-plugin/fuse-test-pod.yaml | ||
Oc Create -f ${path} -n ${NAMESPACE} |
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.
VAR ${path}= ./assets/generic-device-plugin/fuse-test-pod.yaml | |
Oc Create -f ${path} -n ${NAMESPACE} | |
Oc Create -f ./assets/generic-device-plugin/fuse-test-pod.yaml -n ${NAMESPACE} |
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.
Addressed.
${allocation_matches}= Get Regexp Matches | ||
... ${allocated_line} | ||
... device\\.microshift\\.io/fuse\\s+(\\d+)\\s+(\\d+) | ||
... 1 2 | ||
Should Be Equal As Integers ${allocation_matches}[0] 4 | ||
Should Be Equal As Integers ${allocation_matches}[1] 4 |
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.
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.
can you try again please ? I just updated it to the right way.
Verify FUSE device allocation and accessibility :: Verifies FUSE d... | PASS |
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.
ebdb11e
to
f8b9a2d
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kasturinarra, pmtk The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@kasturinarra: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Which issue(s) this PR addresses: Verify a Pod can request multiple instances of a device when count is specified in the GDP configuration.
Closes #