)]}'
{"etc/placement/config-generator.conf":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"38ad6c1d62d4c3f73e99ce11f78d943faeeaa43e","unresolved":false,"context_lines":[{"line_number":8,"context_line":"namespace \u003d oslo.policy"},{"line_number":9,"context_line":"namespace \u003d osprofiler"},{"line_number":10,"context_line":"# FIXME(mriedem): There are likely other missing 3rd party oslo library"},{"line_number":11,"context_line":"# options that should show up in the placement.conf docs, like oslo.db."}],"source_content_type":"text/plain","patch_set":1,"id":"5faad753_d9c17ee6","line":11,"updated":"2019-09-10 12:42:15.000000000","message":"This FIXME is generally accurate, but the change to oslo.db is not. We get config help/docs/genconfig stuff via placement_database which dupes the stuff from oslo.db. The generated sample has what you expect (for db options).\n\nSo maybe something else here. Or it _might_ be that we are done?","commit_id":"b3e009068c3e663e5814c4122fec0c2896be69fc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f967744709866aaf2c7968a3fe10f0ecff116ed4","unresolved":false,"context_lines":[{"line_number":8,"context_line":"namespace \u003d oslo.policy"},{"line_number":9,"context_line":"namespace \u003d osprofiler"},{"line_number":10,"context_line":"# FIXME(mriedem): There are likely other missing 3rd party oslo library"},{"line_number":11,"context_line":"# options that should show up in the placement.conf docs, like oslo.db."}],"source_content_type":"text/plain","patch_set":1,"id":"5faad753_6da720a9","line":11,"in_reply_to":"5faad753_bbbcb2dc","updated":"2019-09-24 13:35:09.000000000","message":"Done","commit_id":"b3e009068c3e663e5814c4122fec0c2896be69fc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2586a92f6acddfe34121f45ebdf9e00f6e3ba4a6","unresolved":false,"context_lines":[{"line_number":8,"context_line":"namespace \u003d oslo.policy"},{"line_number":9,"context_line":"namespace \u003d osprofiler"},{"line_number":10,"context_line":"# FIXME(mriedem): There are likely other missing 3rd party oslo library"},{"line_number":11,"context_line":"# options that should show up in the placement.conf docs, like oslo.db."}],"source_content_type":"text/plain","patch_set":1,"id":"5faad753_bbbcb2dc","line":11,"in_reply_to":"5faad753_d9c17ee6","updated":"2019-09-10 14:51:53.000000000","message":"OK, I\u0027d think oslo.concurrency would work:\n\nhttps://github.com/openstack/placement/blob/10146978ea2d7eace1ffdf6552eafd22360e37dd/requirements.txt#L14\n\nhttps://docs.openstack.org/oslo.concurrency/latest/configuration/index.html\n\nThen we\u0027re probably done since I don\u0027t see options in oslo.config, oslo.context or oslo.serialization. Would probably be good to leave a comment that oslo.db is intentionally omitted for the reason you pointed out.","commit_id":"b3e009068c3e663e5814c4122fec0c2896be69fc"}],"placement/conf/__init__.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"f9fe649d2e5ed5d105eb67d99a138ad6740e5f60","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    paths.register_opts(conf)"},{"line_number":36,"context_line":"    placement.register_opts(conf)"},{"line_number":37,"context_line":"    logging.register_options(conf)"},{"line_number":38,"context_line":"    policy_opts.set_defaults(conf)"},{"line_number":39,"context_line":"    # The CORS middleware does not present a register_opts method, instead"},{"line_number":40,"context_line":"    # it shares a list of available opts."},{"line_number":41,"context_line":"    conf.register_opts(cors.CORS_OPTS, \u0027cors\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_06bd8664","line":38,"updated":"2019-09-09 16:39:41.000000000","message":"Not sure you need to do this. oslo.policy registers opts when you create an enforcer object: https://github.com/openstack/oslo.policy/blob/4d40252748bd31584f1cbb72d4641dec62cf1303/oslo_policy/policy.py#L488","commit_id":"b3e009068c3e663e5814c4122fec0c2896be69fc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b68a3166ca12df06b2036f5660a53e426e6c5556","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    paths.register_opts(conf)"},{"line_number":36,"context_line":"    placement.register_opts(conf)"},{"line_number":37,"context_line":"    logging.register_options(conf)"},{"line_number":38,"context_line":"    policy_opts.set_defaults(conf)"},{"line_number":39,"context_line":"    # The CORS middleware does not present a register_opts method, instead"},{"line_number":40,"context_line":"    # it shares a list of available opts."},{"line_number":41,"context_line":"    conf.register_opts(cors.CORS_OPTS, \u0027cors\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_71f3d69f","line":38,"in_reply_to":"5faad753_06bd8664","updated":"2019-09-09 16:59:42.000000000","message":"Tests were failing without this plus this allows us to set these in a common location instead of doing it individually in the wsgi stack.","commit_id":"b3e009068c3e663e5814c4122fec0c2896be69fc"}],"placement/policy.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"f9fe649d2e5ed5d105eb67d99a138ad6740e5f60","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    # files from overrides on disk and defaults in code. We can just pass an"},{"line_number":85,"context_line":"    # empty list and let oslo do the config lifting for us."},{"line_number":86,"context_line":"    cfg.CONF([], project\u003d\u0027placement\u0027)"},{"line_number":87,"context_line":"    policy_opts.set_defaults(cfg.CONF)"},{"line_number":88,"context_line":"    return _get_enforcer(cfg.CONF)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_e6e94a80","line":87,"updated":"2019-09-09 16:39:41.000000000","message":"Ah, I\u0027m guessing this is just to register the opts, since we don\u0027t expose the registration function from oslo.policy.\n\nIt\u0027s a bit weird, but then this is a fairly unusual use case.","commit_id":"b3e009068c3e663e5814c4122fec0c2896be69fc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b68a3166ca12df06b2036f5660a53e426e6c5556","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    # files from overrides on disk and defaults in code. We can just pass an"},{"line_number":85,"context_line":"    # empty list and let oslo do the config lifting for us."},{"line_number":86,"context_line":"    cfg.CONF([], project\u003d\u0027placement\u0027)"},{"line_number":87,"context_line":"    policy_opts.set_defaults(cfg.CONF)"},{"line_number":88,"context_line":"    return _get_enforcer(cfg.CONF)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_312b1eec","line":87,"in_reply_to":"5faad753_e6e94a80","updated":"2019-09-09 16:59:42.000000000","message":"Correct. Without this tests blow up on conf.oslo_policy.policy_file since oslo.config is looking for [DEFAULT]/oslo_policy.","commit_id":"b3e009068c3e663e5814c4122fec0c2896be69fc"}],"placement/tests/unit/test_policy.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"fc8bee2d13b06d558599b7cd51a448967ce4f25b","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import mock"},{"line_number":14,"context_line":"import os"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import fixtures"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_afcf5254","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":11},"updated":"2019-09-24 12:34:36.000000000","message":"This is a third-party lib","commit_id":"9ece3d35ab728560b33852f6e19e5f92938dc2c1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cb11be15f619f27b61809cd73e0b45a265f799cc","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import mock"},{"line_number":14,"context_line":"import os"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import fixtures"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_4667a4be","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":11},"in_reply_to":"3fa7e38b_4548fd5a","updated":"2019-09-24 14:45:23.000000000","message":"You\u0027re thinking of unittest.mock. Different thing\n\n  $ python3\n  \u003e\u003e\u003e import mock\n  Traceback (most recent call last):\n    File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  ModuleNotFoundError: No module named \u0027mock\u0027\n  \u003e\u003e\u003e import unittest.mock\n  \u003e\u003e\u003e","commit_id":"9ece3d35ab728560b33852f6e19e5f92938dc2c1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f967744709866aaf2c7968a3fe10f0ecff116ed4","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import mock"},{"line_number":14,"context_line":"import os"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import fixtures"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_4548fd5a","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":11},"in_reply_to":"3fa7e38b_afcf5254","updated":"2019-09-24 13:35:09.000000000","message":"Not if you\u0027re on py3.","commit_id":"9ece3d35ab728560b33852f6e19e5f92938dc2c1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"fc8bee2d13b06d558599b7cd51a448967ce4f25b","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        authorizations against a fake rule between updates to the physical"},{"line_number":49,"context_line":"        policy file."},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        tempdir \u003d self.useFixture(fixtures.TempDir())"},{"line_number":52,"context_line":"        tmpfilename \u003d os.path.join(tempdir.path, \u0027policy.yaml\u0027)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        self.conf_fixture.config("}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_0fdf860d","line":51,"range":{"start_line":51,"start_character":0,"end_line":51,"end_character":53},"updated":"2019-09-24 12:34:36.000000000","message":"It probably makes sense to move this to setUp at this point and configure self.tempdir","commit_id":"9ece3d35ab728560b33852f6e19e5f92938dc2c1"}],"placement/wsgi.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"f9fe649d2e5ed5d105eb67d99a138ad6740e5f60","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    _set_middleware_defaults()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    # This is needed so we can check [oslo_policy]/enforce_scope in the"},{"line_number":83,"context_line":"    # deploy module."},{"line_number":84,"context_line":"    policy_opts.set_defaults(config)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_71919699","side":"PARENT","line":82,"updated":"2019-09-09 16:39:41.000000000","message":"Oh, maybe this is why.\n\nI think it\u0027s worth noting that it\u0027s a little dangerous to access another project\u0027s opts this way. If oslo.policy were to move/remove/rename this opt I\u0027m pretty sure it would break placement.","commit_id":"10146978ea2d7eace1ffdf6552eafd22360e37dd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b68a3166ca12df06b2036f5660a53e426e6c5556","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    _set_middleware_defaults()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    # This is needed so we can check [oslo_policy]/enforce_scope in the"},{"line_number":83,"context_line":"    # deploy module."},{"line_number":84,"context_line":"    policy_opts.set_defaults(config)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_d13baa35","side":"PARENT","line":82,"in_reply_to":"5faad753_71919699","updated":"2019-09-09 16:59:42.000000000","message":"Do you mean using policy_opts.set_defaults or using the enforce_scope option specifically?\n\nFor the latter, this is why we hit it:\n\nhttps://github.com/openstack/placement/blob/10146978ea2d7eace1ffdf6552eafd22360e37dd/placement/deploy.py#L117\n\nOtherwise we get a ton of warnings. Maybe there is a better way to handle that though.","commit_id":"10146978ea2d7eace1ffdf6552eafd22360e37dd"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"1a3b46993de0407b7ea3eff47e6ff479e6c9012c","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    _set_middleware_defaults()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    # This is needed so we can check [oslo_policy]/enforce_scope in the"},{"line_number":83,"context_line":"    # deploy module."},{"line_number":84,"context_line":"    policy_opts.set_defaults(config)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_db764dd9","side":"PARENT","line":82,"in_reply_to":"5faad753_bbb832c8","updated":"2019-09-10 15:27:46.000000000","message":"Oh, I see. enforce_scope actually makes the warnings into exceptions: https://github.com/openstack/oslo.policy/blob/4d40252748bd31584f1cbb72d4641dec62cf1303/oslo_policy/policy.py#L946\n\nI wonder if we should provide a way for services to tell oslo.policy that they\u0027re not scope-enabled yet and have it suppress the warning in that case. There\u0027s not a lot of benefit to warning people about something they already know. I suppose there\u0027s a danger of forgetting to turn the suppression off after the migration to scope, but that applies to the method used here too.","commit_id":"10146978ea2d7eace1ffdf6552eafd22360e37dd"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"e321072f9f32975fe97289628d163e34ef99c6e8","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    _set_middleware_defaults()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    # This is needed so we can check [oslo_policy]/enforce_scope in the"},{"line_number":83,"context_line":"    # deploy module."},{"line_number":84,"context_line":"    policy_opts.set_defaults(config)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_e0d59744","side":"PARENT","line":82,"in_reply_to":"5faad753_d13baa35","updated":"2019-09-10 14:18:07.000000000","message":"Looking at enforce_scope specifically. The name of the opt on the conf object doesn\u0027t go through a deprecation process because it\u0027s assumed that only the project which defines the opt is looking at it, and they presumably would have updated all of their references when they deprecated it.\n\nI also wonder if suppressing the warnings is the right thing to do. If the placement policy isn\u0027t ready to enforce scope, then turning that on is probably a bug. I strongly suspect that enforce_scope with non-scope-enabled policy rules would result in some undesired behavior. Hence the warning.\n\nIn any case, it\u0027s an existing issue that\u0027s only tangentially related to your change so it shouldn\u0027t block this IMHO.","commit_id":"10146978ea2d7eace1ffdf6552eafd22360e37dd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2586a92f6acddfe34121f45ebdf9e00f6e3ba4a6","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    _set_middleware_defaults()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    # This is needed so we can check [oslo_policy]/enforce_scope in the"},{"line_number":83,"context_line":"    # deploy module."},{"line_number":84,"context_line":"    policy_opts.set_defaults(config)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_bbb832c8","side":"PARENT","line":82,"in_reply_to":"5faad753_e0d59744","updated":"2019-09-10 14:51:53.000000000","message":"I think the issue (from I34e4e550c9c31a654308e555210588156418f9e3) was that even when enforce_scope is False (which it is by default) we\u0027d still get warnings in the logs which was annoying b/c we weren\u0027t enforcing scope. Arguably that\u0027s a bug in oslo.policy.","commit_id":"10146978ea2d7eace1ffdf6552eafd22360e37dd"}],"releasenotes/notes/deprecate-placement-policy-file-1777dc2e92d8363c.yaml":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"fc8bee2d13b06d558599b7cd51a448967ce4f25b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"deprecations:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The ``[placement]/policy_file`` configuration option is deprecated and its"},{"line_number":5,"context_line":"    usage is being replaced with the more standard"},{"line_number":6,"context_line":"    ``[oslo_policy]/policy_file`` option. If you do not override policy with"},{"line_number":7,"context_line":"    custom rules you will have nothing to do. If you do override the placement"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3fa7e38b_2fe4c2e0","line":4,"range":{"start_line":4,"start_character":21,"end_line":4,"end_character":22},"updated":"2019-09-24 12:34:36.000000000","message":"nit: s/\\// /","commit_id":"9ece3d35ab728560b33852f6e19e5f92938dc2c1"}]}
