action #41414
closedcoordination #36958: [functional][y][epic] Check checksum of image downloaded from OBS to worker
[functional][y][tools] Checksum of the images is verified on the worker side
Added by riafarov over 5 years ago. Updated about 5 years ago.
0%
Description
See motivation in the parent ticket.
Suggested solution is to have checksum as a job variable, which is then reused on the worker side to validate it if matches.
Simplest solution will be to use approach we have in isosize test module, by executing code directly on the worker.
Acceptance criteria¶
- checksum of the iso mismatch is detected on the worker side
- such a job fails with a clear message
Updated by okurz over 5 years ago
- Related to action #13302: [functional][y] Need to crosscheck ISOs against checksum in rsync.pl and/or before starting test added
Updated by okurz over 5 years ago
- Related to deleted (action #13302: [functional][y] Need to crosscheck ISOs against checksum in rsync.pl and/or before starting test)
Updated by riafarov over 5 years ago
- Description updated (diff)
- Estimated time set to 5.00 h
Updated by okurz over 5 years ago
See the example https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/tests/installation/isosize.pm for comparison. Probably easy to do something different.
Updated by JERiveraMoya over 5 years ago
- Status changed from Workable to In Progress
- Assignee set to JERiveraMoya
Updated by JERiveraMoya over 5 years ago
- Status changed from In Progress to Feedback
Updated by JERiveraMoya over 5 years ago
Added to PR modifications to be able to process not only iso but any checksum provided.
Updated by JERiveraMoya over 5 years ago
- Status changed from Feedback to In Progress
Updated by riafarov over 5 years ago
https://openqa.suse.de/tests/2170919#step/data_integrity/1 I guess we can resolve it.
Updated by okurz over 5 years ago
- Related to action #42632: [functional][y][fast] test fails in bootloader_uefi - it doesn't get into GRUB - SUT already running while checking data integrity added
Updated by okurz over 5 years ago
- Status changed from Resolved to Feedback
ok, not done, caused a lot of problems in aarch64 tests at least, see #42632
Updated by szarate over 5 years ago
- Category changed from New test to Enhancement to existing tests
- Status changed from Feedback to Blocked
- Assignee deleted (
JERiveraMoya) - Priority changed from Normal to Low
As discussed today:
This verification can be easily done on the worker cache code, so that when the worker/test require a medium (iso?) they also provide the hash along with the name of the iso, cache service then downloads and does the verification after the download is done.
This will provide a first level of verifiaction, but for other backends where the iso needs to be copied over the network, the verification needs to be added as a part of the test initialization process...
Updated by szarate over 5 years ago
- Due date deleted (
2018-10-23) - Start date deleted (
2018-09-21)
Updated by riafarov over 5 years ago
- Due date set to 2019-01-02
- Target version changed from Milestone 20 to Milestone 21
Updated by okurz over 5 years ago
- Status changed from Blocked to Workable
- Assignee deleted (
okurz) - Target version changed from Milestone 21 to Milestone 23
Hm, with https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/6067 we should have the hyperv/svirt covered but I did not actually see the test module scheduled anywhere on osd, asked @mnowaksuse in https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/6067#issuecomment-438227430 about then. Then the next step would be to bring in the checksum verification into either again tests – before actually starting the VM – or do it within the worker.
Updated by michalnowak over 5 years ago
@okurz Indeed, it's not scheduled for anyone. This PR is to make sure, that once enabled for qemu backend, it can be enabled for svirt as well - the only difference is likely where the test is scheduled. For qemu you may schedule it around isosize
test module, for svirt it needs to be started after bootloader_svirt
.
If both criteria can be met, schedule the test for both qemu and svirt backend, otherwise schedule it for qemu
only, and I'll add it for svirt
later, where appropriate.
Updated by riafarov over 5 years ago
- Due date changed from 2019-01-02 to 2019-01-29
Updated by riafarov over 5 years ago
- Due date changed from 2019-01-29 to 2019-02-12
Updated by okurz about 5 years ago
@oorlov do you still plan to work on this soon?
Updated by riafarov about 5 years ago
- Due date changed from 2019-02-12 to 2019-02-26
- Assignee deleted (
oorlov)
@oorlov will update the ticket with his findings.
Updated by mloviska about 5 years ago
Just from pure curiosity would you add the checksum in https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/Worker/Engines/isotovideo.pm?
The assets have been already downloaded to the worker, vars.json already contains the checksum computed by rsync.pl, so I guess it could be quite feasible to then compare the checksums at this place.
@oorlov WDYT?
Updated by michalnowak about 5 years ago
On svirt backend add_disk()
(os-autoinst/consoles/sshVirtsh.pm
) call from test code takes care of the image being present on the host (the image being on the worker does not play a role here), so the check can be done after that. Before that it's NOP for the svirt case.
Updated by riafarov about 5 years ago
- Status changed from Workable to Feedback
Updated by riafarov about 5 years ago
- Due date changed from 2019-02-26 to 2019-03-12
Updated by riafarov about 5 years ago
- Status changed from Feedback to Resolved
https://openqa.suse.de/tests/2512256#step/data_integrity/1
https://openqa.suse.de/tests/2515342 (2019-03-04T09:41:39.165 CET] [debug] ISO OK C:\cache\SLE-15-SP1-Installer-DVD-x86_64-Build181.3-Media1.iso: OK)