hi
i am working on openlmi-storage and while testing test_create_mdraid.py i
am getting test failed error .
" File "test/test_create_mdraid.py", line 167, in _test_raid_n
self.assertEqual(len(outparams), 2)"
i followed the following procedure.
[root@node5 sunil]# fdisk /dev/sdc
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x3e6a2c9f.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): e
Partition number (1-4, default 1): 1
First sector (2048-62914559, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-62914559, default 62914559):
Using default value 62914559
Partition 1 of type Extended and of size 30 GiB is set
Command (m for help): n
Partition type:
p primary (0 primary, 1 extended, 3 free)
l logical (numbered from 5)
Select (default p): l
Adding logical partition 5
First sector (4096-62914559, default 4096):
Using default value 4096
Last sector, +sectors or +size{K,M,G} (4096-62914559, default 62914559): +2G
Partition 5 of type Linux and of size 2 GiB is set
........ same i followed to create the partion...
Command (m for help): n
Partition type:
p primary (0 primary, 1 extended, 3 free)
l logical (numbered from 5)
Select (default p): l
Adding logical partition 15
First sector (41967616-62914559, default 41967616):
Using default value 41967616
Last sector, +sectors or +size{K,M,G} (41967616-62914559, default
62914559): +2G
Partition 15 of type Linux and of size 2 GiB is set
Command (m for help): p
Disk /dev/sdc: 32.2 GB, 32212254720 bytes, 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x3e6a2c9f
Device Boot Start End Blocks Id System
/dev/sdc1 2048 62914559 31456256 5 Extended
/dev/sdc5 4096 4198399 2097152 83 Linux
/dev/sdc6 4200448 8394751 2097152 83 Linux
/dev/sdc7 8396800 12591103 2097152 83 Linux
/dev/sdc8 12593152 16787455 2097152 83 Linux
/dev/sdc9 16789504 20983807 2097152 83 Linux
/dev/sdc10 20985856 25180159 2097152 83 Linux
/dev/sdc11 25182208 29376511 2097152 83 Linux
/dev/sdc12 29378560 33572863 2097152 83 Linux
/dev/sdc13 33574912 37769215 2097152 83 Linux
/dev/sdc14 37771264 41965567 2097152 83 Linux
/dev/sdc15 41967616 46161919 2097152 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@node5 test]# LMI_CIMOM_USERNAME="pegasus"
[root@node5 test]# echo $LMI_CIMOM_USERNAME
pegasus
[root@node5 test]# LMI_CIMOM_URL="https://localhost:5989"
[root@node5 test]# echo $LMI_CIMOM_URL
https://localhost:5989
[root@node5 test]# LMI_CIMOM_PASSWORD="sunil"
[root@node5 test]# echo $LMI_CIMOM_PASSWORD
sunil
[root@node5 test]# mkfs.btrfs /dev/sdb
WARNING! - Btrfs v0.20-rc1 IS EXPERIMENTAL
WARNING! - see
http://btrfs.wiki.kernel.org before using
fs created label (null) on /dev/sdb
nodesize 4096 leafsize 4096 sectorsize 4096 size 30.00GB
Btrfs v0.20-rc1
[root@node5 test]# LMI_STORAGE_DISK="/dev/sdb"
[root@node5 test]# echo $LMI_STORAGE_DISK
/dev/sdb
[root@node5 test]# export LMI_STORAGE_DISK
[root@node5 test]# fdisk -l /dev/sdc
Disk /dev/sdc: 32.2 GB, 32212254720 bytes, 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x3e6a2c9f
Device Boot Start End Blocks Id System
/dev/sdc1 2048 62914559 31456256 5 Extended
/dev/sdc5 4096 4198399 2097152 83 Linux
/dev/sdc6 4200448 8394751 2097152 83 Linux
/dev/sdc7 8396800 12591103 2097152 83 Linux
/dev/sdc8 12593152 16787455 2097152 83 Linux
/dev/sdc9 16789504 20983807 2097152 83 Linux
/dev/sdc10 20985856 25180159 2097152 83 Linux
/dev/sdc11 25182208 29376511 2097152 83 Linux
/dev/sdc12 29378560 33572863 2097152 83 Linux
/dev/sdc13 33574912 37769215 2097152 83 Linux
/dev/sdc14 37771264 41965567 2097152 83 Linux
/dev/sdc15 41967616 46161919 2097152 83 Linux
[root@node5 test]# LMI_STORAGE_PARTITIONS="/dev/sdc5 /dev/sdc6 /dev/sdc7
/dev/sdc8 /dev/sdc9 /dev/sdc10 /dev/sdc11 /dev/sdc12 /dev/sdc13 /dev/sdc14
/dev/sdc15"
[root@node5 test]# echo $LMI_STORAGE_PARTITIONS
/dev/sdc5 /dev/sdc6 /dev/sdc7 /dev/sdc8 /dev/sdc9 /dev/sdc10 /dev/sdc11
/dev/sdc12 /dev/sdc13 /dev/sdc14 /dev/sdc15
[root@node5 test]# export LMI_STORAGE_PARTITIONS
[root@node5 openlmi-storage]# systemctl start tog-pegasus.service
[root@node5 openlmi-storage]# systemctl start httpd
[root@node5 openlmi-storage]# python test/test_create_mdraid.py
FRunning: /home/sunil/openlmi-storage/test/tools/mdremove /dev/md127
Destroying RAID /dev/md127
mdadm: stopped /dev/md127
mdadm: error opening /dev/md127: No such file or directory
1024+0 records in
1024+0 records out
524288 bytes (524 kB) copied, 0.1063 s, 4.9 MB/s
mdadm: error opening /dev/md127: No such file or directory
........ some raids are created and destroyed.. but at the end i am geting
this error..
mdadm: error opening /dev/md127: No such file or directory
1024+0 records in
1024+0 records out
524288 bytes (524 kB) copied, 0.0719428 s, 7.3 MB/s
mdadm: cannot get array info for /dev/md127
1024+0 records in
1024+0 records out
524288 bytes (524 kB) copied, 0.036247 s, 14.5 MB/s
mdadm: cannot get array info for /dev/md127
1024+0 records in
1024+0 records out
524288 bytes (524 kB) copied, 0.0357425 s, 14.7 MB/s
Running: systemctl restart sblim-sfcb
FEEE..
======================================================================
ERROR: test_create_on_disk (__main__.TestCreateMDRAID)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_create_mdraid.py", line 774, in test_create_on_disk
raidname = outparams['theelement']
File "/usr/lib/python2.7/site-packages/pywbem/cim_obj.py", line 78, in
__getitem__
raise KeyError, key
KeyError: 'theelement'
======================================================================
ERROR: test_create_raid5_level (__main__.TestCreateMDRAID)
Test CreateOrModifyMDRAID level 5.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_create_mdraid.py", line 364, in test_create_raid5_level
expected_size=partition_size * 2)
File "test/test_create_mdraid.py", line 157, in _test_raid_n
Level=pywbem.Uint16(level))
File "/home/sunil/openlmi-storage/test/test_base.py", line 506, in
invoke_async_method
**kwargs)
File "/usr/lib/python2.7/site-packages/pywbem/cim_operations.py", line
800, in InvokeMethod
result = self.methodcall(MethodName, obj, **params)
File "/usr/lib/python2.7/site-packages/pywbem/cim_operations.py", line
361, in methodcall
raise CIMError(code, tt[0][1]['DESCRIPTION'])
CIMError: (1, u'CIM_ERR_FAILED: Device /dev/sdc5 is used by
/dev/md/blivet00.')
======================================================================
ERROR: test_create_raid6_goal (__main__.TestCreateMDRAID)
Test CreateOrModifyMDRAID level 6 with Goal.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_create_mdraid.py", line 435, in test_create_raid6_goal
goal=setting.path)
File "test/test_create_mdraid.py", line 150, in _test_raid_n
Goal=goal)
File "/home/sunil/openlmi-storage/test/test_base.py", line 506, in
invoke_async_method
**kwargs)
File "/usr/lib/python2.7/site-packages/pywbem/cim_operations.py", line
800, in InvokeMethod
result = self.methodcall(MethodName, obj, **params)
File "/usr/lib/python2.7/site-packages/pywbem/cim_operations.py", line
361, in methodcall
raise CIMError(code, tt[0][1]['DESCRIPTION'])
CIMError: (1, u'CIM_ERR_FAILED: Device /dev/sdc5 is used by
/dev/md/blivet00.')
======================================================================
ERROR: test_create_raid6_level (__main__.TestCreateMDRAID)
Test CreateOrModifyMDRAID level 6.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_create_mdraid.py", line 412, in test_create_raid6_level
expected_size=partition_size * 2)
File "test/test_create_mdraid.py", line 157, in _test_raid_n
Level=pywbem.Uint16(level))
File "/home/sunil/openlmi-storage/test/test_base.py", line 506, in
invoke_async_method
**kwargs)
File "/usr/lib/python2.7/site-packages/pywbem/cim_operations.py", line
800, in InvokeMethod
result = self.methodcall(MethodName, obj, **params)
File "/usr/lib/python2.7/site-packages/pywbem/cim_operations.py", line
361, in methodcall
raise CIMError(code, tt[0][1]['DESCRIPTION'])
CIMError: (1, u'CIM_ERR_FAILED: Device /dev/sdc5 is used by
/dev/md/blivet00.')
======================================================================
FAIL: test_create_calculate_goals (__main__.TestCreateMDRAID)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_create_mdraid.py", line 656, in
test_create_calculate_goals
goal=setting.path)
File "test/test_create_mdraid.py", line 167, in _test_raid_n
self.assertEqual(len(outparams), 2)
AssertionError: 5 != 2
======================================================================
FAIL: test_create_raid0_goal (__main__.TestCreateMDRAID)
Test CreateOrModifyMDRAID level 0 with Goal.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_create_mdraid.py", line 243, in test_create_raid0_goal
goal=setting.path)
File "test/test_create_mdraid.py", line 167, in _test_raid_n
self.assertEqual(len(outparams), 2)
AssertionError: 5 != 2
======================================================================
FAIL: test_create_raid0_level (__main__.TestCreateMDRAID)
Test CreateOrModifyMDRAID level 0.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_create_mdraid.py", line 221, in test_create_raid0_level
expected_size=partition_size * 2)
File "test/test_create_mdraid.py", line 167, in _test_raid_n
self.assertEqual(len(outparams), 2)
AssertionError: 5 != 2
======================================================================
FAIL: test_create_raid10_goal (__main__.TestCreateMDRAID)
Test CreateOrModifyMDRAID level 10 with a valid Goal.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_create_mdraid.py", line 492, in test_create_raid10_goal
goal=setting.path)
File "test/test_create_mdraid.py", line 167, in _test_raid_n
self.assertEqual(len(outparams), 2)
AssertionError: 5 != 2
======================================================================
FAIL: test_create_raid10_level (__main__.TestCreateMDRAID)
Test CreateOrModifyMDRAID level 10.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_create_mdraid.py", line 461, in test_create_raid10_level
expected_size=partition_size * 2)
File "test/test_create_mdraid.py", line 167, in _test_raid_n
self.assertEqual(len(outparams), 2)
AssertionError: 5 != 2
======================================================================
FAIL: test_create_raid1_goal (__main__.TestCreateMDRAID)
Test CreateOrModifyMDRAID level 1 with Goal.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_create_mdraid.py", line 291, in test_create_raid1_goal
goal=setting.path)
File "test/test_create_mdraid.py", line 167, in _test_raid_n
self.assertEqual(len(outparams), 2)
AssertionError: 5 != 2
======================================================================
FAIL: test_create_raid1_level (__main__.TestCreateMDRAID)
Test CreateOrModifyMDRAID level 1.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_create_mdraid.py", line 268, in test_create_raid1_level
expected_size=partition_size)
File "test/test_create_mdraid.py", line 167, in _test_raid_n
self.assertEqual(len(outparams), 2)
AssertionError: 5 != 2
======================================================================
FAIL: test_create_raid4_goal (__main__.TestCreateMDRAID)
Test CreateOrModifyMDRAID level 4 with Goal.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_create_mdraid.py", line 339, in test_create_raid4_goal
goal=setting.path)
File "test/test_create_mdraid.py", line 167, in _test_raid_n
self.assertEqual(len(outparams), 2)
AssertionError: 5 != 2
======================================================================
FAIL: test_create_raid4_level (__main__.TestCreateMDRAID)
Test CreateOrModifyMDRAID level 4.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_create_mdraid.py", line 316, in test_create_raid4_level
expected_size=partition_size * 2)
File "test/test_create_mdraid.py", line 167, in _test_raid_n
self.assertEqual(len(outparams), 2)
AssertionError: 5 != 2
======================================================================
FAIL: test_create_raid5_goal (__main__.TestCreateMDRAID)
Test CreateOrModifyMDRAID level 5 with Goal.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_create_mdraid.py", line 387, in test_create_raid5_goal
goal=setting.path)
File "test/test_create_mdraid.py", line 167, in _test_raid_n
self.assertEqual(len(outparams), 2)
AssertionError: 5 != 2
----------------------------------------------------------------------
Ran 16 tests in 912.674s
FAILED (failures=10, errors=4)