Description of problem:
network test gives following error in HTTP transfer testing.
<output name="HTTP" description="HTTP file transfer test">
sending file /var/www/html/httptest.file hash: a8598ed76362cec7ff3170912b694b31
From IP: 10.16.65.145
Upload took 3.11 seconds, 7.12 MB/sec
getting file http://ibm-z10-06.rhts.eng.bos.redhat.com/v7/store/10.16.65.145/httptest.file
Error: test raised exception:
HTTP Error 404: Not Found
A similar instance is in Beaker:
besides the 404, the response message was malformed.
Version-Release number of selected component (if applicable):
1.4 R16 (both server and client)
Is selinux on ibm-z10-06.rhts.eng.bos.redhat.com enforcing?
Created attachment 518792 [details]
a simple patch to fix 404 error
I find what happened to produce the 404. it was caused due to store directory path error.
A simple fix is attached.
Created attachment 518798 [details]
a more complex version of fix
However, we could think someway to avoid such mistake happen again in codes. I find "store" dir is similar to "export" dir, they were both under /var/v7 and then moved to /var/www/v7 later. In environment.py, export was used as an element for v7ServerDirectory key, but store used as the same level of v7ServerDirectory key. Could we convert it to an element as well?
Here is a new patch to convert v7 store as an element.
That patch would break the "save" command on the SUT, as it currently saves copies of results to /var/v7/store.
This issue here is that currently, the server uses /var/www/v7 while the SUT uses /var/v7. The server uses /var/www/v7 because it needs httpd to serve files and run cgi from there.
There are a few different options for fixing this bug:
1) make both SUT and server use /var/www/v7. This will make the code simpler and more maintainable, but my cause users some confusion.
2) remove the getStoreDirectory function from environment.py, as the caller (server vs. SUT) needs to use getServerDirectory vs. getDataDirectory depending on whether it's server-side or SUT-side code.
3) It seems arbirary that both the server-side of the network test, and the SUT's save (local) command use the "store" directory. Perhaps the server-side of the network test (v7/server/cgi/networkTest.py), and the URL used by the SUT network test should use a separate area for http transfers. Perhaps /var/www/v7/transfer (httpd configured as /v7/transfer) would be for the network file transfer test.
I'd recommend option 3) as it seems to me to be the clearest and most maintainable.
Created attachment 518883 [details]
A patch to change the network test to use its own transfer area
Per option 3 of the above comment.
Created attachment 518885 [details]
Patch to change the network test to uses it's own transfer area (corrected)
Committed to R17
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
An enhancement has been made in v7 1.4 that v7 server stores http transfer file in a new directory "/var/www/v7/transfer" on server side in network testing instead of original place: "/var/v7/store".
Note that this enhancement causes v7 configuration file change, user should remove /etc/v7.xml on both server side and SUT side before executing v7 tests.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.