mount_check doesn't work when using filesystem UUIDs instead of device names

Bug #1064913 reported by Sergio Rubio
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
Unassigned

Bug Description

I guess it's related to the drive.isalnum() check in swift/common/constraints.py returning false when using FS UUID instead of a block device name like sdXX

I could be wrong, but paths like /dev/sdX aren't guaranteed to be persistent with some storage configurations(1) so using UUIDs for drives would be a nice feature to have.

The workaround is either to disable mount_check in /etc/swift/*-server.conf or comment out the:

if not drive.isalnum():
    return False

in swift/common/constraints.py.

Tested using Ubuntu Precise's Swift packages:

python-swift:
  Installed: 1.4.8-0ubuntu2
  Candidate: 1.4.8-0ubuntu2
  Version table:
 *** 1.4.8-0ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

(1) "4. Persistent Naming"
https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/persistent_naming.html

Revision history for this message
Sergio Rubio (rubiojr) wrote :

Forgot to mention that we're using ring devices like:

Devices: id zone ip address port name weight partitions balance meta
             0 2 1.2.3.4 6002 0b1b6364-7b5b-4ed6-8e40-2ad393e33fa8 3.00 43690 -0.00

and mount points like:

/srv/node/0b1b6364-7b5b-4ed6-8e40-2ad393e33fa8

Sergio Rubio (rubiojr)
description: updated
Revision history for this message
Constantine Peresypkin (constantine-q) wrote :

Interesting drive.isalnum() is there from the first commit. I think it can be removed.
I really don't see why mount point must be alphanumeric.

Revision history for this message
Samuel Merritt (torgomatic) wrote :

Fixed in commit 956cc0c.

Changed in swift:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in swift:
milestone: none → 1.7.5
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.