microsoft / lis-test

Contains test infrastructure for testing Linux virtual machines on Windows Azure and Hyper-V.
32 stars 72 forks source link

STOR_VSS_BackupRestore_DiskStress.ps1 could not run pass on Hyper-v 2012R2 #719

Closed lixuemin2016 closed 7 years ago

lixuemin2016 commented 7 years ago

There are three issues during running STOR_VSS_BackupRestore related test cases, please refer to below comments. (mainly test on 2012R2 host)

  1. STOR_VSS_BackupRestore_DiskStress when execute "while true ; do ./iozone -ag 10G ; done > /dev/null 2>&1 & " , then do backup from host, the backup cannot finish even after more than 1 hour, the case will be aborted. Test VM has 2G memory and 2 CPU on Hyper-v 2012 R2 host.

But it can run pass on 2016 host, in order to fix the issue on 2012R2, either reduce the stress as ./iozone -ag 4G , (remove the loop) for both Hyper-v 2012R2 and 2016, or only lighten the stress for 2012R2 host.

  1. STOR_VSS_BackupRestore_Fail

$EventLog= Get-WinEvent - ProviderName Microsoft-Windows-Hyper-V-VMMS , looks that this command is updated, get error No provider name as Microsoft-Windows-Hyper-V-VMMS, when use Get-WinEvent only, cannot find warning ID 10107 or 10150.

Also after fsfreeze -f $MountName, it can do backup successfully, in STOR_VSS_BackupRestore_Fail, firstly check $sts = startBackup $vmName $driveletter, it expects backup successfully, in the comments, it mentions "Backu should fail". From test case step: "3. Change host side configuration to insert failure in backup.  Or disable VSS daemon in guest.", a little different with test case description. Note, in rhel7.4, if disable VSS daemon, it could do offline backup.

  1. STOR_VSS_3Chain_VHD_Backup also cannot run pass locally, based on my last time debug, the newly created childvhd vm fails to do backup, but needs to debug further.

File issues here to request help since not sure the exact fix method, can you run pass in your side? Could you please help to take look these three issues? Thank you so much.

chvalean commented 7 years ago

Thanks for the feedback @lixuemin2016 I will review in detail the points mentioned and come with a follow-up in the next few days.

lixuemin2016 commented 7 years ago

For the first case, STOR_VSS_BackupRestore_DiskStress, retest on the other Hyper-V 2012R2 machine, which backup disk is local disk of PC, it could run pass. Before I tested on test server, the original backup disk configured as one remote "iscsi" disk, possibly that it is failure root cause. Even in Hyper-V 2016 host, it also uses the iscsi from same PC.

chvalean commented 7 years ago

For STOR_VSS_BackupRestore_DiskStress we made an improvement in order to run in parallel iozone, and along start the VSS backup. Previously, the 2 commands were running one after another.

On STOR_VSS_BackupRestore_Fail we cannot guarantee to be able to fail the backup operation. Different distros have different behavior, and we couldn't find a reliable method to cause the backup operation to fail. Though it works on some versions or distros, as when it was designed. If you use a different method to trigger the test failure please let me know.

STOR_VSS_3Chain_VHD_Backup - here you can easily overcome the failure by only having a single VM snapshot. If multiple VM snapshots exist, then those can conflict with the function to get the main disk of the VM.

lixuemin2016 commented 7 years ago

Hi Chris, Thank you so much for your update.

For STOR_VSS_BackupRestore_DiskStress latest update, I did not notice that the STOR_VSS_Disk_Stress.sh and related iozone file in the VM after run this test case, also if vm does not install iozone, seems it does not download developer-tools, we need to take look this case again. (If comment out backup/restore related code, the script exits in 1 minute)

On STOR_VSS_BackupRestore_Fail [Xuemin] Understand, I'm trying to add two cases, one is disable backup integration service (verify backup offline), then enable backup integration service (verify online), the other case is disable hypervvsd, then verify backup offline. (depends on different distros)

STOR_VSS_3Chain_VHD_Backup, we only have one single VM snapshot, I will check it again, thank you.

chvalean commented 7 years ago

For iozone as a dependency, please check the AIO script which installs all the required packages.