Giter Site home page Giter Site logo

cinder's People

Contributors

akrog avatar avishay-traeger avatar deiter avatar dirkmueller avatar dosaboy avatar dprince avatar e0ne avatar eharney avatar git-harry avatar glongwave avatar helenwalsh avatar hemna avatar j-griffith avatar kumartin avatar leeantho avatar lixiaoy1 avatar markmc avatar nya17y avatar peter-wangxu avatar petrutlucian94 avatar qeas avatar singn avatar stmcginnis avatar thang-pham avatar thingee avatar tombarron avatar tommydell avatar vbalachandran avatar vstinner avatar zhurongze avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cinder's Issues

Improperly url-encoded filesystem names in ns5/nfs.py

The _get_share_datasets() method returns an URL-encoded filesystem name (the second part of the return tuple), but its result is frequently treated as non-encoded in many other methods.

Please note that the buggy behavior only manifests itself when you use "URL-encodable" characters in filesystem names, e.g. in our case the pool name is "data" and filesystem names are "dev/cinder" or "production/cinder". The slash in the filesystem name is the problematic char.

The first type of improper use is, for example, in _do_create_volume(). Here, the URL-encoded FS name is used in the data dictionary that is sent as JSON payload. Since there is no need to URL-encode a payload, the server reads the data as-is and fails with an error of type "Filesystem not found: data/dev%2Fcinder".

The other type of improper use is in revert_to_snapshot(). After we define the fs variable (e.g. "dev%2Fcinder"), it gets copied to fs_path. Afterwards, the url is constructed with this variable, albeit transformed with urllib.parse.quote_plus(fs_path). This results in double-encoding the forward slash and again, an API error.

I think it would be beneficial to always treat the filesystem name as a plain string and then abstract embedding that into JSON data or into the URL in a more generic way.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.