drive_mirror.cfg 8.9 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
    wait_timeout = 3600
    # wait_timeout: wait xx seconds for block mirror job go into steady status, aka offset equal image length
    source_images = "image1"
23
    target_image_image1 = "target"
X
Xu Tian 已提交
24 25 26 27 28
    # 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'
29 30 31
    image_format_target = "qcow2"
    create_mode_target = "absolute-paths"
    image_name_target = "images/target1"
X
Xu Tian 已提交
32
    check_event = no
33
    tmp_dir = "/tmp"
X
Xu Tian 已提交
34
    variants:
35
        - simple_test:
X
Xu Tian 已提交
36 37
            type = drive_mirror_simple
            repeat_times = 3
38
            cancel_timeout = 5
X
Xu Tian 已提交
39 40 41
            variants:
                - cancel:
                    before_steady = "cancel"
X
Xu Tian 已提交
42
                    cancel_timeout_image1 = 3
X
Xu Tian 已提交
43 44 45 46 47 48 49 50 51 52 53
                - 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 已提交
54
                - mirroring:
55 56 57
                    variants:
                        - block_job_complete:
                           type = drive_mirror_complete
58 59 60 61 62
                           variants:
                               - target_in_localfs:
                                   open_target_image = yes
                                   boot_target_image = no
                               - target_in_nfs:
63
                                   image_type_target = nfs
64
                                   nfs_mount_dir = "/mnt/nfs"
65
                                   image_name_target = "${nfs_mount_dir}/target1"
66 67 68 69 70 71 72
                                   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:
73
                                   image_format_target = raw
C
Chris Evich 已提交
74
                                   # target_image will ingore, target_image will generate automatically
75 76 77
                                   image_type_target = iscsi
                                   force_cleanup_target = yes
                                   host_setup_flag_target = 2
78 79 80
                                   open_target_image = no
                                   boot_target_image = yes
                                   # Please replace below iscsi connection params before start your testing
81 82 83
                                   portal_ip_target = "192.168.1.2"
                                   initiator_target = "iqn.2010-07.test.org:kvmautotest"
                                   target_target = "iqn.2001-05.com.equallogic:0-8a0906-db31f7d03-470263b05654c204-kvm-test"
84
                                   # End
85 86 87 88
                        - 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"
89 90
                           Windows:
                               clean_cmd = "del /F tmp*.file"
91 92 93 94 95 96 97
                - negative_test:
                    negative_test = yes
                    variants:
                        - readonly_target:
                            create_mode = existing
                            before_start = readonly_target
                            before_cleanup = clear_readonly_bit
X
Xu Tian 已提交
98 99
        - with_stress:
            type = drive_mirror_stress
100
            reopen_timeout = 600
X
Xu Tian 已提交
101 102 103
            variants:
                - heavyload:
                    download_link = http://weather.ou.edu/~apw/projects/stress/stress-1.0.4.tar.gz
X
Xu Tian 已提交
104
                    pkg_md5sum = a607afa695a511765b40993a64c6e2f4
105
                    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 已提交
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
                    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"
129
                    start_cmd = "dd if=/dev/urandom of=/tmp/dd.img bs=4k count=500000"
X
Xu Tian 已提交
130
                    check_cmd = "pidof dd"
131
                    stop_cmd = "pkill -g dd && rm -rf /tmp/dd*"
X
Xu Tian 已提交
132 133 134
                    before_start = "load_stress"
                    when_steady = "reopen"
                    after_reopen = "reboot verify_alive"
135
        - with_reboot:
X
Xu Tian 已提交
136
            type = drive_mirror_reboot
137
            when_steady = "reopen"
X
Xu Tian 已提交
138
            after_reopen = "reboot verify_alive"
139
        - with_powerdown:
X
Xu Tian 已提交
140
            type = drive_mirror_powerdown
141 142
            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 已提交
143
            pkg_md5sum = "15e4021ffcb47b93c218083e1f2734a7"
144 145 146 147 148
            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 已提交
149 150 151
            before_start = "load_stress"
            when_steady = "powerdown"
            after_reopen ="verify_alive"
152 153 154
        - cancel_blocked_jobs:
           type = drive_mirror_cancel
           cancel_timeout = 10
155
           pre_command = "service iptables restart || systemctl restart iptables.service"
156 157 158 159
           stop_firewall_cmd = "iptables -F"
           post_command = "iptables -F"
           variants:
               - target_in_nfs:
160
                   image_type_target = nfs
161
                   nfs_mount_dir = "/mnt/nfs"
162
                   image_name_target = "${nfs_mount_dir}/target1"
163 164 165 166 167 168 169
                   nfs_mount_options = "rw"
                   export_dir = "/home/nfs"
                   export_options = "rw,no_root_squash,async"
                   setup_local_nfs = yes
                   start_firewall_cmd = "iptables -A INPUT -p tcp -d 127.0.0.1 --dport 2049 -j DROP"
               - target_to_iscsi:
                   # target_image will ingore, target_image will generate automatically
170 171 172
                   image_type_target = iscsi
                   force_cleanup_target = yes
                   host_setup_flag_target = 2
173
                   # Please replace below iscsi connection params before start your testing
174 175 176 177
                   portal_ip_target = "192.168.1.2"
                   initiator_target = "iqn.2010-07.test.org:kvmautotest"
                   target_target = "iqn.2001-05.com.equallogic:0-8a0906-db31f7d03-470263b05654c204-kvm-test"
                   start_firewall_cmd = "iptables -A INPUT -p tcp -d ${portal_ip_target} --dport 3260 -j DROP"