Skip to content
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

reboot nfs_client_vm if not accessible and retry connection #10129

Merged

Conversation

dahorak
Copy link
Contributor

@dahorak dahorak commented Jul 17, 2024

The aim of this PR is automatic reboot of NFS Client VM in case it is not accessible.

To make this work properly, following two new configuration parameters are required:

ENV_DATA:
    nfs_client_vm_cloud: NAME_OF_CLOUD_DEFINED_IN_CONFIG
    nfs_client_vm_name: NFS_CLIENT_VM_NAME

The logic is, that it firstly try to connect to the NFS Client VM and if it fails, it reboots it, wait some time and try to connect again (with retry this time).

@dahorak dahorak added the team/ecosystem Ecosystem team related issues/PRs label Jul 17, 2024
@dahorak dahorak self-assigned this Jul 17, 2024
@pull-request-size pull-request-size bot added the size/M PR that changes 30-99 lines label Jul 17, 2024
@dahorak dahorak force-pushed the reboot-nfs-client-vm-if-not-accessible branch 3 times, most recently from 74aba39 to 786b52d Compare July 18, 2024 12:25
@dahorak dahorak marked this pull request as ready for review July 18, 2024 13:49
@dahorak dahorak requested a review from a team as a code owner July 18, 2024 13:49
@dahorak
Copy link
Contributor Author

dahorak commented Jul 18, 2024

Verification jobs:

2024-07-18 14:33:26  08:33:26 - MainThread - test_nfs_feature_enable_for_ODF_clusters - INFO  - Connecting to nfs client test VM
2024-07-18 14:35:47  08:35:34 - MainThread - ocs_ci.utility.utils - INFO  - Executing command: openstack --os-cloud rhos-d server reboot --hard --wait nfs-test-vm
2024-07-18 14:36:44  08:36:41 - MainThread - test_nfs_feature_enable_for_ODF_clusters - INFO  - Connecting to nfs client test VM
2024-07-18 14:36:44  08:36:41 - Thread-10 - paramiko.transport - INFO  - Connected (version 2.0, client OpenSSH_8.0)
2024-07-18 14:36:44  08:36:41 - Thread-10 - paramiko.transport - INFO  - Authentication (publickey) successful!
2024-07-18 15:34:33  E                   ocs_ci.ocs.exceptions.ConfigurationError: NFS Client VM is not accessible and ENV_DATA nfs_client_vm_cloud and/or nfs_client_vm_name parameters are not configured to be able to automatically reboot the NFS Client VM.
2024-07-18 15:34:33  
2024-07-18 15:34:33  tests/functional/nfs_feature/test_nfs_feature_enable_for_ODF_clusters.py:216: ConfigurationError

@dahorak dahorak added the Verified Mark when PR was verified and log provided label Jul 18, 2024
@dahorak dahorak changed the title reboot nfs_client_vm if not accesible and retry connection reboot nfs_client_vm if not accessible and retry connection Jul 23, 2024
@dahorak dahorak force-pushed the reboot-nfs-client-vm-if-not-accessible branch from 522a301 to b43c826 Compare July 23, 2024 06:25
Copy link
Contributor

@amr1ta amr1ta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good

Copy link

openshift-ci bot commented Jul 24, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: amr1ta, dahorak, petr-balogh

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dahorak dahorak merged commit 009a990 into red-hat-storage:master Jul 24, 2024
5 of 6 checks passed
@dahorak dahorak deleted the reboot-nfs-client-vm-if-not-accessible branch July 24, 2024 10:55
amr1ta pushed a commit to amr1ta/ocs-ci that referenced this pull request Jul 25, 2024
…storage#10129)

* reboot nfs_client_vm if not accessible and retry connection
* do not reboot the VM, if not necessary

Signed-off-by: Daniel Horak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm size/M PR that changes 30-99 lines team/ecosystem Ecosystem team related issues/PRs Verified Mark when PR was verified and log provided
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants