Bug 1288101 - Snapshot creation fails with incorrect output with older selinux-policy
Snapshot creation fails with incorrect output with older selinux-policy
Status: NEW
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: snapshot (Show other bugs)
3.1
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: rjoseph
storage-qa-internal@redhat.com
: Triaged, ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-03 09:15 EST by Shashank Raj
Modified: 2017-03-25 12:26 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Shashank Raj 2015-12-03 09:15:14 EST
Description of problem:
Snapshot creation fails with incorrect output with older selinux-policy

Version-Release number of selected component (if applicable):
glusterfs-3.7.5-8

How reproducible:
Always

Steps to Reproduce:
1. Create a snapshot of the volume when selinux-policy on the node is not updated.
2. Observe that the snapshot creation fails with "snapshot create: failed: Snapshot is supported only for thin provisioned LV. Ensure that all bricks of v1 are thinly provisioned LV." even when the bricks are thinly provisioned.


Actual results:

snapshot creation fails with "snapshot create: failed: Snapshot is supported only for thin provisioned LV. Ensure that all bricks of v1 are thinly provisioned LV." even when the bricks are thinly provisioned.


Expected results:

Return proper error related to permission of selinux


Additional info:

details from the machine:

[root@dhcp43-185 ~]# rpm -qa | grep selinux
selinux-policy-3.13.1-23.el7.noarch
libselinux-python-2.2.2-6.el7.x86_64
libselinux-2.2.2-6.el7.x86_64
selinux-policy-targeted-3.13.1-23.el7.noarch
libselinux-utils-2.2.2-6.el7.x86_64

[root@dhcp43-185 ~]# gluster snapshot create snap3 v1
snapshot create: failed: Snapshot is supported only for thin provisioned LV. Ensure that all bricks of v1 are thinly provisioned LV.
Snapshot command failed

[root@dhcp43-185 ~]# tail -20 /var/log/glusterfs/etc-glusterfs-glusterd.vol.log
[2015-11-27 11:12:01.171645] I [MSGID: 106488] [glusterd-handler.c:1463:__glusterd_handle_cli_get_volume] 0-glusterd: Received get vol req
[2015-11-27 11:12:02.630826] W [socket.c:642:__socket_rwv] 0-nfs: readv on /var/run/gluster/302ad463831cf63262bd8d6c4f62e21e.socket failed (Invalid argument)
[2015-11-27 11:12:05.631587] W [socket.c:642:__socket_rwv] 0-nfs: readv on /var/run/gluster/302ad463831cf63262bd8d6c4f62e21e.socket failed (Invalid argument)
[2015-11-27 11:12:08.632457] W [socket.c:642:__socket_rwv] 0-nfs: readv on /var/run/gluster/302ad463831cf63262bd8d6c4f62e21e.socket failed (Invalid argument)
[2015-11-27 11:12:11.633175] W [socket.c:642:__socket_rwv] 0-nfs: readv on /var/run/gluster/302ad463831cf63262bd8d6c4f62e21e.socket failed (Invalid argument)
[2015-11-27 11:12:14.633892] W [socket.c:642:__socket_rwv] 0-nfs: readv on /var/run/gluster/302ad463831cf63262bd8d6c4f62e21e.socket failed (Invalid argument)
[2015-11-27 11:12:16.021855] E [MSGID: 106078] [glusterd-snapshot.c:1920:glusterd_is_thinp_brick] 0-management: Failed to get thin pool name for device /dev/mapper/vg1-v1 [Permission denied]
[2015-11-27 11:12:16.022902] E [MSGID: 106122] [glusterd-snapshot.c:2443:glusterd_snapshot_create_prevalidate] 0-management: Failed to pre validate
[2015-11-27 11:12:16.022955] E [MSGID: 106024] [glusterd-snapshot.c:2460:glusterd_snapshot_create_prevalidate] 0-management: Snapshot is supported only for thin provisioned LV. Ensure that all bricks of v1 are thinly provisioned LV.
[2015-11-27 11:12:16.023003] W [MSGID: 106030] [glusterd-snapshot.c:8214:glusterd_snapshot_prevalidate] 0-management: Snapshot create pre-validation failed
[2015-11-27 11:12:16.023025] W [MSGID: 106122] [glusterd-mgmt.c:166:gd_mgmt_v3_pre_validate_fn] 0-management: Snapshot Prevalidate Failed
[2015-11-27 11:12:16.023043] E [MSGID: 106122] [glusterd-mgmt.c:759:glusterd_mgmt_v3_pre_validate] 0-management: Pre Validation failed for operation Snapshot on local node
[2015-11-27 11:12:16.023061] E [MSGID: 106122] [glusterd-mgmt.c:2103:glusterd_mgmt_v3_initiate_snap_phases] 0-management: Pre Validation Failed


