Project

General

Profile

action #166748

Updated by ph03nix 3 months ago

VMware jobs fail to include images from the `hdd/fixed` folder, although it works in some cases when the assets are already present on the worker. 

 The main problems arises in https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/31dd5c1676685a016198cb1adaac265ef5b48be5/tests/installation/bootloader_svirt.pm#L143 and the following LOC, where handling of subfolders is not properly implemented. This should be done in the backend. 

 # Original ticket 

 This poo is a follow up of issues noted in **poo#162941**: [note-14](https://progress.opensuse.org/issues/162941#note-14), [note-17](https://progress.opensuse.org/issues/162941#note-17), [note-24](https://progress.opensuse.org/issues/162941#note-24). 

 In particular:  

 A) during `SL Micro 6.0 Product Increments - `**VMware** [tests](https://openqa.suse.de/group_overview/572) run, in `osado`-`bootloader_svirt.pm` execution, the *vmware image full-path* is _not_ transferred to the routines managing that file, but only the *basename* and the path is statically *recomposed* , _assuming no subfoldes_ for `hdd`: but those images are in `hdd/fixed`, instead. 

 Therefore the [bash snippet](https://github.com/os-autoinst/os-autoinst/blob/e007c26db0f8e0a1cc3d9d8bf87f249308fe9186/consoles/sshVirtsh.pm#L340) fails to find the source file, when _the basename is not already present_ in the expected destination folder of the SUT. 

 B) Moreover, in next runs of those tests, `bootloader_svirt.pm` passed ok, like [15400838](https://openqa.suse.de/tests/15400838/logfile?filename=autoinst-log.txt#line-245), because the named snippet found the vmware image *already* in the right place(here transferred by some unknown or manual operation), skipping the copy command. 

 But leaving that image in the expected place, never cleaned, eventual images update from new builds would be never transferred, therefore not tested. 

 A possible fix is, sequentially applying the steps: 
   1. update the code in (A) ensuring that the right *full-path* image is provided as origin in `_copy_image_vmware`. 
   2. Define a `lock-file policy` for the **VMware image** (using pre/post_run), to allow transferring that file but preventing that it is cleaned or ovewritten by other similar running tests during elaboration. 
   3. Update the `cleanup`, like in item n.2 of [note-14](https://progress.opensuse.org/issues/162941#note-14). 

Back