|
37 | 37 |
|
38 | 38 | # For ext4 FS |
39 | 39 |
|
40 | | - - name: >- |
41 | | - Create one LVM logical volume under one volume group with size |
42 | | - {{ volume_size_before }} |
43 | | - include_role: |
44 | | - name: linux-system-roles.storage |
45 | | - vars: |
46 | | - storage_pools: |
47 | | - - name: foo |
48 | | - disks: "{{ unused_disks }}" |
49 | | - type: lvm |
50 | | - volumes: |
51 | | - - name: test1 |
52 | | - # resizing is currently supported only for ext2/3/4 |
53 | | - fs_type: ext4 |
54 | | - size: "{{ volume_size_before }}" |
55 | | - mount_point: "{{ mount_location }}" |
56 | | -
|
57 | | - - name: Verify role results |
58 | | - include_tasks: verify-role-results.yml |
59 | | - |
60 | | - - name: Change volume_size to {{ volume_size_after }} |
61 | | - include_role: |
62 | | - name: linux-system-roles.storage |
63 | | - vars: |
64 | | - storage_pools: |
65 | | - - name: foo |
66 | | - type: lvm |
67 | | - disks: "{{ unused_disks }}" |
68 | | - volumes: |
69 | | - - name: test1 |
70 | | - fs_type: 'ext4' |
71 | | - size: "{{ volume_size_after }}" |
72 | | - mount_point: "{{ mount_location }}" |
| 40 | + - name: Test ext4 |
| 41 | + block: |
| 42 | + - name: >- |
| 43 | + Create one LVM logical volume under one volume group with size |
| 44 | + {{ volume_size_before }} |
| 45 | + include_role: |
| 46 | + name: linux-system-roles.storage |
| 47 | + vars: |
| 48 | + storage_pools: |
| 49 | + - name: foo |
| 50 | + disks: "{{ unused_disks }}" |
| 51 | + type: lvm |
| 52 | + volumes: |
| 53 | + - name: test1 |
| 54 | + # resizing is currently supported only for ext2/3/4 |
| 55 | + fs_type: ext4 |
| 56 | + size: "{{ volume_size_before }}" |
| 57 | + mount_point: "{{ mount_location }}" |
73 | 58 |
|
74 | | - - name: Verify role results |
75 | | - include_tasks: verify-role-results.yml |
| 59 | + - name: Verify role results |
| 60 | + include_tasks: verify-role-results.yml |
76 | 61 |
|
77 | | - - name: Change volume size to {{ volume_size_before }} |
78 | | - include_role: |
79 | | - name: linux-system-roles.storage |
80 | | - vars: |
81 | | - storage_pools: |
82 | | - - name: foo |
83 | | - type: lvm |
84 | | - disks: "{{ unused_disks }}" |
85 | | - volumes: |
86 | | - - name: test1 |
87 | | - fs_type: ext4 |
88 | | - size: "{{ volume_size_before }}" |
89 | | - mount_point: "{{ mount_location }}" |
| 62 | + - name: Change volume_size to {{ volume_size_after }} |
| 63 | + include_role: |
| 64 | + name: linux-system-roles.storage |
| 65 | + vars: |
| 66 | + storage_pools: |
| 67 | + - name: foo |
| 68 | + type: lvm |
| 69 | + disks: "{{ unused_disks }}" |
| 70 | + volumes: |
| 71 | + - name: test1 |
| 72 | + fs_type: 'ext4' |
| 73 | + size: "{{ volume_size_after }}" |
| 74 | + mount_point: "{{ mount_location }}" |
90 | 75 |
|
91 | | - - name: Verify role results |
92 | | - include_tasks: verify-role-results.yml |
| 76 | + - name: Verify role results |
| 77 | + include_tasks: verify-role-results.yml |
93 | 78 |
|
94 | | - - name: Test for correct handling of too-large volume size |
95 | | - include_tasks: verify-role-failed.yml |
96 | | - vars: |
97 | | - __storage_failed_regex: volume.+cannot be resized to.+ |
98 | | - __storage_failed_msg: >- |
99 | | - Unexpected behavior w/ invalid volume size |
100 | | - __storage_failed_params: |
101 | | - storage_pools: |
102 | | - - name: foo |
103 | | - disks: "{{ unused_disks }}" |
104 | | - volumes: |
105 | | - - name: test1 |
106 | | - fs_type: ext4 |
107 | | - size: "{{ too_large_size }}" |
108 | | - mount_point: "{{ mount_location }}" |
109 | | - |
110 | | - - name: Test for correct handling of volume size equal disk's size |
111 | | - block: |
112 | | - - name: >- |
113 | | - Try to create LVM with volume size equal disk's size, resize to |
114 | | - {{ disk_size }} |
| 79 | + - name: Change volume size to {{ volume_size_before }} |
115 | 80 | include_role: |
116 | 81 | name: linux-system-roles.storage |
117 | 82 | vars: |
118 | 83 | storage_pools: |
119 | 84 | - name: foo |
| 85 | + type: lvm |
120 | 86 | disks: "{{ unused_disks }}" |
121 | 87 | volumes: |
122 | 88 | - name: test1 |
123 | 89 | fs_type: ext4 |
124 | | - size: "{{ disk_size }}" |
| 90 | + size: "{{ volume_size_before }}" |
125 | 91 | mount_point: "{{ mount_location }}" |
126 | 92 |
|
127 | | - - name: Verify role results |
128 | | - include_tasks: verify-role-results.yml |
| 93 | + - name: Verify role results |
| 94 | + include_tasks: verify-role-results.yml |
129 | 95 |
|
130 | | - - name: Test for correct handling of invalid size specification |
131 | | - include_tasks: verify-role-failed.yml |
132 | | - vars: |
133 | | - __storage_failed_regex: invalid.+size |
134 | | - __storage_failed_msg: >- |
135 | | - Unexpected behavior w/ invalid volume size |
136 | | - __storage_failed_params: |
137 | | - storage_pools: |
138 | | - - name: foo |
139 | | - disks: "{{ unused_disks }}" |
140 | | - volumes: |
141 | | - - name: test1 |
142 | | - fs_type: ext4 |
143 | | - size: "{{ invalid_size1 }}" |
144 | | - mount_point: "{{ mount_location }}" |
145 | | - |
146 | | - - name: Test for correct handling of invalid size specification |
147 | | - include_tasks: verify-role-failed.yml |
148 | | - vars: |
149 | | - __storage_failed_regex: invalid.+size |
150 | | - __storage_failed_msg: >- |
151 | | - Unexpected behavior w/ invalid volume size |
152 | | - __storage_failed_params: |
153 | | - storage_pools: |
154 | | - - name: foo |
155 | | - disks: "{{ unused_disks }}" |
156 | | - volumes: |
157 | | - - name: test1 |
158 | | - fs_type: ext4 |
159 | | - size: "{{ invalid_size2 }}" |
160 | | - mount_point: "{{ mount_location }}" |
| 96 | + - name: Test for correct handling of too-large volume size |
| 97 | + include_tasks: verify-role-failed.yml |
| 98 | + vars: |
| 99 | + __storage_failed_regex: volume.+cannot be resized to.+ |
| 100 | + __storage_failed_msg: >- |
| 101 | + Unexpected behavior w/ invalid volume size |
| 102 | + __storage_failed_params: |
| 103 | + storage_pools: |
| 104 | + - name: foo |
| 105 | + disks: "{{ unused_disks }}" |
| 106 | + volumes: |
| 107 | + - name: test1 |
| 108 | + fs_type: ext4 |
| 109 | + size: "{{ too_large_size }}" |
| 110 | + mount_point: "{{ mount_location }}" |
161 | 111 |
|
162 | | - - name: Clean up |
163 | | - include_role: |
164 | | - name: linux-system-roles.storage |
165 | | - vars: |
166 | | - storage_pools: |
167 | | - - name: foo |
168 | | - disks: "{{ unused_disks }}" |
169 | | - state: absent |
170 | | - volumes: |
171 | | - - name: test1 |
172 | | - size: "{{ volume_size_before }}" |
173 | | - mount_point: "{{ mount_location }}" |
| 112 | + - name: Test for correct handling of volume size equal disk's size |
| 113 | + block: |
| 114 | + - name: >- |
| 115 | + Try to create LVM with volume size equal disk's size, resize to |
| 116 | + {{ disk_size }} |
| 117 | + include_role: |
| 118 | + name: linux-system-roles.storage |
| 119 | + vars: |
| 120 | + storage_pools: |
| 121 | + - name: foo |
| 122 | + disks: "{{ unused_disks }}" |
| 123 | + volumes: |
| 124 | + - name: test1 |
| 125 | + fs_type: ext4 |
| 126 | + size: "{{ disk_size }}" |
| 127 | + mount_point: "{{ mount_location }}" |
| 128 | +
|
| 129 | + - name: Verify role results |
| 130 | + include_tasks: verify-role-results.yml |
| 131 | + |
| 132 | + - name: Test for correct handling of invalid size specification |
| 133 | + include_tasks: verify-role-failed.yml |
| 134 | + vars: |
| 135 | + __storage_failed_regex: invalid.+size |
| 136 | + __storage_failed_msg: >- |
| 137 | + Unexpected behavior w/ invalid volume size |
| 138 | + __storage_failed_params: |
| 139 | + storage_pools: |
| 140 | + - name: foo |
| 141 | + disks: "{{ unused_disks }}" |
| 142 | + volumes: |
| 143 | + - name: test1 |
| 144 | + fs_type: ext4 |
| 145 | + size: "{{ invalid_size1 }}" |
| 146 | + mount_point: "{{ mount_location }}" |
| 147 | + |
| 148 | + - name: Test for correct handling of invalid size specification |
| 149 | + include_tasks: verify-role-failed.yml |
| 150 | + vars: |
| 151 | + __storage_failed_regex: invalid.+size |
| 152 | + __storage_failed_msg: >- |
| 153 | + Unexpected behavior w/ invalid volume size |
| 154 | + __storage_failed_params: |
| 155 | + storage_pools: |
| 156 | + - name: foo |
| 157 | + disks: "{{ unused_disks }}" |
| 158 | + volumes: |
| 159 | + - name: test1 |
| 160 | + fs_type: ext4 |
| 161 | + size: "{{ invalid_size2 }}" |
| 162 | + mount_point: "{{ mount_location }}" |
| 163 | + |
| 164 | + always: |
| 165 | + - name: Clean up |
| 166 | + include_role: |
| 167 | + name: linux-system-roles.storage |
| 168 | + vars: |
| 169 | + storage_pools: |
| 170 | + - name: foo |
| 171 | + disks: "{{ unused_disks }}" |
| 172 | + state: absent |
| 173 | + volumes: |
| 174 | + - name: test1 |
| 175 | + size: "{{ volume_size_before }}" |
| 176 | + mount_point: "{{ mount_location }}" |
174 | 177 |
|
175 | 178 | - name: Verify role results |
176 | 179 | include_tasks: verify-role-results.yml |
177 | 180 |
|
178 | 181 | # For ext3 FS |
179 | 182 |
|
180 | | - - name: >- |
181 | | - Create a LVM logical volume with for ext3 FS size |
182 | | - {{ volume_size_before }} |
183 | | - include_role: |
184 | | - name: linux-system-roles.storage |
185 | | - vars: |
186 | | - storage_pools: |
187 | | - - name: foo |
188 | | - type: lvm |
189 | | - disks: "{{ unused_disks }}" |
190 | | - volumes: |
191 | | - - name: test1 |
192 | | - fs_type: ext3 |
193 | | - size: "{{ volume_size_before }}" |
194 | | - mount_point: "{{ mount_location }}" |
| 183 | + - name: Test ext3 |
| 184 | + block: |
| 185 | + - name: >- |
| 186 | + Create a LVM logical volume with for ext3 FS size |
| 187 | + {{ volume_size_before }} |
| 188 | + include_role: |
| 189 | + name: linux-system-roles.storage |
| 190 | + vars: |
| 191 | + storage_pools: |
| 192 | + - name: foo |
| 193 | + type: lvm |
| 194 | + disks: "{{ unused_disks }}" |
| 195 | + volumes: |
| 196 | + - name: test1 |
| 197 | + fs_type: ext3 |
| 198 | + size: "{{ volume_size_before }}" |
| 199 | + mount_point: "{{ mount_location }}" |
195 | 200 |
|
196 | | - - name: Verify role results |
197 | | - include_tasks: verify-role-results.yml |
| 201 | + - name: Verify role results |
| 202 | + include_tasks: verify-role-results.yml |
198 | 203 |
|
199 | | - - name: Change volume size to {{ volume_size_after }} |
200 | | - include_role: |
201 | | - name: linux-system-roles.storage |
202 | | - vars: |
203 | | - storage_pools: |
204 | | - - name: foo |
205 | | - type: lvm |
206 | | - disks: "{{ unused_disks }}" |
207 | | - volumes: |
208 | | - - name: test1 |
209 | | - fs_type: ext3 |
210 | | - size: "{{ volume_size_after }}" |
211 | | - mount_point: "{{ mount_location }}" |
| 204 | + - name: Change volume size to {{ volume_size_after }} |
| 205 | + include_role: |
| 206 | + name: linux-system-roles.storage |
| 207 | + vars: |
| 208 | + storage_pools: |
| 209 | + - name: foo |
| 210 | + type: lvm |
| 211 | + disks: "{{ unused_disks }}" |
| 212 | + volumes: |
| 213 | + - name: test1 |
| 214 | + fs_type: ext3 |
| 215 | + size: "{{ volume_size_after }}" |
| 216 | + mount_point: "{{ mount_location }}" |
212 | 217 |
|
213 | | - - name: Verify role results |
214 | | - include_tasks: verify-role-results.yml |
| 218 | + - name: Verify role results |
| 219 | + include_tasks: verify-role-results.yml |
215 | 220 |
|
216 | | - - name: Change volume size to {{ volume_size_before }} |
217 | | - include_role: |
218 | | - name: linux-system-roles.storage |
219 | | - vars: |
220 | | - storage_pools: |
221 | | - - name: foo |
222 | | - type: lvm |
223 | | - disks: "{{ unused_disks }}" |
224 | | - volumes: |
225 | | - - name: test1 |
226 | | - fs_type: ext3 |
227 | | - size: "{{ volume_size_before }}" |
228 | | - mount_point: "{{ mount_location }}" |
| 221 | + - name: Change volume size to {{ volume_size_before }} |
| 222 | + include_role: |
| 223 | + name: linux-system-roles.storage |
| 224 | + vars: |
| 225 | + storage_pools: |
| 226 | + - name: foo |
| 227 | + type: lvm |
| 228 | + disks: "{{ unused_disks }}" |
| 229 | + volumes: |
| 230 | + - name: test1 |
| 231 | + fs_type: ext3 |
| 232 | + size: "{{ volume_size_before }}" |
| 233 | + mount_point: "{{ mount_location }}" |
229 | 234 |
|
230 | | - - name: Verify role results |
231 | | - include_tasks: verify-role-results.yml |
| 235 | + - name: Verify role results |
| 236 | + include_tasks: verify-role-results.yml |
232 | 237 |
|
233 | | - - name: Clean up |
234 | | - include_role: |
235 | | - name: linux-system-roles.storage |
236 | | - vars: |
237 | | - storage_pools: |
238 | | - - name: foo |
239 | | - disks: "{{ unused_disks }}" |
240 | | - state: absent |
241 | | - volumes: |
242 | | - - name: test1 |
243 | | - size: "{{ volume_size_before }}" |
244 | | - mount_point: "{{ mount_location }}" |
| 238 | + always: |
| 239 | + - name: Clean up |
| 240 | + include_role: |
| 241 | + name: linux-system-roles.storage |
| 242 | + vars: |
| 243 | + storage_pools: |
| 244 | + - name: foo |
| 245 | + disks: "{{ unused_disks }}" |
| 246 | + state: absent |
| 247 | + volumes: |
| 248 | + - name: test1 |
| 249 | + size: "{{ volume_size_before }}" |
| 250 | + mount_point: "{{ mount_location }}" |
245 | 251 |
|
246 | 252 | - name: Verify role results |
247 | 253 | include_tasks: verify-role-results.yml |
|
0 commit comments