cinder mounting nfs and glusterfs volume will fail silently when cinder is installed in machines with other language than english

Bug #1172777 reported by mouadino on 2013-04-25
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

Let's dive in the code directly shall we:

    def _path_exists(self, path):
         """Check for existence of given path."""
             self._execute('stat', path, run_as_root=True)
             return True
         except exception.ProcessExecutionError as exc:
             if 'No such file or directory' in exc.stderr:
                 return False

This method is part of RemoteFsDriver class (in /volume/drivers/ ) and this is where the bug is, to check that a path exist it execute the command "stat" and than lookup the sentence "No such file or directory" in stderr, so clearly this will fail big time if host machine language is different than english.

But it surely there is no easy way as far as i know to test if a path exist as another system user (root), but the good news is that we don't need to, actually we can remove this method, and everything will work fine, patch coming soon for more detail on what i mean :)


mouadino (mouadino) on 2013-04-25
Changed in cinder:
assignee: nobody → mouadino (mouadino)

Fix proposed to branch: master

Changed in cinder:
status: New → In Progress

I am out of the office until 05/12/2013.

For technical issues regarding the Storwize/SVC Cinder driver, please
contact: Jie Ping Wu <email address hidden>, Li Min Liu <email address hidden>,
Ronen Kat <email address hidden>
For all other issue, please contact my manager, Dalit Naor
<email address hidden>

Note: This is an automated response to your message "[Bug 1172777] [NEW]
cinder mounting nfs and glusterfs volume will fail silently when cinder
is installed in machines with other language than english" sent on
25/04/2013 19:09:36.

This is the only notification you will receive while this person is away.

Submitter: Jenkins
Branch: master

commit 51218b2b32edbc79e89195d58b7b7e330a6d1486
Author: mouad benchchaoui <email address hidden>
Date: Thu Apr 25 18:12:09 2013 +0200

    Remove _path_exists method.

    This method is buggy because it works only on host machine with english language, and
    apparently this method is also useless because we don't need to check if a path exist if
    we can use command option -p for "mkdir" command and option -f for "rm" command.

    bug: LP#1172777
    Change-Id: I418b32772ca97b42e1a43275a7abec9f96688607

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-05-29
Changed in cinder:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-1 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers