nexenta / cinder Goto Github PK
View Code? Open in Web Editor NEWThis project forked from openstack/cinder
Home Page: http://openstack.org
License: Apache License 2.0
This project forked from openstack/cinder
Home Page: http://openstack.org
License: Apache License 2.0
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.