Project

General

Profile

Actions

action #41414

closed

coordination #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.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Enhancement to existing tests
Target version:
SUSE QA - Milestone 23
Start date:
2016-08-22
Due date:
2019-03-12
% Done:

0%

Estimated time:
5.00 h
Difficulty:

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

  1. checksum of the iso mismatch is detected on the worker side
  2. such a job fails with a clear message

Related issues 1 (0 open1 closed)

Related to openQA Tests - action #42632: [functional][y][fast] test fails in bootloader_uefi - it doesn't get into GRUB - SUT already running while checking data integrityResolvedszarate2018-10-172018-10-23

Actions
Actions #1

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
Actions #2

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)
Actions #3

Updated by okurz over 5 years ago

  • Target version set to Milestone 20
Actions #4

Updated by riafarov over 5 years ago

  • Description updated (diff)
  • Estimated time set to 5.00 h
Actions #5

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.

Actions #6

Updated by JERiveraMoya over 5 years ago

  • Status changed from Workable to In Progress
  • Assignee set to JERiveraMoya
Actions #7

Updated by JERiveraMoya over 5 years ago

  • Status changed from In Progress to Feedback
Actions #8

Updated by JERiveraMoya over 5 years ago

Added to PR modifications to be able to process not only iso but any checksum provided.

Actions #9

Updated by JERiveraMoya over 5 years ago

  • Status changed from Feedback to In Progress
Actions #11

Updated by okurz over 5 years ago

  • Status changed from In Progress to Resolved

seems like it

Actions #12

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
Actions #13

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

Actions #14

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...

Actions #15

Updated by szarate over 5 years ago

  • Start date set to 2016-08-22

due to changes in a related task

Actions #16

Updated by szarate over 5 years ago

  • Due date deleted (2018-10-23)
  • Start date deleted (2018-09-21)
Actions #17

Updated by riafarov over 5 years ago

  • Due date set to 2019-01-02
  • Target version changed from Milestone 20 to Milestone 21
Actions #18

Updated by riafarov over 5 years ago

  • Assignee set to okurz
Actions #19

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.

Actions #20

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.

Actions #21

Updated by riafarov over 5 years ago

  • Due date changed from 2019-01-02 to 2019-01-29
Actions #22

Updated by riafarov over 5 years ago

  • Due date changed from 2019-01-29 to 2019-02-12
Actions #23

Updated by oorlov about 5 years ago

  • Assignee set to oorlov
Actions #24

Updated by okurz about 5 years ago

@oorlov do you still plan to work on this soon?

Actions #25

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.

Actions #26

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?

Actions #27

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.

Actions #28

Updated by riafarov about 5 years ago

  • Assignee set to riafarov
Actions #29

Updated by riafarov about 5 years ago

  • Status changed from Workable to Feedback
Actions #30

Updated by riafarov about 5 years ago

  • Due date changed from 2019-02-26 to 2019-03-12
Actions #31

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)

Actions

Also available in: Atom PDF