Loop on mount nfs share on cinder-volume

Bug #1425551 reported by Daniele Rondina
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Rushil Chugh

Bug Description

If state_path variable is configured with a final '/' on path then mount_path variable is create with a wrong syntax and then when try to check if filesystem is already mounted ( file remotefs.py function mount) this code failed:

 if mount_path in self._read_mounts():
...

and then at every check remount same filesystem also if already mounted.

For example:

state_path = /var/lib/cinder/

mount_path variable on remotefs.py will be:

/var/lib/cinder//mnt/14093d2c4e69a88ee039e3650e7ccfe9

and then key on dictionary returned by _read_mounts functions that has correctly path

/var/lib/cinder/mnt/14093d2c4e69a88ee039e3650e7ccfe9

without additional slash will never match.

I think that could be useful add a check that escape last slash from state_path.

Daniele Rondina (geaaru)
description: updated
Rushil Chugh (rushil)
Changed in cinder:
assignee: nobody → Rushil Chugh (rushil)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/163032

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/163032
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=ea2d255be4369b4f63312f371da4bb169859044d
Submitter: Jenkins
Branch: master

commit ea2d255be4369b4f63312f371da4bb169859044d
Author: Rushil Chugh <email address hidden>
Date: Thu Mar 5 17:16:26 2015 -0500

    Fixing mount when state_path is configured with a final '/'

    If state_path variable is configured with a final '/' on path, then
    mount_path variable is created with wrong syntax. This causes
    a failure when the c-vol process tries to mount the filesystem.

    This patch proposes to fix the aforementioned problem by checking
    the validity of the mount point and fixing the mount point in case
    it has an incorrect value.

    Closes-bug: 1425551

    Change-Id: I9fe50fe07953fb5e94da467a7446528e5030e41b

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-3 → 2015.1.0
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.