[one-users] mkswap operation failed

Dmitri Chebotarov dchebota at gmu.edu
Wed Apr 30 06:08:26 PDT 2014


Hi

I'm running ONE 4.2. 
Hosts are CentOS 6.5 /w selinux enabled. 

Few VMs are using SWAP disk, ie. DISK=[SIZE="2048",TYPE="swap",DEV_PREFIX="vd",FORMAT="raw"].
For those VMs I get the error when trying deploy:
(it works OK with selinux=disabled)

Wed Apr 30 00:50:52 2014 [DiM][I]: New VM state is ACTIVE.
Wed Apr 30 00:50:52 2014 [LCM][I]: New VM state is PROLOG.
Wed Apr 30 00:50:52 2014 [VM][I]: Virtual Machine has no context
Wed Apr 30 00:50:53 2014 [TM][I]: Command execution fail: /var/lib/one/remotes/tm/shared/mkswap 2048 BC2-3:/var/lib/one//datastores/111/33080/disk.1 33080 111
Wed Apr 30 00:50:53 2014 [TM][I]: mkimage: Making filesystem of 2048M and type swap at BC2-3:/var/lib/one//datastores/111/33080/disk.1
Wed Apr 30 00:50:53 2014 [TM][E]: mkimage: Command "export PATH=/usr/sbin:/sbin:$PATH
Wed Apr 30 00:50:53 2014 [TM][I]: dd if=/dev/zero of=/var/lib/one/datastores/111/33080/disk.1 bs=1 count=1 seek=2048M
Wed Apr 30 00:50:53 2014 [TM][I]: mkswap -L swap /var/lib/one/datastores/111/33080/disk.1" failed: 1+0 records in
Wed Apr 30 00:50:53 2014 [TM][I]: 1+0 records out
Wed Apr 30 00:50:53 2014 [TM][I]: 1 byte (1 B) copied, 0.00126622 s, 0.8 kB/s
Wed Apr 30 00:50:53 2014 [TM][I]: mkswap: unable to relabel /var/lib/one/datastores/111/33080/disk.1 to system_u:object_r:swapfile_t:s0: Operation not supported
Wed Apr 30 00:50:53 2014 [TM][E]: Could not create image /var/lib/one/datastores/111/33080/disk.1
Wed Apr 30 00:50:53 2014 [TM][I]: ExitCode: 1
Wed Apr 30 00:50:53 2014 [TM][E]: Error executing image transfer script: Could not create image /var/lib/one/datastores/111/33080/disk.1
Wed Apr 30 00:50:53 2014 [DiM][I]: New VM state is FAILED
Wed Apr 30 00:50:53 2014 [DiM][I]: New VM state is CLEANUP.

I ran the same commands manually on the same host and get the same error, but swap created OK anyway:

[oneadmin at BC2-3 ~]$ dd if=/dev/zero of=/var/lib/one/datastores/111/delete.swap bs=1 count=1 seek=2048M
1+0 records in
1+0 records out
1 byte (1 B) copied, 0.00120218 s, 0.8 kB/s

[oneadmin at BC2-3 ~]$ file /var/lib/one/datastores/111/delete.swap
/var/lib/one/datastores/111/delete.swap: data

[oneadmin at BC2-3 ~]$ mkswap -L swap /var/lib/one/datastores/111/delete.swap
mkswap: /var/lib/one/datastores/111/delete.swap: warning: don't erase bootbits sectors
        on whole disk. Use -f to force.
Setting up swapspace version 1, size = 2097148 KiB
LABEL=swap, UUID=fa3e4e9b-1701-4e8f-a62f-df1d77f50441
mkswap: unable to relabel /var/lib/one/datastores/111/delete.swap to system_u:object_r:swapfile_t:s0: Operation not supported

[oneadmin at BC2-3 ~]$ file /var/lib/one/datastores/111/delete.swap
/var/lib/one/datastores/111/delete.swap: Linux/i386 swap file (new style) 1 (4K pages) size 524287 pages Label swap

Looks like the message about "unable to relabel" is a warning, not error, and it would be OK to continue boot process for the VM.
--
Thank you,

Dmitri Chebotarov
VCL Sys Eng, Engineering & Architectural Support, TSD - Ent Servers & Messaging
223 Aquia Building, Ffx, MSN: 1B5
Phone: (703) 993-6175 | Fax: (703) 993-3404




More information about the Users mailing list