drive_mirror.cfg 6.8 KB
Newer Older
X
Xu Tian 已提交
1 2 3 4
- drive_mirror:
    no Host_RHEL.5
    no Host_RHEL.6.1
    no Host_RHEL.6.2
5
    no raw qed vmdk
X
Xu Tian 已提交
6 7
    type = drive_mirror
    monitor_type = qmp
8 9
    monitors = qmp1
    main_monitor = qmp1
X
Xu Tian 已提交
10 11
    backup_image_before_testing = yes
    restore_image_after_testing = yes
X
Xu Tian 已提交
12 13 14 15 16 17 18 19
    # Recent QEMU upstream (and the variants shipped by recent distros) use
    # drive-mirror and block-job-complete
    block_mirror_cmd = drive-mirror
    block_reopen_cmd = block-job-complete
    # RHEL6 does use some different, internal commands, need to adjust on your
    # config file if that is going to be tested
    #block_mirror_cmd = "__com.redhat_drive-mirror"
    #block_reopen_cmd = "__com.redhat_drive-reopen"
X
Xu Tian 已提交
20 21 22 23 24 25 26 27 28 29
    wait_timeout = 3600
    # wait_timeout: wait xx seconds for block mirror job go into steady status, aka offset equal image length
    source_images = "image1"
    # source_images: set which image will be mirroring to target, now only a image at one time;
    full_copy_image1 = "full"
    #for full image or top most
    default_speed_image1 = 0
    # default speed unit is B/s, for 10MB/s please set speed to '10M'
    target_format_image1 = "qcow2"
    create_mode_image1 = "absolute-paths"
30
    target_image_image1 = "images/target1"
X
Xu Tian 已提交
31
    check_event = no
32
    tmp_dir = "/tmp"
X
Xu Tian 已提交
33
    variants:
34
        - simple_test:
X
Xu Tian 已提交
35 36
            type = drive_mirror_simple
            repeat_times = 3
37
            cancel_timeout = 5
X
Xu Tian 已提交
38 39 40
            variants:
                - cancel:
                    before_steady = "cancel"
X
Xu Tian 已提交
41
                    cancel_timeout_image1 = 3
X
Xu Tian 已提交
42 43 44 45 46 47 48 49 50 51 52
                - set_speed:
                    max_speed_image1 = 10M
                    before_steady = "set_speed"
                - reset_speed:
                    default_speed_image1 = 10M
                    max_speed_image1 = 1M
                    before_steady = "set_speed"
                - query:
                    before_steady = "query_status"
                    default_speed_image1 = 3M
                    max_speed_image1 = 10M
X
Xu Tian 已提交
53
                - mirroring:
54 55 56
                    variants:
                        - block_job_complete:
                           type = drive_mirror_complete
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
                           variants:
                               - target_in_localfs:
                                   open_target_image = yes
                                   boot_target_image = no
                               - target_in_nfs:
                                   target_image_type = nfs
                                   nfs_mount_dir = "/mnt/nfs"
                                   target_image_image1 = "${nfs_mount_dir}/target1"
                                   nfs_mount_options = "rw"
                                   export_dir = "/home/nfs"
                                   export_options = "rw,no_root_squash,async"
                                   setup_local_nfs = yes
                                   boot_target_image = yes
                                   open_target_image = no
                               - target_to_iscsi:
                                   # target_image will ingore, target_image will generate automaticly
                                   target_image_type = iscsi
                                   open_target_image = no
                                   boot_target_image = yes
                                   # Please replace below iscsi connection params before start your testing
                                   portal_ip = "192.168.1.2"
                                   initiator = "iqn.2010-07.test.org:kvmautotest"
                                   target = "iqn.2001-05.com.equallogic:0-8a0906-db31f7d03-470263b05654c204-kvm-test"
                                   # End
81 82 83 84
                        - continuous_backup:
                           type = drive_mirror_continuous_backup
                           clean_cmd = "rm -f tmp*.file"
                           dd_cmd = "dd if=/dev/zero bs=1024 count=1024 of=tmp%s.file"
X
Xu Tian 已提交
85 86
        - with_stress:
            type = drive_mirror_stress
87
            reopen_timeout = 600
X
Xu Tian 已提交
88 89 90
            variants:
                - heavyload:
                    download_link = http://weather.ou.edu/~apw/projects/stress/stress-1.0.4.tar.gz
X
Xu Tian 已提交
91
                    pkg_md5sum = a607afa695a511765b40993a64c6e2f4
92
                    install_cmd = "tar -xzvf ${tmp_dir}/stress-1.0.4.tar.gz -C ./ && cd stress-1.0.4 && ./configure --prefix=/usr && make && make install "
X
Xu Tian 已提交
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
                    config_cmd = ""
                    app_check_cmd = "stress --help"
                    start_cmd = "stress --cpu 4 --io 4 --vm 2 --vm-bytes 256M --quiet &"
                    check_cmd = 'pidof -s stress'
                    stop_cmd = "killall -g stress"
                    variants:
                        - stress:
                            before_start = "load_stress"
                            when_steady = "reopen"
                            after_reopen = "reboot verify_alive"
                        - stop:
                            before_start = "load_stress"
                            before_steady = "stop"
                            when_steady = "reopen resume"
                            after_reopen = "reboot verify_alive"
                        - check_steady:
                            before_start = "load_stress"
                            when_steady = "verify_steady"
                            #seconds to verify offset not decrease when guest in steady status
                            hold_on_timeout = 300
                            after_reopen = "reboot verify_alive"
                - dd:
                    app_check_cmd = "dd --help"
116
                    start_cmd = "dd if=/dev/urandom of=/tmp/dd.img bs=4k count=500000"
X
Xu Tian 已提交
117
                    check_cmd = "pidof dd"
118
                    stop_cmd = "pkill -g dd && rm -rf /tmp/dd*"
X
Xu Tian 已提交
119 120 121
                    before_start = "load_stress"
                    when_steady = "reopen"
                    after_reopen = "reboot verify_alive"
122
        - with_reboot:
X
Xu Tian 已提交
123
            type = drive_mirror_reboot
124
            when_steady = "reopen"
X
Xu Tian 已提交
125
            after_reopen = "reboot verify_alive"
126
        - with_powerdown:
X
Xu Tian 已提交
127
            type = drive_mirror_powerdown
128 129
            app_check_cmd = "test -d  ${tmp_dir}/linux-2.6.35.14"
            download_link = "https://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.35/linux-2.6.35.14.tar.gz"
X
Xu Tian 已提交
130
            pkg_md5sum = "15e4021ffcb47b93c218083e1f2734a7"
131 132 133 134 135
            install_cmd = "tar xzvf ${tmp_dir}/linux-2.6.35.14.tar.gz -C ${tmp_dir}/"
            config_cmd = "cd ${tmp_dir}/linux-2.6.35.14 && make defconfig"
            start_cmd = "cd ${tmp_dir}/linux-2.6.35.14 && make clean && make -j `grep processor /proc/cpuinfo|wc -l` && make modules"
            check_cmd = "pidof make"
            stop_cmd = "pkill -g make && rm -rf ${tmp_dir}/linux*"
X
Xu Tian 已提交
136 137 138
            before_start = "load_stress"
            when_steady = "powerdown"
            after_reopen ="verify_alive"