Project

General

Profile

action #70723

Updated by okurz over 4 years ago

## Back story 

 Apparently tests within `os-autoinst-distri-opensuse` are no longer supposed to rely on the mountpoint `/var/lib/openqa/share` on the worker host. 

 I have fixed #69475 by restoring the mount point on the o3 worker `openqaworker7`. However, that means there are still tests relying on that mount point. A brief `grep` shows the following places: 

 ``` 
 [… opensuse]$ [(e7cc2d56b...)] git --no-pager grep -P '(autoinst_url.*assets|data_url.*(REPO_|ASSET_))' 
 lib/bootloader_setup.pm:          $autoyast_args .= autoinst_url("/assets/other/$ay_var"); 
 tests/kernel/change_kernel.pm:          from_rpm(autoinst_url("/assets/other/$rpm")); 
 tests/virtualization/vagrant/boxes/tumbleweed.pm:          assert_script_run("wget --quiet " . autoinst_url("/assets/other/$boxname")); 
 tests/wsl/prepare_wsl_feature.pm:          cmd       => 'Invoke-WebRequest -Uri ' . autoinst_url("/assets/other/$wsl_appx_filename") . ' -O C:\\' . $wsl_appx_filename . ' -UseBasicParsing', 
 ``` 

 The first occurrence is for a YaST profile so it seems to be responsible for the failure from #69475. 

 --- 

 In the first place I wanted to file this ticket under the openQA Tests project. However, I'm not sure whether the distribution can easily move away from the current approach after looking into the occurrences. 

 The asset variables, e.g. `ASSET_7` as used for the YaST profile in the first occurrence already contain the full path to the asset and if asset caching is enabled that would be somewhere within the pool directory, e.g. `/var/lib/openqa/pool/6/01348026-autoinst.xml` in this case. So with the asset cache enabled one could simply use the path the asset variable refers to without relying on the mountpoint. However, here the file is consumed within the SUT and so far this works via the command server which always looks under `ASSETDIR` (which is here `/var/lib/openqa/share/factory`). 
 

 The other occurrences look the same. 


 ## Acceptance criteria 
 * **AC1:** o3 and osd workers do not have /var/lib/openqa/share mounted from webui hosts 

 ## Suggestions 

 * Understand what existing tests want to achieve with data directly accessed from /var/lib/openqa/share 
 * Maybe it would make sense to just make the command server a little bit smarter to look into the pool directory as well? That shouldn't be a big deal from our side and would save the test writers some effort. 
 * 

 --- 

 When all occurrences have been fixed (be it on the distribution side or on the os-autoinst side) the tools team should disable the mount point on all OSD and o3 workers consistently to avoid tests relying on the mountpoint again.

Back