[root@dhcp43-185 ~]# lvdisplay -Cv
    Using logical volume(s) on command line.
    Finding all volume groups.
  LV                                 VG              #Seg Attr       LSize  Maj Min KMaj KMin Pool  Origin Data%  Meta%  Move Cpy%Sync Log Convert LV UUID                                LProfile
  root                               rhel_dhcp43-185    1 -wi-ao---- 37.46g  -1  -1  253    0                                                      FLq00N-lN6q-3gfc-Ibht-drvW-CY3x-RY4WIT         
  swap                               rhel_dhcp43-185    1 -wi-ao----  2.00g  -1  -1  253    1                                                      zuA10u-gBSm-pPNM-syuS-O6rj-TQCA-22Hnp4         
  f997e0ceeb214e4cbc6b01f353e35c35_0 vg1                1 Vwi-aotz--  7.00g  -1  -1  253   22 tpool v1     4.73                                    dOsv2K-eqJf-9CKw-inyH-FqmH-Fzdg-Y09SyK         
  tpool                              vg1                1 twi-aotz--  7.00g  -1  -1  253    4              4.87   3.27                             1aPPcG-rUBL-OYL5-jAwp-EnG5-gY3h-242z03         
  v1                                 vg1                1 Vwi-aotz--  7.00g  -1  -1  253    6 tpool        4.73                                    9RX4LQ-i3uc-RF2D-PSNH-U2eK-f67d-1yIDE3         
  f997e0ceeb214e4cbc6b01f353e35c35_1 vg2                1 Vwi-aotz--  7.00g  -1  -1  253   23 tpool v1     4.76                                    KS0DoV-btzd-4vn0-v6JZ-w41N-K09c-xj6wJB         
  tpool                              vg2                1 twi-aotz--  7.00g  -1  -1  253    9              4.90   3.27                             T8AFwY-hugN-ESpu-tPa8-j3Cv-rJnE-ZRc1Yj         
  v1                                 vg2                1 Vwi-aotz--  7.00g  -1  -1  253   17 tpool        4.76                                    8MgOng-sF3q-ZqRE-uJkH-FKoY-eHC2-iDQJMQ         
  tpool                              vg3                1 twi-aotz--  7.00g  -1  -1  253   12              0.15   0.83                             R0UZXw-qcQ8-4aZJ-JXiW-ODMQ-VWrc-TWqISr         
  v1                                 vg3                1 Vwi-aotz--  7.00g  -1  -1  253   19 tpool        0.15                                    GxnRXL-lne0-jaN5-q6rB-JJ13-P2mK-WjWLHy         
  tpool                              vg4                1 twi-aotz--  7.00g  -1  -1  253   15              0.15   0.83                             MB3EQu-4QL7-2R6H-wkYD-NWdd-Hk3u-c2oUAJ         
  v1                                 vg4                1 Vwi-aotz--  7.00g  -1  -1  253   21 tpool        0.15                                    f2W1ST-kt1i-28dz-FApi-4gFS-zIc1-8Bms0k    



[root@dhcp43-185 ~]# gluster v info 
 
Volume Name: v1
Type: Distributed-Replicate
Volume ID: 4ffe3c6d-8963-4ad4-a292-6361b1b5c4a1
Status: Started
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: 10.70.43.185:/mnt/b1
Brick2: 10.70.42.96:/mnt/b1
Brick3: 10.70.43.185:/mnt/b2
Brick4: 10.70.42.96:/mnt/b2
Options Reconfigured:
features.barrier: disable
performance.readdir-ahead: on
features.quota: on
features.inode-quota: on
features.quota-deem-statfs: on


[root@dhcp43-185 ~]# df -h 
Filesystem                                          Size  Used Avail Use% Mounted on
/dev/mapper/rhel_dhcp43--185-root                    38G  1.1G   37G   3% /
devtmpfs                                            911M     0  911M   0% /dev
tmpfs                                               921M     0  921M   0% /dev/shm
tmpfs                                               921M  8.6M  912M   1% /run
tmpfs                                               921M     0  921M   0% /sys/fs/cgroup
/dev/vda1                                           497M  119M  378M  24% /boot
/dev/mapper/vg1-v1                                  7.0G  196M  6.8G   3% /mnt/b1
/dev/mapper/vg2-v1                                  7.0G  195M  6.9G   3% /mnt/b2
/dev/mapper/vg3-v1                                  7.0G   33M  7.0G   1% /mnt/b3
/dev/mapper/vg4-v1                                  7.0G   33M  7.0G   1% /mnt/b4
localhost:v1                                         14G  390M   14G   3% /run/gluster/v1
/dev/mapper/vg2-f997e0ceeb214e4cbc6b01f353e35c35_1  7.0G  195M  6.9G   3% /run/gluster/snaps/f997e0ceeb214e4cbc6b01f353e35c35/brick3
/dev/mapper/vg1-f997e0ceeb214e4cbc6b01f353e35c35_0  7.0G  196M  6.8G   3% /run/gluster/snaps/f997e0ceeb214e4cbc6b01f353e35c35/brick1

Note You need to log in before you can comment on or make changes to this bug.