)]}'
{"specs/queens/approved/glance/inject-automatic-metadata.rst":[{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"40eb143a573746aeafa7f4f78dd6513c547502c9","unresolved":false,"context_lines":[{"line_number":32,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Make a provision to inject image metadata to non-admin images while adding"},{"line_number":35,"context_line":"image to glance backend with the help of property protection. We are planning"},{"line_number":36,"context_line":"to introduce two new config options to achieve the same."},{"line_number":37,"context_line":"1) \u0027can_inject_automatic_metadata\u0027 by default set to False."},{"line_number":38,"context_line":"2) \u0027inject_image_metadata_properties\u0027 defaults to None."},{"line_number":39,"context_line":"\u0027inject_image_metadata_properties\u0027 config option will consist of comma"},{"line_number":40,"context_line":"separated set of image metadata which an operator wants to add to the newly"},{"line_number":41,"context_line":"created images if \u0027can_inject_automatic_metadata\u0027 is set to True. If"},{"line_number":42,"context_line":"\u0027can_inject_automatic_metadata\u0027 is set to True and"},{"line_number":43,"context_line":"\u0027inject_image_metadata_properties\u0027 doesn\u0027t contain any metadata properties"},{"line_number":44,"context_line":"defined, then no metadata will be injected to the non-admin images during"},{"line_number":45,"context_line":"image creation."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"We will use property protection so that non-admin user won\u0027t be able to"},{"line_number":48,"context_line":"add, update or delete the injected metadata properties automatically. Non-admin"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ff5d4b2f_742c3599","line":45,"range":{"start_line":35,"start_character":62,"end_line":45,"end_character":15},"updated":"2017-09-19 10:28:31.000000000","message":"How about we introduce optional glance-image-import.conf for all the optional tasks operator can include into their Interoperable Image Import taskflow and provide the configs there instead of gluttering the glance-api.conf anymore as it\u0027s already \u003e4500 lines with comments.\n\nI think the format should be normal oslo-config format with section for each task that needs configuring.","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"db4425ba9861a0f72743b7dc76c533118c619fe3","unresolved":false,"context_lines":[{"line_number":32,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Make a provision to inject image metadata to non-admin images while adding"},{"line_number":35,"context_line":"image to glance backend with the help of property protection. We are planning"},{"line_number":36,"context_line":"to introduce two new config options to achieve the same."},{"line_number":37,"context_line":"1) \u0027can_inject_automatic_metadata\u0027 by default set to False."},{"line_number":38,"context_line":"2) \u0027inject_image_metadata_properties\u0027 defaults to None."},{"line_number":39,"context_line":"\u0027inject_image_metadata_properties\u0027 config option will consist of comma"},{"line_number":40,"context_line":"separated set of image metadata which an operator wants to add to the newly"},{"line_number":41,"context_line":"created images if \u0027can_inject_automatic_metadata\u0027 is set to True. If"},{"line_number":42,"context_line":"\u0027can_inject_automatic_metadata\u0027 is set to True and"},{"line_number":43,"context_line":"\u0027inject_image_metadata_properties\u0027 doesn\u0027t contain any metadata properties"},{"line_number":44,"context_line":"defined, then no metadata will be injected to the non-admin images during"},{"line_number":45,"context_line":"image creation."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"We will use property protection so that non-admin user won\u0027t be able to"},{"line_number":48,"context_line":"add, update or delete the injected metadata properties automatically. Non-admin"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f515b1d_31cd995d","line":45,"range":{"start_line":35,"start_character":62,"end_line":45,"end_character":15},"in_reply_to":"7f515b1d_09a96dde","updated":"2017-09-22 13:53:48.000000000","message":"So while brainstorming this I was thinking following:\nOne section per task.\nThe task defines it\u0027s config options.\nIf above it will be easy to autogenerate.\nSo it will literally look without comments something like:\n\nglance-image-import.conf;\n\n[property-injections]\nignore_users \u003d \"admin\"\ninject \u003d { \"property1\": \"value\",\n           \"property2\": \"value,another value\" } \\\\Assuming json is the format this specific task uses\n\n[auto_convert]\nfrom_formats \u003d \"qcow2,iso,vmdk\"\ntarget_format \u003d \"raw\"\nworkdir_path \u003d \"/tmp/glance/convert/workdir/\"\n\n[some_other_yet_undefined_task]\nwill_have \u003d \"it\u0027s own configs\"","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c470c7b2146ff4eecd7fcfef92c0c4ed1f177af7","unresolved":false,"context_lines":[{"line_number":32,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Make a provision to inject image metadata to non-admin images while adding"},{"line_number":35,"context_line":"image to glance backend with the help of property protection. We are planning"},{"line_number":36,"context_line":"to introduce two new config options to achieve the same."},{"line_number":37,"context_line":"1) \u0027can_inject_automatic_metadata\u0027 by default set to False."},{"line_number":38,"context_line":"2) \u0027inject_image_metadata_properties\u0027 defaults to None."},{"line_number":39,"context_line":"\u0027inject_image_metadata_properties\u0027 config option will consist of comma"},{"line_number":40,"context_line":"separated set of image metadata which an operator wants to add to the newly"},{"line_number":41,"context_line":"created images if \u0027can_inject_automatic_metadata\u0027 is set to True. If"},{"line_number":42,"context_line":"\u0027can_inject_automatic_metadata\u0027 is set to True and"},{"line_number":43,"context_line":"\u0027inject_image_metadata_properties\u0027 doesn\u0027t contain any metadata properties"},{"line_number":44,"context_line":"defined, then no metadata will be injected to the non-admin images during"},{"line_number":45,"context_line":"image creation."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"We will use property protection so that non-admin user won\u0027t be able to"},{"line_number":48,"context_line":"add, update or delete the injected metadata properties automatically. Non-admin"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f515b1d_09a96dde","line":45,"range":{"start_line":35,"start_character":62,"end_line":45,"end_character":15},"in_reply_to":"ff5d4b2f_34ba3dde","updated":"2017-09-21 19:52:28.000000000","message":"We need to think a bit more about what the config file will look like.\n\n(1) I\u0027m worried about the comma-separated string, because I\u0027ve seen clouds where the value of an image property is itself comma-separated (look at public images in the rackspace public cloud -- they have some image properties that offer hints to the UI and to some tooling that does post-boot processing on VMs)\n\n(2) Do we need the can_inject option?  If the injection is a flow in the import process, the operator would turn this on by including this element in the flow.  Or, if the _properties value is None (as it will be by default), no properties would be injected.","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d3cf73ae0a37147e1a01617e9162084dd47882ba","unresolved":false,"context_lines":[{"line_number":32,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Make a provision to inject image metadata to non-admin images while adding"},{"line_number":35,"context_line":"image to glance backend with the help of property protection. We are planning"},{"line_number":36,"context_line":"to introduce two new config options to achieve the same."},{"line_number":37,"context_line":"1) \u0027can_inject_automatic_metadata\u0027 by default set to False."},{"line_number":38,"context_line":"2) \u0027inject_image_metadata_properties\u0027 defaults to None."},{"line_number":39,"context_line":"\u0027inject_image_metadata_properties\u0027 config option will consist of comma"},{"line_number":40,"context_line":"separated set of image metadata which an operator wants to add to the newly"},{"line_number":41,"context_line":"created images if \u0027can_inject_automatic_metadata\u0027 is set to True. If"},{"line_number":42,"context_line":"\u0027can_inject_automatic_metadata\u0027 is set to True and"},{"line_number":43,"context_line":"\u0027inject_image_metadata_properties\u0027 doesn\u0027t contain any metadata properties"},{"line_number":44,"context_line":"defined, then no metadata will be injected to the non-admin images during"},{"line_number":45,"context_line":"image creation."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"We will use property protection so that non-admin user won\u0027t be able to"},{"line_number":48,"context_line":"add, update or delete the injected metadata properties automatically. Non-admin"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ff5d4b2f_34ba3dde","line":45,"range":{"start_line":35,"start_character":62,"end_line":45,"end_character":15},"in_reply_to":"ff5d4b2f_742c3599","updated":"2017-09-19 10:42:42.000000000","message":"Sounds good to me, I will spin a new patch with suggested change ASAP.","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"40eb143a573746aeafa7f4f78dd6513c547502c9","unresolved":false,"context_lines":[{"line_number":61,"context_line":"1) create image API"},{"line_number":62,"context_line":"2) Import image API"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"In case of create image API, metadata will be injected before image"},{"line_number":65,"context_line":"goes into active state where as in case of import image API, as it uses"},{"line_number":66,"context_line":"taskflow, an additional task \u0027InjectMetadata\u0027 will be created to inject"},{"line_number":67,"context_line":"the metadata. If \u0027can_inject_automatic_metadata\u0027 property is set to True,"},{"line_number":68,"context_line":"then only \u0027InjectMetadata\u0027 will be part of the tasks, otherwise it will"},{"line_number":69,"context_line":"be simply ignored."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"Note: There is a restriction on how many image metadata properties an user"},{"line_number":72,"context_line":"can set to a image which is configurable using \u0027image_property_quota\u0027"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ff5d4b2f_146979bd","line":69,"range":{"start_line":64,"start_character":0,"end_line":69,"end_character":18},"updated":"2017-09-19 10:28:31.000000000","message":"I\u0027m not convinced it makes sense to introduce new optional features like this and implement them twice. Specially as the old image create workflow is going to be second class citizen once the new API is promoted to CURRENT.","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d3cf73ae0a37147e1a01617e9162084dd47882ba","unresolved":false,"context_lines":[{"line_number":61,"context_line":"1) create image API"},{"line_number":62,"context_line":"2) Import image API"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"In case of create image API, metadata will be injected before image"},{"line_number":65,"context_line":"goes into active state where as in case of import image API, as it uses"},{"line_number":66,"context_line":"taskflow, an additional task \u0027InjectMetadata\u0027 will be created to inject"},{"line_number":67,"context_line":"the metadata. If \u0027can_inject_automatic_metadata\u0027 property is set to True,"},{"line_number":68,"context_line":"then only \u0027InjectMetadata\u0027 will be part of the tasks, otherwise it will"},{"line_number":69,"context_line":"be simply ignored."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"Note: There is a restriction on how many image metadata properties an user"},{"line_number":72,"context_line":"can set to a image which is configurable using \u0027image_property_quota\u0027"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ff5d4b2f_f4902551","line":69,"range":{"start_line":64,"start_character":0,"end_line":69,"end_character":18},"in_reply_to":"ff5d4b2f_146979bd","updated":"2017-09-19 10:42:42.000000000","message":"Sounds good, will modify as suggested.","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c470c7b2146ff4eecd7fcfef92c0c4ed1f177af7","unresolved":false,"context_lines":[{"line_number":61,"context_line":"1) create image API"},{"line_number":62,"context_line":"2) Import image API"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"In case of create image API, metadata will be injected before image"},{"line_number":65,"context_line":"goes into active state where as in case of import image API, as it uses"},{"line_number":66,"context_line":"taskflow, an additional task \u0027InjectMetadata\u0027 will be created to inject"},{"line_number":67,"context_line":"the metadata. If \u0027can_inject_automatic_metadata\u0027 property is set to True,"},{"line_number":68,"context_line":"then only \u0027InjectMetadata\u0027 will be part of the tasks, otherwise it will"},{"line_number":69,"context_line":"be simply ignored."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"Note: There is a restriction on how many image metadata properties an user"},{"line_number":72,"context_line":"can set to a image which is configurable using \u0027image_property_quota\u0027"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f515b1d_06395a40","line":69,"range":{"start_line":64,"start_character":0,"end_line":69,"end_character":18},"in_reply_to":"ff5d4b2f_f4902551","updated":"2017-09-21 19:52:28.000000000","message":"I agree with Erno on this.  Even if nova continues to use the \"old\" upload workflow for VM snapshots, as long as the image properties to be injected aren\u0027t blacklisted in the nova-api.conf, they\u0027ll be copied over to the snapshot.  The only difficulty will be that since nova uses user credentials to create a snapshot, the property protections will need to allow user-level C permission on the properties.  But if nova is communicating with an \"internal\" glance that cannot be accessed by end-users, this shouldn\u0027t be a problem.","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c470c7b2146ff4eecd7fcfef92c0c4ed1f177af7","unresolved":false,"context_lines":[{"line_number":68,"context_line":"then only \u0027InjectMetadata\u0027 will be part of the tasks, otherwise it will"},{"line_number":69,"context_line":"be simply ignored."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"Note: There is a restriction on how many image metadata properties an user"},{"line_number":72,"context_line":"can set to a image which is configurable using \u0027image_property_quota\u0027"},{"line_number":73,"context_line":"config option. If it\u0027s value is 128 and say, if"},{"line_number":74,"context_line":"\u0027inject_image_metadata_properties\u0027 config option count is 3, then user would"},{"line_number":75,"context_line":"be able to add only 125 metadata items by themselves and remaining 3 will be"},{"line_number":76,"context_line":"injected automatically. If user tries to add more than 125 metadata items"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f515b1d_46663254","line":73,"range":{"start_line":71,"start_character":6,"end_line":73,"end_character":14},"updated":"2017-09-21 19:52:28.000000000","message":"off-topic: I think we should consider a GET v2/info/limits (they\u0027re not really quotas, despite the config option name) call to make these values discoverable.  That would be an easy item for a new contributor to pick up.  Should it be a spec or could it be a spec-lite?","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"40eb143a573746aeafa7f4f78dd6513c547502c9","unresolved":false,"context_lines":[{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"Alternative approach is to enable notifications for glance and then have a"},{"line_number":85,"context_line":"process which will continuously listen for \u0027image create\u0027 notifications"},{"line_number":86,"context_line":"and inject the metadata to the image only in case if image is created"},{"line_number":87,"context_line":"by non-admin users."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Data model impact"},{"line_number":90,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ff5d4b2f_54cb71a4","line":87,"range":{"start_line":84,"start_character":0,"end_line":87,"end_character":19},"updated":"2017-09-19 10:28:31.000000000","message":"I think this is great workaround until the feature is implemented but relies 3rd party tooling that effectively needs to store admin credentials. So by far not optimal alternative solution for long term.","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d3cf73ae0a37147e1a01617e9162084dd47882ba","unresolved":false,"context_lines":[{"line_number":81,"context_line":"Alternatives"},{"line_number":82,"context_line":"------------"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"Alternative approach is to enable notifications for glance and then have a"},{"line_number":85,"context_line":"process which will continuously listen for \u0027image create\u0027 notifications"},{"line_number":86,"context_line":"and inject the metadata to the image only in case if image is created"},{"line_number":87,"context_line":"by non-admin users."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Data model impact"},{"line_number":90,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ff5d4b2f_b49aad6b","line":87,"range":{"start_line":84,"start_character":0,"end_line":87,"end_character":19},"in_reply_to":"ff5d4b2f_54cb71a4","updated":"2017-09-19 10:42:42.000000000","message":"sounds good, will modify in new patch","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"40eb143a573746aeafa7f4f78dd6513c547502c9","unresolved":false,"context_lines":[{"line_number":94,"context_line":"REST API impact"},{"line_number":95,"context_line":"---------------"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"If non-admin user tries to add properties defined in"},{"line_number":98,"context_line":"\u0027inject_image_metadata_properties\u0027 while creating the image then create and"},{"line_number":99,"context_line":"import api will return 403 Forbidden response to the user."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"Security impact"},{"line_number":102,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ff5d4b2f_949a09c3","line":99,"range":{"start_line":97,"start_character":0,"end_line":99,"end_character":58},"updated":"2017-09-19 10:28:31.000000000","message":"Same restrictions apply as with any protected property in our current implementation. (These are already operator configurable.) I think there is no new API Impact","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d3cf73ae0a37147e1a01617e9162084dd47882ba","unresolved":false,"context_lines":[{"line_number":94,"context_line":"REST API impact"},{"line_number":95,"context_line":"---------------"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"If non-admin user tries to add properties defined in"},{"line_number":98,"context_line":"\u0027inject_image_metadata_properties\u0027 while creating the image then create and"},{"line_number":99,"context_line":"import api will return 403 Forbidden response to the user."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"Security impact"},{"line_number":102,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ff5d4b2f_748e752f","line":99,"range":{"start_line":97,"start_character":0,"end_line":99,"end_character":58},"in_reply_to":"ff5d4b2f_949a09c3","updated":"2017-09-19 10:42:42.000000000","message":"sounds good, will modify in new patch","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"40eb143a573746aeafa7f4f78dd6513c547502c9","unresolved":false,"context_lines":[{"line_number":106,"context_line":"Notifications impact"},{"line_number":107,"context_line":"--------------------"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"Need to add a notification to notify that metadata is injected to non-admin"},{"line_number":110,"context_line":"images."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"Other end user impact"},{"line_number":113,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ff5d4b2f_34a91ddf","line":110,"range":{"start_line":109,"start_character":0,"end_line":110,"end_character":7},"updated":"2017-09-19 10:28:31.000000000","message":"Do we?","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c470c7b2146ff4eecd7fcfef92c0c4ed1f177af7","unresolved":false,"context_lines":[{"line_number":106,"context_line":"Notifications impact"},{"line_number":107,"context_line":"--------------------"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"Need to add a notification to notify that metadata is injected to non-admin"},{"line_number":110,"context_line":"images."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"Other end user impact"},{"line_number":113,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f515b1d_46c2b2eb","line":110,"range":{"start_line":109,"start_character":0,"end_line":110,"end_character":7},"in_reply_to":"ff5d4b2f_3488fd1d","updated":"2017-09-21 19:52:28.000000000","message":"You could make it an info level log message if your use case requires you to track this.  Only needs to be a notification if you envision having a service that would consume the notification and take action.  (I don\u0027t see the utility of that, but there may be aspects of your use case that I\u0027m missing.)","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d3cf73ae0a37147e1a01617e9162084dd47882ba","unresolved":false,"context_lines":[{"line_number":106,"context_line":"Notifications impact"},{"line_number":107,"context_line":"--------------------"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"Need to add a notification to notify that metadata is injected to non-admin"},{"line_number":110,"context_line":"images."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"Other end user impact"},{"line_number":113,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ff5d4b2f_3488fd1d","line":110,"range":{"start_line":109,"start_character":0,"end_line":110,"end_character":7},"in_reply_to":"ff5d4b2f_34a91ddf","updated":"2017-09-19 10:42:42.000000000","message":"not required, will modify in new patch","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c470c7b2146ff4eecd7fcfef92c0c4ed1f177af7","unresolved":false,"context_lines":[{"line_number":120,"context_line":"There is a limit on having additional image metadata properties which defaults"},{"line_number":121,"context_line":"to 128. This is configurable using \u0027image_property_quota\u0027 option. If an"},{"line_number":122,"context_line":"operator sets this limit to higher value and more metadata properties are"},{"line_number":123,"context_line":"injected, then it will impact performance during listing or fetching image(s)."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"Other deployer impact"},{"line_number":126,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"7f515b1d_063f1ad7","line":123,"updated":"2017-09-21 19:52:28.000000000","message":"You should point out that this impact is not specifically a result of the proposal in this spec, it\u0027s also the case under the current situation.\n\nAlso, you might want to s/listing or fetching image(s)/image-list or image-show calls/.  (It won\u0027t affect GET /file)","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"40eb143a573746aeafa7f4f78dd6513c547502c9","unresolved":false,"context_lines":[{"line_number":171,"context_line":"Testing"},{"line_number":172,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"Tempest tests will be added to verify that metadata will be injected for"},{"line_number":175,"context_line":"non-admin images only. "},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"Documentation Impact"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ff5d4b2f_b48d0d7d","line":174,"range":{"start_line":174,"start_character":0,"end_line":174,"end_character":7},"updated":"2017-09-19 10:28:31.000000000","message":"Should we include in tree functional testing or would you think utilizing tempest is sufficient?","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d3cf73ae0a37147e1a01617e9162084dd47882ba","unresolved":false,"context_lines":[{"line_number":171,"context_line":"Testing"},{"line_number":172,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"Tempest tests will be added to verify that metadata will be injected for"},{"line_number":175,"context_line":"non-admin images only. "},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"Documentation Impact"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ff5d4b2f_d476413f","line":174,"range":{"start_line":174,"start_character":0,"end_line":174,"end_character":7},"in_reply_to":"ff5d4b2f_b48d0d7d","updated":"2017-09-19 10:42:42.000000000","message":"I guess in tree functional tests are sufficient than utilizing the tempest.","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"40eb143a573746aeafa7f4f78dd6513c547502c9","unresolved":false,"context_lines":[{"line_number":172,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"Tempest tests will be added to verify that metadata will be injected for"},{"line_number":175,"context_line":"non-admin images only. "},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"Documentation Impact"},{"line_number":178,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ff5d4b2f_94832957","line":175,"range":{"start_line":175,"start_character":22,"end_line":175,"end_character":23},"updated":"2017-09-19 10:28:31.000000000","message":"extra whitespace","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d3cf73ae0a37147e1a01617e9162084dd47882ba","unresolved":false,"context_lines":[{"line_number":172,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"Tempest tests will be added to verify that metadata will be injected for"},{"line_number":175,"context_line":"non-admin images only. "},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"Documentation Impact"},{"line_number":178,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ff5d4b2f_147df91b","line":175,"range":{"start_line":175,"start_character":22,"end_line":175,"end_character":23},"in_reply_to":"ff5d4b2f_94832957","updated":"2017-09-19 10:42:42.000000000","message":"sounds good, will remove in new patch","commit_id":"49122dfe25c446904dd5c62a610da2df0a5d7d3b"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"ecdf2ef9750c9656f92b3a9f02fe5619aa3fc8fd","unresolved":false,"context_lines":[{"line_number":52,"context_line":"will have \u0027property_injections\u0027 section described below;"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"[property_injections]"},{"line_number":55,"context_line":"ignore_users \u003d \"admin\""},{"line_number":56,"context_line":"inject \u003d { \"property1\": \"value\", \"property2\": \"value,another value\" }"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"[some_other_yet_undefined_task]"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f515b1d_1cfdadb0","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":12},"updated":"2017-09-27 02:59:11.000000000","message":"This should be ignore_user_roles as you have mentioined on line #37.","commit_id":"f5e35c0d32d1efaa4c8cc6a681270b262e174bab"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"ecdf2ef9750c9656f92b3a9f02fe5619aa3fc8fd","unresolved":false,"context_lines":[{"line_number":52,"context_line":"will have \u0027property_injections\u0027 section described below;"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"[property_injections]"},{"line_number":55,"context_line":"ignore_users \u003d \"admin\""},{"line_number":56,"context_line":"inject \u003d { \"property1\": \"value\", \"property2\": \"value,another value\" }"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"[some_other_yet_undefined_task]"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f515b1d_5cf7a5d4","line":55,"range":{"start_line":55,"start_character":15,"end_line":55,"end_character":22},"updated":"2017-09-27 02:59:11.000000000","message":"Type should be a list instead of string if you intend to allow operator to configure more than one role.","commit_id":"f5e35c0d32d1efaa4c8cc6a681270b262e174bab"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"68c5fac1d27fbbb1adc252217c450a4af22e05ce","unresolved":false,"context_lines":[{"line_number":52,"context_line":"will have \u0027property_injections\u0027 section described below;"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"[property_injections]"},{"line_number":55,"context_line":"ignore_users \u003d \"admin\""},{"line_number":56,"context_line":"inject \u003d { \"property1\": \"value\", \"property2\": \"value,another value\" }"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"[some_other_yet_undefined_task]"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f515b1d_96fa91ba","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":12},"in_reply_to":"7f515b1d_1cfdadb0","updated":"2017-09-27 10:07:52.000000000","message":"Done","commit_id":"f5e35c0d32d1efaa4c8cc6a681270b262e174bab"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"68c5fac1d27fbbb1adc252217c450a4af22e05ce","unresolved":false,"context_lines":[{"line_number":52,"context_line":"will have \u0027property_injections\u0027 section described below;"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"[property_injections]"},{"line_number":55,"context_line":"ignore_users \u003d \"admin\""},{"line_number":56,"context_line":"inject \u003d { \"property1\": \"value\", \"property2\": \"value,another value\" }"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"[some_other_yet_undefined_task]"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f515b1d_76f715d5","line":55,"range":{"start_line":55,"start_character":15,"end_line":55,"end_character":22},"in_reply_to":"7f515b1d_5cf7a5d4","updated":"2017-09-27 10:07:52.000000000","message":"Done","commit_id":"f5e35c0d32d1efaa4c8cc6a681270b262e174bab"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"ecdf2ef9750c9656f92b3a9f02fe5619aa3fc8fd","unresolved":false,"context_lines":[{"line_number":66,"context_line":"to non-admin users as described below:"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"[property1]"},{"line_number":69,"context_line":"create \u003d admin"},{"line_number":70,"context_line":"read \u003d admin,member,_member_"},{"line_number":71,"context_line":"update \u003d admin"},{"line_number":72,"context_line":"delete \u003d admin"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f515b1d_bcf0d9fe","line":69,"range":{"start_line":69,"start_character":0,"end_line":69,"end_character":14},"updated":"2017-09-27 02:59:11.000000000","message":"When user creates a volume from image, all image metadata will be copied to volume and made available as volume_image_metadata. Now, when user will copy back a volume to image, it will attempt to add \u0027property1\u0027 metadata and it will fail as it is only allowed to be created by admin.\n\nIMO, in order to address this issue, you will need to ignore all properties specified in \u0027inject\u0027 config option if the request comes from a user whose roles is not specified in \u0027ignore_user_roles config option.","commit_id":"f5e35c0d32d1efaa4c8cc6a681270b262e174bab"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"68c5fac1d27fbbb1adc252217c450a4af22e05ce","unresolved":false,"context_lines":[{"line_number":66,"context_line":"to non-admin users as described below:"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"[property1]"},{"line_number":69,"context_line":"create \u003d admin"},{"line_number":70,"context_line":"read \u003d admin,member,_member_"},{"line_number":71,"context_line":"update \u003d admin"},{"line_number":72,"context_line":"delete \u003d admin"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7f515b1d_d60c89ed","line":69,"range":{"start_line":69,"start_character":0,"end_line":69,"end_character":14},"in_reply_to":"7f515b1d_bcf0d9fe","updated":"2017-09-27 10:07:52.000000000","message":"Done","commit_id":"f5e35c0d32d1efaa4c8cc6a681270b262e174bab"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"299c2ead61618eb9a0bb253343c72a7bdde36881","unresolved":false,"context_lines":[{"line_number":34,"context_line":"Make a provision to inject image metadata to non-admin images while adding"},{"line_number":35,"context_line":"image to glance backend with the help of property protection. We are planning"},{"line_number":36,"context_line":"to introduce two new config options to achieve the same."},{"line_number":37,"context_line":"1) \u0027ignore_user_roles\u0027 default set to admin."},{"line_number":38,"context_line":"2) \u0027inject\u0027 defaults to None."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"\u0027inject\u0027 config option will consist of json format (key: value pair) of image"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_be1f6606","line":37,"updated":"2017-09-29 12:37:39.000000000","message":"I wonder if instead of roles we should go with policy rules here.  With property protections, we support both, but I think supporting rules is more general and maybe we should just go with that.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"653734879bc64a4a60df4564912a4f150aa8e8d3","unresolved":false,"context_lines":[{"line_number":34,"context_line":"Make a provision to inject image metadata to non-admin images while adding"},{"line_number":35,"context_line":"image to glance backend with the help of property protection. We are planning"},{"line_number":36,"context_line":"to introduce two new config options to achieve the same."},{"line_number":37,"context_line":"1) \u0027ignore_user_roles\u0027 default set to admin."},{"line_number":38,"context_line":"2) \u0027inject\u0027 defaults to None."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"\u0027inject\u0027 config option will consist of json format (key: value pair) of image"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_ad9c855d","line":37,"in_reply_to":"7f515b1d_63822a03","updated":"2017-10-04 14:43:58.000000000","message":"OK, I don\u0027t insist.  It\u0027s worth mentioning that the value of ignore_user_roles is a comma-separated list of roles.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"90ab814845a4604123841995dd7baba0a26f5128","unresolved":false,"context_lines":[{"line_number":34,"context_line":"Make a provision to inject image metadata to non-admin images while adding"},{"line_number":35,"context_line":"image to glance backend with the help of property protection. We are planning"},{"line_number":36,"context_line":"to introduce two new config options to achieve the same."},{"line_number":37,"context_line":"1) \u0027ignore_user_roles\u0027 default set to admin."},{"line_number":38,"context_line":"2) \u0027inject\u0027 defaults to None."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"\u0027inject\u0027 config option will consist of json format (key: value pair) of image"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_63822a03","line":37,"in_reply_to":"7f515b1d_7902280c","updated":"2017-10-04 07:18:58.000000000","message":"Agree with Erno on this","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"f1d5329160034a69e0cf29ce5bc5f4ef66e79f11","unresolved":false,"context_lines":[{"line_number":34,"context_line":"Make a provision to inject image metadata to non-admin images while adding"},{"line_number":35,"context_line":"image to glance backend with the help of property protection. We are planning"},{"line_number":36,"context_line":"to introduce two new config options to achieve the same."},{"line_number":37,"context_line":"1) \u0027ignore_user_roles\u0027 default set to admin."},{"line_number":38,"context_line":"2) \u0027inject\u0027 defaults to None."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"\u0027inject\u0027 config option will consist of json format (key: value pair) of image"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_7902280c","line":37,"in_reply_to":"7f515b1d_be1f6606","updated":"2017-09-29 13:30:29.000000000","message":"I\u0027d rather not mix policy rules into the optional tasks in the flow. Makes it pretty messy and more difficult to control. (You don\u0027t want to get admin image creation fail because policy prevented him/her to inject the properties meant to be done by non-admin user.)","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"299c2ead61618eb9a0bb253343c72a7bdde36881","unresolved":false,"context_lines":[{"line_number":51,"context_line":"For example, for injecting metadata properties \u0027glance-image-import.conf\u0027"},{"line_number":52,"context_line":"will have \u0027property_injections\u0027 section described below;"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"[property_injections]"},{"line_number":55,"context_line":"ignore_user_roles \u003d admin,..."},{"line_number":56,"context_line":"inject \u003d { \"property1\": \"value\", \"property2\": \"value,another value\" }"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_3e66d6c2","line":54,"updated":"2017-09-29 12:37:39.000000000","message":"we probably want a name that mirrors the name of the task, so if you\u0027re proposing to name the task InjectMetadataProperties, maybe this should be inject_metadata_properties\n\n(I know I\u0027m on the verge of bikeshedding here, but we need to come up with something that will make this file easy to configure.)","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"f1d5329160034a69e0cf29ce5bc5f4ef66e79f11","unresolved":false,"context_lines":[{"line_number":51,"context_line":"For example, for injecting metadata properties \u0027glance-image-import.conf\u0027"},{"line_number":52,"context_line":"will have \u0027property_injections\u0027 section described below;"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"[property_injections]"},{"line_number":55,"context_line":"ignore_user_roles \u003d admin,..."},{"line_number":56,"context_line":"inject \u003d { \"property1\": \"value\", \"property2\": \"value,another value\" }"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_99160449","line":54,"in_reply_to":"7f515b1d_3e66d6c2","updated":"2017-09-29 13:30:29.000000000","message":"++ That was my initial purpose when I proposed the new config file approach.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"90ab814845a4604123841995dd7baba0a26f5128","unresolved":false,"context_lines":[{"line_number":51,"context_line":"For example, for injecting metadata properties \u0027glance-image-import.conf\u0027"},{"line_number":52,"context_line":"will have \u0027property_injections\u0027 section described below;"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"[property_injections]"},{"line_number":55,"context_line":"ignore_user_roles \u003d admin,..."},{"line_number":56,"context_line":"inject \u003d { \"property1\": \"value\", \"property2\": \"value,another value\" }"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_c372fe49","line":54,"in_reply_to":"7f515b1d_3e66d6c2","updated":"2017-10-04 07:18:58.000000000","message":"Done","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"299c2ead61618eb9a0bb253343c72a7bdde36881","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"[property_injections]"},{"line_number":55,"context_line":"ignore_user_roles \u003d admin,..."},{"line_number":56,"context_line":"inject \u003d { \"property1\": \"value\", \"property2\": \"value,another value\" }"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Note:"},{"line_number":59,"context_line":"When user creates a volume from image, all image metadata will be copied to"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_dee902e6","line":56,"updated":"2017-09-29 12:37:39.000000000","message":"I don\u0027t want to over-engineer this, but your use case is basically: if an admin uploads, don\u0027t do anything; if an end user uploads, inject these properties to put the user into the correct host-aggregate.  I can see the next step being look at some role the user has and depending on that, pick a particular host-aggregate for them to use.  Or is that not necessary?  I\u0027m not saying that we have to implement something that general, just that if this extension would make sense, we need to design the config file so that it will be easy to make that change eventually.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"653734879bc64a4a60df4564912a4f150aa8e8d3","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"[property_injections]"},{"line_number":55,"context_line":"ignore_user_roles \u003d admin,..."},{"line_number":56,"context_line":"inject \u003d { \"property1\": \"value\", \"property2\": \"value,another value\" }"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Note:"},{"line_number":59,"context_line":"When user creates a volume from image, all image metadata will be copied to"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_3018ec73","line":56,"in_reply_to":"7f515b1d_63b0eade","updated":"2017-10-04 14:43:58.000000000","message":"OK, I\u0027ll look for this in the next version.  I thought that you really need the ignore_user_roles option.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"90ab814845a4604123841995dd7baba0a26f5128","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"[property_injections]"},{"line_number":55,"context_line":"ignore_user_roles \u003d admin,..."},{"line_number":56,"context_line":"inject \u003d { \"property1\": \"value\", \"property2\": \"value,another value\" }"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Note:"},{"line_number":59,"context_line":"When user creates a volume from image, all image metadata will be copied to"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_63b0eade","line":56,"in_reply_to":"7f515b1d_dee902e6","updated":"2017-10-04 07:18:58.000000000","message":"IMO we don\u0027t require this ignore_user_roles option at all as only admin will be able to inject mentioned properties to the image. I will remove it from the specs.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"70a576ad552bdabb6e62cbae69c1522fe2a18bc1","unresolved":false,"context_lines":[{"line_number":59,"context_line":"When user creates a volume from image, all image metadata will be copied to"},{"line_number":60,"context_line":"volume and made available as volume_image_metadata. Now, when user will copy"},{"line_number":61,"context_line":"back a volume to image, it will attempt to add \u0027property1\u0027 metadata and it"},{"line_number":62,"context_line":"will fail as it is only allowed to be created by admin. To address this issue"},{"line_number":63,"context_line":"need to make provision like ignore all properties specified in \u0027inject\u0027"},{"line_number":64,"context_line":"config option if the request comes from a user whose roles is not specified"},{"line_number":65,"context_line":"in \u0027ignore_user_roles config option."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"[some_other_yet_undefined_task]"},{"line_number":68,"context_line":"will_have \u003d \"it\u0027s own configs\""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_72ef76b0","line":65,"range":{"start_line":62,"start_character":56,"end_line":65,"end_character":36},"updated":"2017-10-05 04:01:21.000000000","message":"I have made a mistake in offering above suggestion. If we allow to ignore all properties as specified in \"inject\" config option, it means that we are allowing any user to create those metadata properties thus violating policy rules.\n\nThere is no way to figure out whether a request to create image is coming from cinder/nova or a user. It\u0027s a difficult problem to solve until there is some support from cross projects.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"299c2ead61618eb9a0bb253343c72a7bdde36881","unresolved":false,"context_lines":[{"line_number":62,"context_line":"will fail as it is only allowed to be created by admin. To address this issue"},{"line_number":63,"context_line":"need to make provision like ignore all properties specified in \u0027inject\u0027"},{"line_number":64,"context_line":"config option if the request comes from a user whose roles is not specified"},{"line_number":65,"context_line":"in \u0027ignore_user_roles config option."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"[some_other_yet_undefined_task]"},{"line_number":68,"context_line":"will_have \u003d \"it\u0027s own configs\""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_dedfc266","line":65,"updated":"2017-09-29 12:37:39.000000000","message":"We need to think some more about this.  This is a cinder operation, so if cinder is connected to a dedicated glance (maybe the same one nova is using), the property protections can allow user-create (since an end user can\u0027t use that node directly).  The other thing is, this will introduce a coupling between the import config file and the regular \"upload\" path.\n\nI\u0027m not saying don\u0027t do it, just that we need to think about this carefully.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"653734879bc64a4a60df4564912a4f150aa8e8d3","unresolved":false,"context_lines":[{"line_number":62,"context_line":"will fail as it is only allowed to be created by admin. To address this issue"},{"line_number":63,"context_line":"need to make provision like ignore all properties specified in \u0027inject\u0027"},{"line_number":64,"context_line":"config option if the request comes from a user whose roles is not specified"},{"line_number":65,"context_line":"in \u0027ignore_user_roles config option."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"[some_other_yet_undefined_task]"},{"line_number":68,"context_line":"will_have \u003d \"it\u0027s own configs\""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_ad86c5da","line":65,"in_reply_to":"7f515b1d_03cc965f","updated":"2017-10-04 14:43:58.000000000","message":"Yes, you\u0027ve understood my point.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"90ab814845a4604123841995dd7baba0a26f5128","unresolved":false,"context_lines":[{"line_number":62,"context_line":"will fail as it is only allowed to be created by admin. To address this issue"},{"line_number":63,"context_line":"need to make provision like ignore all properties specified in \u0027inject\u0027"},{"line_number":64,"context_line":"config option if the request comes from a user whose roles is not specified"},{"line_number":65,"context_line":"in \u0027ignore_user_roles config option."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"[some_other_yet_undefined_task]"},{"line_number":68,"context_line":"will_have \u003d \"it\u0027s own configs\""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_03cc965f","line":65,"in_reply_to":"7f515b1d_dedfc266","updated":"2017-10-04 07:18:58.000000000","message":"Hi Brian,\n\nYou are talking about dedicated glance node to nova/cinder and another node to the user right? In this case no need to make change in code but if dedicated node is not provided then this might create problem. Please correct me if wrong.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"299c2ead61618eb9a0bb253343c72a7bdde36881","unresolved":false,"context_lines":[{"line_number":87,"context_line":"In case of import image API, as it uses taskflow, an additional task"},{"line_number":88,"context_line":"\u0027InjectMetadataProperties\u0027 will be created to inject the metadata. If"},{"line_number":89,"context_line":"\u0027inject\u0027 property is not None, then only \u0027InjectMetadataProperties\u0027 will be"},{"line_number":90,"context_line":"part of the tasks, otherwise it will be simply ignored."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"No changes will be made to create image API as it is going to be second"},{"line_number":93,"context_line":"class citizen once the new Import API is promoted to CURRENT."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_defb42be","line":90,"updated":"2017-09-29 12:37:39.000000000","message":"Erno can correct me here, but I think what will happen is:\n(1) If you want to use this task, it must be defined as part of the glance.flows.api_image_import in setup.cfg.  If it\u0027s not defined there, the config will never be read.\n(2) If the task is defined as part of the flow, then if the \u0027inject\u0027 property is None, the task won\u0027t do anything\n\nSo the next question is, will this thing be part of the flow by default (if inject \u003d None it won\u0027t do anything, so that would be OK), or do we want to leave it out, and operators who want to use it can add it to the flow?  The latter makes this more complex to configure, but as items get added to the flow, they\u0027ll have to mess with setup.cfg, and maybe we should start getting them used to that idea.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"653734879bc64a4a60df4564912a4f150aa8e8d3","unresolved":false,"context_lines":[{"line_number":87,"context_line":"In case of import image API, as it uses taskflow, an additional task"},{"line_number":88,"context_line":"\u0027InjectMetadataProperties\u0027 will be created to inject the metadata. If"},{"line_number":89,"context_line":"\u0027inject\u0027 property is not None, then only \u0027InjectMetadataProperties\u0027 will be"},{"line_number":90,"context_line":"part of the tasks, otherwise it will be simply ignored."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"No changes will be made to create image API as it is going to be second"},{"line_number":93,"context_line":"class citizen once the new Import API is promoted to CURRENT."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_ad17e551","line":90,"in_reply_to":"7f515b1d_4303ae74","updated":"2017-10-04 14:43:58.000000000","message":"OK, so you\u0027re thinking of the get_flow method reading the config file to decide what tasks to execute.  We can hold off on committing to a particular approach to this until we figure out the \"hooks\" during development.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"90ab814845a4604123841995dd7baba0a26f5128","unresolved":false,"context_lines":[{"line_number":87,"context_line":"In case of import image API, as it uses taskflow, an additional task"},{"line_number":88,"context_line":"\u0027InjectMetadataProperties\u0027 will be created to inject the metadata. If"},{"line_number":89,"context_line":"\u0027inject\u0027 property is not None, then only \u0027InjectMetadataProperties\u0027 will be"},{"line_number":90,"context_line":"part of the tasks, otherwise it will be simply ignored."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"No changes will be made to create image API as it is going to be second"},{"line_number":93,"context_line":"class citizen once the new Import API is promoted to CURRENT."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_4303ae74","line":90,"in_reply_to":"7f515b1d_defb42be","updated":"2017-10-04 07:18:58.000000000","message":"IMO in setup.cfg we are only specifying the path for get_flow method and not actual tasks which will create the flow from available tasks. So this will not cause any problem.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"f1d5329160034a69e0cf29ce5bc5f4ef66e79f11","unresolved":false,"context_lines":[{"line_number":87,"context_line":"In case of import image API, as it uses taskflow, an additional task"},{"line_number":88,"context_line":"\u0027InjectMetadataProperties\u0027 will be created to inject the metadata. If"},{"line_number":89,"context_line":"\u0027inject\u0027 property is not None, then only \u0027InjectMetadataProperties\u0027 will be"},{"line_number":90,"context_line":"part of the tasks, otherwise it will be simply ignored."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"No changes will be made to create image API as it is going to be second"},{"line_number":93,"context_line":"class citizen once the new Import API is promoted to CURRENT."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_f96cd8ce","line":90,"in_reply_to":"7f515b1d_defb42be","updated":"2017-09-29 13:30:29.000000000","message":"So this specific is part of the original design allow deployers to put their own tasks in there. This is exactly the place where we need to design the hooks that we can have additional tasks put into the flow based of the deployment configuration without hardcoding every single one of them into the code.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"299c2ead61618eb9a0bb253343c72a7bdde36881","unresolved":false,"context_lines":[{"line_number":90,"context_line":"part of the tasks, otherwise it will be simply ignored."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"No changes will be made to create image API as it is going to be second"},{"line_number":93,"context_line":"class citizen once the new Import API is promoted to CURRENT."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"Note: There is a restriction on how many image metadata properties an user"},{"line_number":96,"context_line":"can set to a image which is configurable using \u0027image_property_quota\u0027"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_3ed81679","line":93,"updated":"2017-09-29 12:37:39.000000000","message":"I wouldn\u0027t put it this way.  The intent is that the old upload workflow will only be used by services, it won\u0027t be exposed to end users in most deployments.  (At least that\u0027s what we\u0027ll recommend.)","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5202,"name":"Erno Kuvaja","email":"jokke@usr.fi","username":"jokke"},"change_message_id":"f1d5329160034a69e0cf29ce5bc5f4ef66e79f11","unresolved":false,"context_lines":[{"line_number":90,"context_line":"part of the tasks, otherwise it will be simply ignored."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"No changes will be made to create image API as it is going to be second"},{"line_number":93,"context_line":"class citizen once the new Import API is promoted to CURRENT."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"Note: There is a restriction on how many image metadata properties an user"},{"line_number":96,"context_line":"can set to a image which is configurable using \u0027image_property_quota\u0027"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_799ea8b9","line":93,"in_reply_to":"7f515b1d_3ed81679","updated":"2017-09-29 13:30:29.000000000","message":"Same thing, different wording ;)","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"90ab814845a4604123841995dd7baba0a26f5128","unresolved":false,"context_lines":[{"line_number":90,"context_line":"part of the tasks, otherwise it will be simply ignored."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"No changes will be made to create image API as it is going to be second"},{"line_number":93,"context_line":"class citizen once the new Import API is promoted to CURRENT."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"Note: There is a restriction on how many image metadata properties an user"},{"line_number":96,"context_line":"can set to a image which is configurable using \u0027image_property_quota\u0027"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_03f5b683","line":93,"in_reply_to":"7f515b1d_3ed81679","updated":"2017-10-04 07:18:58.000000000","message":"will make this change","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"299c2ead61618eb9a0bb253343c72a7bdde36881","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"Administrator need to set \u0027ignore_user_roles\u0027 and \u0027inject\u0027 config options in"},{"line_number":149,"context_line":"\u0027property_injections\u0027 section of \u0027glance-image-import.conf\u0027 config file"},{"line_number":150,"context_line":"if metadata properties to be injected for new images for non-admin users."},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"Developer impact"},{"line_number":153,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_7efc4eb4","line":150,"updated":"2017-09-29 12:37:39.000000000","message":"Also, see my question at line 90.","commit_id":"702db3a15bff718a985898d00bda99daa7edb09c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"fb1189d2d612d1e4e82c6a0551378765a94cbe87","unresolved":false,"context_lines":[{"line_number":63,"context_line":"need to make provision like ignore all properties specified in \u0027inject\u0027"},{"line_number":64,"context_line":"config option if the request comes from a user whose roles is not specified"},{"line_number":65,"context_line":"in \u0027ignore_user_roles config option. For example when user performs"},{"line_number":66,"context_line":"copy back volume to image then if properties mentioned in inject option"},{"line_number":67,"context_line":"will be silently ignored i.e. newly created image from volume does not contains"},{"line_number":68,"context_line":"special metadata properties mentioned in \u0027inject\u0027 config option."},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"[some_other_yet_undefined_task]"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_fc3aeae4","line":67,"range":{"start_line":66,"start_character":34,"end_line":67,"end_character":24},"updated":"2017-10-06 13:28:15.000000000","message":"We can figure out the best way to do this during implementation.  It occurs to me that this isn\u0027t a problem specific to your InjectMetadataProperties task.  This is a problem for nova snapshots, too.  So I don\u0027t like just ignoring the properties mentioned in the inject option, but I\u0027m not sure what exactly we can do here until we have service tokens or whatever the latest stable keystone feature is that will allow us to recognize a user-level request made by a service.","commit_id":"1549f4a0dceaacffe791019996e66568073c2a62"}]}
