[1LP][RFR] Fix SSH timeout issue in verify_revert_snapshot#9952
[1LP][RFR] Fix SSH timeout issue in verify_revert_snapshot#9952mshriver merged 3 commits intoManageIQ:masterfrom
Conversation
|
PR looks good, but PRT is failing with |
jarovo
left a comment
There was a problem hiding this comment.
I don't think this is right way to solve the issue.
|
I believe the error in PRT we are seeing now may be an intermittent issue I have seen. It didn't show up while testing this locally today. I'll look into it more now. |
|
After further thought, PRT might be using the wrong template. I am looking in logs to see if I can determine this. We may be caught between issues. I have PR#9942 which fixes the isue with using the wrong template. I have the template updated to the correct value in cfme_data.yaml on my local machine. I am not 100% positive this is what is happening, but it is likely. We'll need to push PR9942 to get this to work (at least until it hits the other issue with active VM). |
|
I added vsphere provider to the PRT command to see what it does in PRT. It has been more stable locally. I am also testing the connect_ssh code that has been suggested, although I suspect it will also have issues.. |
There was a problem hiding this comment.
I think you should not yield here, but rather put the rest of the code until the line perhaps 226 under the first with statement.
Then we need to connect again, so another with statement and "connect_ssh()" needs to be done. This will need to go until the line 265 where the with will take care about the ssh disconnect
|
I was sure I updated the title of this PR when I updated the details, but I don;t see the change. I'll update it again. |
|
I am still testing and not seeing things work well 100% of the time. I'll keep working on it and I need to look at the suggestions from Jaroslov. I am pushing my updates anyway so we can discuss a few things in while I continue to debug and test. It also seems like a waste of time to need to wait for the "wrong" IP to time out. Is thee another way besides just checking to see if we have the 10.x.x.x IP versus the 192.x.x.x IP? I am considering checking the IP with a variable like ip_class_octet so we can update if the network settings change. Possibly get this from yaml? suggestions? |
|
I'll fix the flake8 needed blank line in next commit. Ignore for now. there should be more changes. |
|
I added a loop and wait, and also a check for the class octet of IPs found for the VM to connect_ssh. I believe this fixes the ssh issue with our test case, but now if seems like I have "hijacked' utility code that was intended to be reusable and have made it pretty specific to the needs of the test case. I am also curious about the AttrDict I added. Comments? |
|
I detected some fixture changes in commit 2b086ffecb66cdc7617c0a1d2a3c69606b53c284 The global fixture
The global fixture
The global fixture
The global fixture
The local fixture
The local fixture
The local fixture
Please, consider creating a PRT run to make sure your fixture changes do not break existing usage 😃 |
|
The functionality in this PR has been split into 2 PRs so that additional work can be done on connect_ssh. If this update fixes a test case and doesn't break anything, why wouldn't we push what we have and fix connect_ssh in another PR that will not hold up this original PR (which was intended to fix a test)? |
|
This test is passing but I cannot see the files created via touch on the vm when I check manually. I am not sure this is not a false positive. |
|
I have tested this locally and can see the files created. The sudo command was causing them to get put in a different directory than I was expecting. looks good. |
Purpose or Intent
PRT Run
{{ pytest: --use-provider rhv43 --use-provider vsphere67-nested --long-running cfme/tests/infrastructure/test_snapshot.py::test_verify_revert_snapshot }}
PR failures
The test sometimes failed for reasons unrelated to the changes (timeout when waiting for
apcommand prompt) (see PRT runs)