Change in vdsm[master]: storage: fix spec normalization when mounting

nsoffer at redhat.com nsoffer at redhat.com
Wed Mar 30 16:05:03 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: storage: fix spec normalization when mounting
......................................................................


Patch Set 3:

(2 comments)

https://gerrit.ovirt.org/#/c/55182/3/vdsm/storage/fileUtils.py
File vdsm/storage/fileUtils.py:

Line 32: from contextlib import contextmanager
Line 33: import subprocess
Line 34: import shutil
Line 35: import logging
Line 36: from mount import normalize_spec
We cannot depend on mount here, mount should depend on this module since these function are needed in other modules. What you do here is create dependency cycles.

The dependency should be:

    storageServer -> fileUtils, mount
    mount -> fileUtils
    nfsSD -> fileUtils

So move here normalize_spec here.
Line 37: import errno
Line 38: import sys
Line 39: import warnings
Line 40: 


Line 79:     """
Line 80:     return remotePath.replace('_', '__').replace('/', '_')
Line 81: 
Line 82: 
Line 83: def transformSpec(spec):
I'm not sure about this helper, I'll need more time to review this.
Line 84:     """
Line 85:     Transforms an unnormalized remote path to a new one for local mount
Line 86:     """
Line 87:     return transformPath(normalize_spec(spec))


-- 
To view, visit https://gerrit.ovirt.org/55182
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f244eb903fc049c726efba69f37b3b5fb01b561
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list