)]}'
{"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"b4d753fa024b53638ff9d6a9a9830138c5bed071","unresolved":false,"context_lines":[{"line_number":3291,"context_line":""},{"line_number":3292,"context_line":"    session \u003d get_session()"},{"line_number":3293,"context_line":"    with session.begin():"},{"line_number":3294,"context_line":"        result \u003d driver_private_data_get(context, private_data_ref[\u0027key\u0027])"},{"line_number":3295,"context_line":"        if result:"},{"line_number":3296,"context_line":"            result.update(values)"},{"line_number":3297,"context_line":"            result.save(session\u003dsession)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_7e08a228","line":3294,"updated":"2015-02-16 19:59:21.000000000","message":"We\u0027ll get exception here if no record with a provided key exists","commit_id":"32f704dc07ed63df45ca06c75b87ac7fdaac7600"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c9272bb475d77572bf07d154d38b7880a8ba248b","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"        # Verify sort direction"},{"line_number":1484,"context_line":"        for sort_dir in sort_dirs:"},{"line_number":1485,"context_line":"            if sort_dir not in (\u0027asc\u0027, \u0027desc\u0027):"},{"line_number":1486,"context_line":"                msg \u003d _LE(\"Unknown sort direction, must be \u0027desc\u0027 or \u0027asc\u0027.\")"},{"line_number":1487,"context_line":"                raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1488,"context_line":"            result_dirs.append(sort_dir)"},{"line_number":1489,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_90a471ba","line":1486,"updated":"2015-02-28 12:18:15.000000000","message":"If a string is going to an exception just _() should be used.","commit_id":"fb181d50776d0baf122ca04ba40e5722ba0a9d87"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"61dfbace7dcda32fb7bb398bc1dcbf11320785f8","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"        # Verify sort direction"},{"line_number":1484,"context_line":"        for sort_dir in sort_dirs:"},{"line_number":1485,"context_line":"            if sort_dir not in (\u0027asc\u0027, \u0027desc\u0027):"},{"line_number":1486,"context_line":"                msg \u003d _LE(\"Unknown sort direction, must be \u0027desc\u0027 or \u0027asc\u0027.\")"},{"line_number":1487,"context_line":"                raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1488,"context_line":"            result_dirs.append(sort_dir)"},{"line_number":1489,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_eea750bb","line":1486,"in_reply_to":"ba7be1f8_15eaf3ab","updated":"2015-03-03 01:35:55.000000000","message":"Yea, its fine though, if/when I make another update its easy enough to fix those too.","commit_id":"fb181d50776d0baf122ca04ba40e5722ba0a9d87"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"f1dd00a7b47bff15f712232241015908d611ef0d","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"        # Verify sort direction"},{"line_number":1484,"context_line":"        for sort_dir in sort_dirs:"},{"line_number":1485,"context_line":"            if sort_dir not in (\u0027asc\u0027, \u0027desc\u0027):"},{"line_number":1486,"context_line":"                msg \u003d _LE(\"Unknown sort direction, must be \u0027desc\u0027 or \u0027asc\u0027.\")"},{"line_number":1487,"context_line":"                raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1488,"context_line":"            result_dirs.append(sort_dir)"},{"line_number":1489,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_15eaf3ab","line":1486,"in_reply_to":"ba7be1f8_90a471ba","updated":"2015-03-03 00:13:50.000000000","message":"Valid points, but they are not related to these changes","commit_id":"fb181d50776d0baf122ca04ba40e5722ba0a9d87"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"0ce3a34eb770c0c7acdec8e5d7b42518e4932a74","unresolved":false,"context_lines":[{"line_number":1483,"context_line":"        # Verify sort direction"},{"line_number":1484,"context_line":"        for sort_dir in sort_dirs:"},{"line_number":1485,"context_line":"            if sort_dir not in (\u0027asc\u0027, \u0027desc\u0027):"},{"line_number":1486,"context_line":"                msg \u003d _LE(\"Unknown sort direction, must be \u0027desc\u0027 or \u0027asc\u0027.\")"},{"line_number":1487,"context_line":"                raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1488,"context_line":"            result_dirs.append(sort_dir)"},{"line_number":1489,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_afa7efbb","line":1486,"in_reply_to":"ba7be1f8_eea750bb","updated":"2015-03-03 17:04:27.000000000","message":"Oh, sorry about that. I see these are just picked up from rebasing now. I was comparing between patch versions.\n\nYeah, if you do an update and feel so inclined that would be great if you can fix that. Otherwise Ivan is right and we can probably correct it with a future cleanup. Thanks Patrick!","commit_id":"fb181d50776d0baf122ca04ba40e5722ba0a9d87"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"c9272bb475d77572bf07d154d38b7880a8ba248b","unresolved":false,"context_lines":[{"line_number":1494,"context_line":"        result_dirs.append(default_dir_value)"},{"line_number":1495,"context_line":"    # Unless more direction are specified, which is an error"},{"line_number":1496,"context_line":"    if len(result_dirs) \u003e len(result_keys):"},{"line_number":1497,"context_line":"        msg \u003d _LE(\"Sort direction array size exceeds sort key array size.\")"},{"line_number":1498,"context_line":"        raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1499,"context_line":""},{"line_number":1500,"context_line":"    # Ensure defaults are included"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_b0ab3588","line":1497,"updated":"2015-02-28 12:18:15.000000000","message":"Same.","commit_id":"fb181d50776d0baf122ca04ba40e5722ba0a9d87"}],"cinder/db/sqlalchemy/models.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"276383570e471b2b7dfbb2febbc27a69eaffe934","unresolved":false,"context_lines":[{"line_number":478,"context_line":""},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"class IscsiInitiatorCredentials(BASE, CinderBase):"},{"line_number":481,"context_line":"    \"\"\"Represents an iscsi initiators credentials\"\"\""},{"line_number":482,"context_line":"    __tablename__ \u003d \u0027iscsi_initiator_credentials\u0027"},{"line_number":483,"context_line":"    id \u003d Column(Integer, primary_key\u003dTrue)"},{"line_number":484,"context_line":"    iqn \u003d Column(String(255))"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_43bee700","line":481,"updated":"2015-02-01 12:17:45.000000000","message":"I didn\u0027t see migration for it","commit_id":"b515c0d94e9b6e91bb1ca21a29054a5010901889"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"04f4022253c6d2fa176792d5fb592ee029d5e23e","unresolved":false,"context_lines":[{"line_number":478,"context_line":""},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"class IscsiInitiatorCredentials(BASE, CinderBase):"},{"line_number":481,"context_line":"    \"\"\"Represents an iscsi initiators credentials\"\"\""},{"line_number":482,"context_line":"    __tablename__ \u003d \u0027iscsi_initiator_credentials\u0027"},{"line_number":483,"context_line":"    id \u003d Column(Integer, primary_key\u003dTrue)"},{"line_number":484,"context_line":"    iqn \u003d Column(String(255))"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_59d8981d","line":481,"in_reply_to":"da86d52c_43bee700","updated":"2015-02-01 19:31:55.000000000","message":"Oops, this was leftovers from a previous version of this. I\u0027ll delete in the latest patch sets.","commit_id":"b515c0d94e9b6e91bb1ca21a29054a5010901889"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"276383570e471b2b7dfbb2febbc27a69eaffe934","unresolved":false,"context_lines":[{"line_number":559,"context_line":"class DriverPrivateData(BASE, CinderBase):"},{"line_number":560,"context_line":"    \"\"\"Represents private key-value pair specific to Drivers\"\"\""},{"line_number":561,"context_line":"    __tablename__ \u003d \u0027driver_private_data\u0027"},{"line_number":562,"context_line":"    id \u003d Column(Integer, primary_key\u003dTrue)"},{"line_number":563,"context_line":"    key \u003d Column(String(255), index\u003dTrue, unique\u003dTrue)"},{"line_number":564,"context_line":"    value \u003d Column(String(255))"},{"line_number":565,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_c341f70c","line":562,"updated":"2015-02-01 12:17:45.000000000","message":"I propose to add some field to specify what driver needs this key-value pair. It will help us to debug and troubleshoot","commit_id":"b515c0d94e9b6e91bb1ca21a29054a5010901889"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"04f4022253c6d2fa176792d5fb592ee029d5e23e","unresolved":false,"context_lines":[{"line_number":559,"context_line":"class DriverPrivateData(BASE, CinderBase):"},{"line_number":560,"context_line":"    \"\"\"Represents private key-value pair specific to Drivers\"\"\""},{"line_number":561,"context_line":"    __tablename__ \u003d \u0027driver_private_data\u0027"},{"line_number":562,"context_line":"    id \u003d Column(Integer, primary_key\u003dTrue)"},{"line_number":563,"context_line":"    key \u003d Column(String(255), index\u003dTrue, unique\u003dTrue)"},{"line_number":564,"context_line":"    value \u003d Column(String(255))"},{"line_number":565,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_79047c7e","line":562,"in_reply_to":"da86d52c_c341f70c","updated":"2015-02-01 19:31:55.000000000","message":"I was thinking about that too, I like the idea but wasn\u0027t sure the best way to move forward with it. Do you think this should be something passed in from the driver or maybe automatically filled in with something like self.__class__.__name__ in the helper methods?","commit_id":"b515c0d94e9b6e91bb1ca21a29054a5010901889"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"276383570e471b2b7dfbb2febbc27a69eaffe934","unresolved":false,"context_lines":[{"line_number":560,"context_line":"    \"\"\"Represents private key-value pair specific to Drivers\"\"\""},{"line_number":561,"context_line":"    __tablename__ \u003d \u0027driver_private_data\u0027"},{"line_number":562,"context_line":"    id \u003d Column(Integer, primary_key\u003dTrue)"},{"line_number":563,"context_line":"    key \u003d Column(String(255), index\u003dTrue, unique\u003dTrue)"},{"line_number":564,"context_line":"    value \u003d Column(String(255))"},{"line_number":565,"context_line":""},{"line_number":566,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_63520bdf","line":563,"updated":"2015-02-01 12:17:45.000000000","message":"If we\u0027ll add a \u0027driver\u0027 column, unique constraint should contains two columns. In a current solution, it won\u0027t work if 2 drivers will require the same  option","commit_id":"b515c0d94e9b6e91bb1ca21a29054a5010901889"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"04f4022253c6d2fa176792d5fb592ee029d5e23e","unresolved":false,"context_lines":[{"line_number":560,"context_line":"    \"\"\"Represents private key-value pair specific to Drivers\"\"\""},{"line_number":561,"context_line":"    __tablename__ \u003d \u0027driver_private_data\u0027"},{"line_number":562,"context_line":"    id \u003d Column(Integer, primary_key\u003dTrue)"},{"line_number":563,"context_line":"    key \u003d Column(String(255), index\u003dTrue, unique\u003dTrue)"},{"line_number":564,"context_line":"    value \u003d Column(String(255))"},{"line_number":565,"context_line":""},{"line_number":566,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_99093098","line":563,"in_reply_to":"da86d52c_63520bdf","updated":"2015-02-01 19:31:55.000000000","message":"yep, sounds good to me","commit_id":"b515c0d94e9b6e91bb1ca21a29054a5010901889"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"6ca973b74ca7dc8f64b9243380f146c5cf39a063","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                          \u0027Transfer.deleted \u003d\u003d False)\u0027)"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"class DriverPrivateData(BASE, CinderBase):"},{"line_number":551,"context_line":"    \"\"\"Represents private key-value pair specific to Drivers\"\"\""},{"line_number":552,"context_line":"    __tablename__ \u003d \u0027driver_private_data\u0027"},{"line_number":553,"context_line":"    id \u003d Column(Integer, primary_key\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_5955f81b","line":550,"updated":"2015-02-01 20:34:51.000000000","message":"Not sure how access/usage would work here; my thought was that this should have something like a host key:\n    host \u003d Column(String(255))  # , ForeignKey(\u0027hosts.id\u0027))\n\nSo you could correlate the kv\u0027s with the driver you need them for.  I believe what you have here would cause some conflict if say two drivers entered the same key names no?","commit_id":"2496623e220f0280b1cca313cbdeb67a6a058b07"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"e1c53676722f2796ee4c0611fa93ba597cdae9bb","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                          \u0027Transfer.deleted \u003d\u003d False)\u0027)"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"class DriverPrivateData(BASE, CinderBase):"},{"line_number":551,"context_line":"    \"\"\"Represents private key-value pair specific to Drivers\"\"\""},{"line_number":552,"context_line":"    __tablename__ \u003d \u0027driver_private_data\u0027"},{"line_number":553,"context_line":"    id \u003d Column(Integer, primary_key\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_742643bc","line":550,"in_reply_to":"da86d52c_5955f81b","updated":"2015-02-01 20:58:00.000000000","message":"I was looking around in the models for something better to key off of and didn\u0027t see a clear winner. I opted for the most open ended it could be initially and figured we could narrow down on something... A few concerns I had when considering the host as part of the key, which lead me to not use it:\n\nWouldn\u0027t there be a different hosts key if you had two cinder volume services up? In my mind the intention would be to have values shared across hosts, but be specific to a driver (or maybe family of drivers/vendor group)\n\nDo we always get the same host id between restarts/updates? \n\nI was thinking the driver class name might work for this, but might open it up for issues with name changes/refactoring later on. I would hate to see new db migrate versions where it goes through the database and updates the driver names in these because someone decided to rename their driver class. We could just add a column and call it \"vendor_prefix\" or something and let the driver put whatever they want in there, essentially the same thing that would happen if left as-is except not literally a prefix on the key string.","commit_id":"2496623e220f0280b1cca313cbdeb67a6a058b07"}],"cinder/tests/test_migrations.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"276383570e471b2b7dfbb2febbc27a69eaffe934","unresolved":false,"context_lines":[{"line_number":729,"context_line":"                                             \"driver_private_data\")"},{"line_number":730,"context_line":"        self.assertTrue(has_table)"},{"line_number":731,"context_line":""},{"line_number":732,"context_line":"        initiator_credentials \u003d db_utils.get_table("},{"line_number":733,"context_line":"            engine,"},{"line_number":734,"context_line":"            \u0027driver_private_data\u0027"},{"line_number":735,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_83053fc4","line":732,"updated":"2015-02-01 12:17:45.000000000","message":"initiator_credentials variable would be goot for testing IscsiInitiatorCredentials table, not DriverPrivateData","commit_id":"b515c0d94e9b6e91bb1ca21a29054a5010901889"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"04f4022253c6d2fa176792d5fb592ee029d5e23e","unresolved":false,"context_lines":[{"line_number":729,"context_line":"                                             \"driver_private_data\")"},{"line_number":730,"context_line":"        self.assertTrue(has_table)"},{"line_number":731,"context_line":""},{"line_number":732,"context_line":"        initiator_credentials \u003d db_utils.get_table("},{"line_number":733,"context_line":"            engine,"},{"line_number":734,"context_line":"            \u0027driver_private_data\u0027"},{"line_number":735,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_b9fef469","line":732,"in_reply_to":"da86d52c_83053fc4","updated":"2015-02-01 19:31:55.000000000","message":"Fixed, another holdover from a previous version of this.","commit_id":"b515c0d94e9b6e91bb1ca21a29054a5010901889"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"60fdc196276747942197599e215903b1397dd6fb","unresolved":false,"context_lines":[{"line_number":734,"context_line":"            \u0027driver_initiator_data\u0027"},{"line_number":735,"context_line":"        )"},{"line_number":736,"context_line":""},{"line_number":737,"context_line":"        self.assertIsInstance(private_data.c.created_at.type,"},{"line_number":738,"context_line":"                              self.TIME_TYPE)"},{"line_number":739,"context_line":"        self.assertIsInstance(private_data.c.updated_at.type,"},{"line_number":740,"context_line":"                              self.TIME_TYPE)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_2a5b6d88","line":737,"updated":"2015-02-21 02:00:09.000000000","message":"Haha, yea, that confused me at first when making the test. I think for assertEquals that is the correct format, but all the other migrate tests were like this. Turns out for this method its (ObjectToTest, ClassYouExpect) https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertIsInstance","commit_id":"85b44c56defc668084c208944c89dfd8bd23bf8e"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"20437e4858c935f8edfd7510b5cadca3c05ab0a4","unresolved":false,"context_lines":[{"line_number":734,"context_line":"            \u0027driver_initiator_data\u0027"},{"line_number":735,"context_line":"        )"},{"line_number":736,"context_line":""},{"line_number":737,"context_line":"        self.assertIsInstance(private_data.c.created_at.type,"},{"line_number":738,"context_line":"                              self.TIME_TYPE)"},{"line_number":739,"context_line":"        self.assertIsInstance(private_data.c.updated_at.type,"},{"line_number":740,"context_line":"                              self.TIME_TYPE)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_0edde870","line":737,"updated":"2015-02-20 19:31:41.000000000","message":"I think you have these reversed from (EXPECTED, ACTUAL).","commit_id":"85b44c56defc668084c208944c89dfd8bd23bf8e"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"29789a4b6032348f10d96d08ccb86952be736846","unresolved":false,"context_lines":[{"line_number":734,"context_line":"            \u0027driver_initiator_data\u0027"},{"line_number":735,"context_line":"        )"},{"line_number":736,"context_line":""},{"line_number":737,"context_line":"        self.assertIsInstance(private_data.c.created_at.type,"},{"line_number":738,"context_line":"                              self.TIME_TYPE)"},{"line_number":739,"context_line":"        self.assertIsInstance(private_data.c.updated_at.type,"},{"line_number":740,"context_line":"                              self.TIME_TYPE)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_c0c54d5c","line":737,"in_reply_to":"ba7be1f8_2a5b6d88","updated":"2015-02-21 14:01:23.000000000","message":"Ah, OK. Sorry Patrick. Guess I should have checked that one before commenting on it. That\u0027s what I get for assuming the assert calls are consistent. :)","commit_id":"85b44c56defc668084c208944c89dfd8bd23bf8e"}],"cinder/volume/driver.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"276383570e471b2b7dfbb2febbc27a69eaffe934","unresolved":false,"context_lines":[{"line_number":900,"context_line":"            \u0027key\u0027: key,"},{"line_number":901,"context_line":"            \u0027value\u0027: value"},{"line_number":902,"context_line":"        }"},{"line_number":903,"context_line":"        result \u003d self.db.driver_private_data_save(ctx, data)"},{"line_number":904,"context_line":"        return result"},{"line_number":905,"context_line":""},{"line_number":906,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_832c5f4c","line":903,"updated":"2015-02-01 12:17:45.000000000","message":"Will we have raise condition in HA mode?","commit_id":"b515c0d94e9b6e91bb1ca21a29054a5010901889"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"04f4022253c6d2fa176792d5fb592ee029d5e23e","unresolved":false,"context_lines":[{"line_number":900,"context_line":"            \u0027key\u0027: key,"},{"line_number":901,"context_line":"            \u0027value\u0027: value"},{"line_number":902,"context_line":"        }"},{"line_number":903,"context_line":"        result \u003d self.db.driver_private_data_save(ctx, data)"},{"line_number":904,"context_line":"        return result"},{"line_number":905,"context_line":""},{"line_number":906,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_f9f78c8a","line":903,"in_reply_to":"da86d52c_832c5f4c","updated":"2015-02-01 19:31:55.000000000","message":"Yea there are definitely going to be race conditions with using this. Right now I put a local file lock in my driver where i use them, but in HA mode that kind of goes out the window... Do we have a solution for distributed locking? Or should I just add a warning to this for now to make sure anyone using it is aware of the limitations?","commit_id":"b515c0d94e9b6e91bb1ca21a29054a5010901889"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"6ca973b74ca7dc8f64b9243380f146c5cf39a063","unresolved":false,"context_lines":[{"line_number":880,"context_line":"        \"\"\""},{"line_number":881,"context_line":"        return None"},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"    def _get_driver_private_data(self, key):"},{"line_number":884,"context_line":"        \"\"\"Return driver specific private data for a specified key\"\"\""},{"line_number":885,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":886,"context_line":"        result \u003d self.db.driver_private_data_get(ctx, key)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_d9400859","line":883,"updated":"2015-02-01 20:34:51.000000000","message":"So I had pictured this differently, rather than giving the driver db access, doing something like in the manager pass any existing keys in on init.\n\nThis also assumes adding something in a response to the manager that tells it \"if/when\" to update said keys.\n\nThe problem with this is db access in driver which may or may not be a good thing and the name collision I mentioned before.  Sure we could just say \"scope your key names\" but iterating through is sort of a pain I think when we could just filter on host key","commit_id":"2496623e220f0280b1cca313cbdeb67a6a058b07"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"e1c53676722f2796ee4c0611fa93ba597cdae9bb","unresolved":false,"context_lines":[{"line_number":880,"context_line":"        \"\"\""},{"line_number":881,"context_line":"        return None"},{"line_number":882,"context_line":""},{"line_number":883,"context_line":"    def _get_driver_private_data(self, key):"},{"line_number":884,"context_line":"        \"\"\"Return driver specific private data for a specified key\"\"\""},{"line_number":885,"context_line":"        ctx \u003d context.get_admin_context()"},{"line_number":886,"context_line":"        result \u003d self.db.driver_private_data_get(ctx, key)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_b4099b2e","line":883,"in_reply_to":"da86d52c_d9400859","updated":"2015-02-01 20:58:00.000000000","message":"Ivan and I have the same concern about the collisions (see comments on the first patch set).\n\nI\u0027m not sure how easy it would be to have the manager pass them in... if it only happens at init, how do you know when they change? (we intend to change them as we go), again the same issues if we do something like the *_export methods it would mean having to keep that state on the driver to use at the right time. For my specific use case we could pass them into initialize_connection as parameters, but I\u0027m not sure how flexible that is for other drivers to take advantage of it for any other use case.","commit_id":"2496623e220f0280b1cca313cbdeb67a6a058b07"}],"cinder/volume/manager.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"20437e4858c935f8edfd7510b5cadca3c05ab0a4","unresolved":false,"context_lines":[{"line_number":867,"context_line":"            except exception.CinderException as ex:"},{"line_number":868,"context_line":"                LOG.exception(_LE(\"Failed to get driver initiator data for\""},{"line_number":869,"context_line":"                                  \" initiator %(initiator)s and backend\""},{"line_number":870,"context_line":"                                  \" %(backend)s\") %"},{"line_number":871,"context_line":"                              {\u0027initiator\u0027: initiator,"},{"line_number":872,"context_line":"                               \u0027backend\u0027: backend_name})"},{"line_number":873,"context_line":"                raise ex"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_eecfb4ae","line":870,"updated":"2015-02-20 19:31:41.000000000","message":"% \u003d\u003e ,","commit_id":"85b44c56defc668084c208944c89dfd8bd23bf8e"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"60fdc196276747942197599e215903b1397dd6fb","unresolved":false,"context_lines":[{"line_number":867,"context_line":"            except exception.CinderException as ex:"},{"line_number":868,"context_line":"                LOG.exception(_LE(\"Failed to get driver initiator data for\""},{"line_number":869,"context_line":"                                  \" initiator %(initiator)s and backend\""},{"line_number":870,"context_line":"                                  \" %(backend)s\") %"},{"line_number":871,"context_line":"                              {\u0027initiator\u0027: initiator,"},{"line_number":872,"context_line":"                               \u0027backend\u0027: backend_name})"},{"line_number":873,"context_line":"                raise ex"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_ca4bb1ae","line":870,"in_reply_to":"ba7be1f8_eecfb4ae","updated":"2015-02-21 02:00:09.000000000","message":"Done","commit_id":"85b44c56defc668084c208944c89dfd8bd23bf8e"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"20437e4858c935f8edfd7510b5cadca3c05ab0a4","unresolved":false,"context_lines":[{"line_number":870,"context_line":"                                  \" %(backend)s\") %"},{"line_number":871,"context_line":"                              {\u0027initiator\u0027: initiator,"},{"line_number":872,"context_line":"                               \u0027backend\u0027: backend_name})"},{"line_number":873,"context_line":"                raise ex"},{"line_number":874,"context_line":"        return data"},{"line_number":875,"context_line":""},{"line_number":876,"context_line":"    def _save_driver_initiator_data(self, connector, model_update):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_4ebe0001","line":873,"updated":"2015-02-20 19:31:41.000000000","message":"Just raise here, not raise ex.","commit_id":"85b44c56defc668084c208944c89dfd8bd23bf8e"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"60fdc196276747942197599e215903b1397dd6fb","unresolved":false,"context_lines":[{"line_number":870,"context_line":"                                  \" %(backend)s\") %"},{"line_number":871,"context_line":"                              {\u0027initiator\u0027: initiator,"},{"line_number":872,"context_line":"                               \u0027backend\u0027: backend_name})"},{"line_number":873,"context_line":"                raise ex"},{"line_number":874,"context_line":"        return data"},{"line_number":875,"context_line":""},{"line_number":876,"context_line":"    def _save_driver_initiator_data(self, connector, model_update):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_eac79510","line":873,"in_reply_to":"ba7be1f8_4ebe0001","updated":"2015-02-21 02:00:09.000000000","message":"Done","commit_id":"85b44c56defc668084c208944c89dfd8bd23bf8e"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"20437e4858c935f8edfd7510b5cadca3c05ab0a4","unresolved":false,"context_lines":[{"line_number":885,"context_line":"            except exception.CinderException as ex:"},{"line_number":886,"context_line":"                LOG.exception(_LE(\"Failed to update initiator data for\""},{"line_number":887,"context_line":"                                  \" initiator %(initiator)s and backend\""},{"line_number":888,"context_line":"                                  \" %(backend)s\") %"},{"line_number":889,"context_line":"                              {\u0027initiator\u0027: connector[\u0027initiator\u0027],"},{"line_number":890,"context_line":"                               \u0027backend\u0027: backend_name})"},{"line_number":891,"context_line":"                raise ex"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_ae3cdc94","line":888,"updated":"2015-02-20 19:31:41.000000000","message":"% \u003d\u003e ,","commit_id":"85b44c56defc668084c208944c89dfd8bd23bf8e"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"60fdc196276747942197599e215903b1397dd6fb","unresolved":false,"context_lines":[{"line_number":885,"context_line":"            except exception.CinderException as ex:"},{"line_number":886,"context_line":"                LOG.exception(_LE(\"Failed to update initiator data for\""},{"line_number":887,"context_line":"                                  \" initiator %(initiator)s and backend\""},{"line_number":888,"context_line":"                                  \" %(backend)s\") %"},{"line_number":889,"context_line":"                              {\u0027initiator\u0027: connector[\u0027initiator\u0027],"},{"line_number":890,"context_line":"                               \u0027backend\u0027: backend_name})"},{"line_number":891,"context_line":"                raise ex"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_0acdc931","line":888,"in_reply_to":"ba7be1f8_ae3cdc94","updated":"2015-02-21 02:00:09.000000000","message":"Done","commit_id":"85b44c56defc668084c208944c89dfd8bd23bf8e"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"20437e4858c935f8edfd7510b5cadca3c05ab0a4","unresolved":false,"context_lines":[{"line_number":888,"context_line":"                                  \" %(backend)s\") %"},{"line_number":889,"context_line":"                              {\u0027initiator\u0027: connector[\u0027initiator\u0027],"},{"line_number":890,"context_line":"                               \u0027backend\u0027: backend_name})"},{"line_number":891,"context_line":"                raise ex"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"    def initialize_connection(self, context, volume_id, connector):"},{"line_number":894,"context_line":"        \"\"\"Prepare volume for connection from host represented by connector."}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_ce41100d","line":891,"updated":"2015-02-20 19:31:41.000000000","message":"/raise ex/raise/","commit_id":"85b44c56defc668084c208944c89dfd8bd23bf8e"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"60fdc196276747942197599e215903b1397dd6fb","unresolved":false,"context_lines":[{"line_number":888,"context_line":"                                  \" %(backend)s\") %"},{"line_number":889,"context_line":"                              {\u0027initiator\u0027: connector[\u0027initiator\u0027],"},{"line_number":890,"context_line":"                               \u0027backend\u0027: backend_name})"},{"line_number":891,"context_line":"                raise ex"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"    def initialize_connection(self, context, volume_id, connector):"},{"line_number":894,"context_line":"        \"\"\"Prepare volume for connection from host represented by connector."}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_2ad28dd2","line":891,"in_reply_to":"ba7be1f8_ce41100d","updated":"2015-02-21 02:00:09.000000000","message":"Done","commit_id":"85b44c56defc668084c208944c89dfd8bd23bf8e"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"a63ef9cd067fd37eadf31852c6a1d9c03ea198b3","unresolved":false,"context_lines":[{"line_number":885,"context_line":"                                  \" %(namespace)s\"),"},{"line_number":886,"context_line":"                              {\u0027initiator\u0027: initiator,"},{"line_number":887,"context_line":"                               \u0027namespace\u0027: namespace})"},{"line_number":888,"context_line":"                raise"},{"line_number":889,"context_line":"        return data"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    def _save_driver_initiator_data(self, context, connector, model_update):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_e2a767bb","line":888,"updated":"2015-03-02 23:35:16.000000000","message":"Can we also verify this issue on start up? I understand this could be an eventual problem, but might\u0027ve been an issue since cinder-vol start up.","commit_id":"fb181d50776d0baf122ca04ba40e5722ba0a9d87"},{"author":{"_account_id":170,"name":"Mike Perez","email":"thingee@gmail.com","username":"thingee"},"change_message_id":"593f27571eda68dc7ae7e482e5f49dc84ef00c70","unresolved":false,"context_lines":[{"line_number":885,"context_line":"                                  \" %(namespace)s\"),"},{"line_number":886,"context_line":"                              {\u0027initiator\u0027: initiator,"},{"line_number":887,"context_line":"                               \u0027namespace\u0027: namespace})"},{"line_number":888,"context_line":"                raise"},{"line_number":889,"context_line":"        return data"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    def _save_driver_initiator_data(self, context, connector, model_update):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_8f1db911","line":888,"in_reply_to":"ba7be1f8_0eb2e405","updated":"2015-03-03 23:18:24.000000000","message":"Yeah that\u0027s fair. I think I misunderstood this piece.","commit_id":"fb181d50776d0baf122ca04ba40e5722ba0a9d87"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"61dfbace7dcda32fb7bb398bc1dcbf11320785f8","unresolved":false,"context_lines":[{"line_number":885,"context_line":"                                  \" %(namespace)s\"),"},{"line_number":886,"context_line":"                              {\u0027initiator\u0027: initiator,"},{"line_number":887,"context_line":"                               \u0027namespace\u0027: namespace})"},{"line_number":888,"context_line":"                raise"},{"line_number":889,"context_line":"        return data"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    def _save_driver_initiator_data(self, context, connector, model_update):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_0eb2e405","line":888,"in_reply_to":"ba7be1f8_e2a767bb","updated":"2015-03-03 01:35:55.000000000","message":"Hmm, I don\u0027t see a very clean way to verify it will work at startup. We could maybe fake an initiator or use the cinder host (I\u0027ll look around and see if we already have helpers to read the hosts iqn). \n\nAlthough I\u0027m not sure what all we would really be checking other than db connectivity.  I say that with the assumption that if the database is inaccessible things should already blow up as-is from other cinder code, is that a correct assumption? \n\nI think other than something from the db call breaking (or I supposed a bug in the db api methods) nothing else should throw an exception.\n\nDo you have any suggestions on a good way to go about it?","commit_id":"fb181d50776d0baf122ca04ba40e5722ba0a9d87"}]}
