)]}'
{"etc/zun/policy.json":[{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"added3a43f332dc7ee37692a3b4910868c71e5bd","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    \"container:logs\": \"rule:admin_or_user\","},{"line_number":19,"context_line":"    \"container:execute\": \"rule:admin_or_user\","},{"line_number":20,"context_line":"    \"container:kill\": \"rule:admin_or_user\","},{"line_number":21,"context_line":"    \"container:update\": \"rule:admin_or_user\","},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    \"image:create\": \"rule:default\","},{"line_number":24,"context_line":"    \"image:get_all\": \"rule:default\","}],"source_content_type":"application/json","patch_set":3,"id":"7a77a97e_79086d2e","line":21,"updated":"2016-11-21 15:37:22.000000000","message":"better to call it patch, what do u think?","commit_id":"31cb957e4525bdb7c2297fd4197fc9bc23cd4126"}],"requirements.txt":[{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"96848514dd23ac35c068b325d87c5b1e1c8970d2","unresolved":false,"context_lines":[{"line_number":30,"context_line":"WSME\u003e\u003d0.8 # MIT"},{"line_number":31,"context_line":"SQLAlchemy\u003c1.1.0,\u003e\u003d1.0.10 # MIT"},{"line_number":32,"context_line":"stevedore\u003e\u003d1.17.1 # Apache-2.0"},{"line_number":33,"context_line":"docker-py\u003c\u003d1.10.4,\u003e\u003d1.6.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":4,"id":"da4df55a_51050b78","line":33,"updated":"2016-12-24 05:44:58.000000000","message":"@Madhuri, what is rational behind this change, gate is failing due to this.","commit_id":"6102d50210526655b16855915a18657734f0cfa0"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"ca527bc1d49c39b591bd462c572b409581d2f054","unresolved":false,"context_lines":[{"line_number":30,"context_line":"WSME\u003e\u003d0.8 # MIT"},{"line_number":31,"context_line":"SQLAlchemy\u003c1.1.0,\u003e\u003d1.0.10 # MIT"},{"line_number":32,"context_line":"stevedore\u003e\u003d1.17.1 # Apache-2.0"},{"line_number":33,"context_line":"docker-py\u003c\u003d1.10.4,\u003e\u003d1.6.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":4,"id":"ba5201f7_04cff87f","line":33,"in_reply_to":"ba5201f7_8cceb881","updated":"2017-01-02 15:48:37.000000000","message":"@Madhuri,\n\nIt looks the update API is available since 1.8.0 (https://github.com/docker/docker-py/blob/1.8.0/docker/api/container.py#L404). I think there are several options here:\n\n* Submit a patch to global requirement to increase the constraints to 1.8.0 (see here for instruction https://github.com/openstack/requirements#proposing-changes).\n* Leave the requirement unchanged, but throw an exception when the docker-py version is too low.","commit_id":"6102d50210526655b16855915a18657734f0cfa0"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"6b0e0d54a49252f4d0bd902260af4d8fc9ea73cb","unresolved":false,"context_lines":[{"line_number":30,"context_line":"WSME\u003e\u003d0.8 # MIT"},{"line_number":31,"context_line":"SQLAlchemy\u003c1.1.0,\u003e\u003d1.0.10 # MIT"},{"line_number":32,"context_line":"stevedore\u003e\u003d1.17.1 # Apache-2.0"},{"line_number":33,"context_line":"docker-py\u003c\u003d1.10.4,\u003e\u003d1.6.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":4,"id":"ba5201f7_8cceb881","line":33,"in_reply_to":"da4df55a_51050b78","updated":"2017-01-02 08:20:52.000000000","message":"The update API is available in this version and above.","commit_id":"6102d50210526655b16855915a18657734f0cfa0"}],"zun/api/controllers/v1/containers.py":[{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"7361a5ddc529b8dd97f61f86399807af1a7e8cd6","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        utils.validate_container_state(container, \u0027update\u0027)"},{"line_number":308,"context_line":"        if patch.get(\u0027memory\u0027):"},{"line_number":309,"context_line":"            patch[\u0027memory\u0027] \u003d str(patch[\u0027memory\u0027]) + \u0027M\u0027"},{"line_number":310,"context_line":"        context \u003d pecan.request.context"},{"line_number":311,"context_line":"        compute_api \u003d pecan.request.compute_api"},{"line_number":312,"context_line":"        container \u003d compute_api.container_update(context, container, patch)"},{"line_number":313,"context_line":"        return Container.convert_with_links(container.as_dict())"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_5a3e62b9","line":310,"updated":"2017-01-13 05:26:02.000000000","message":"Its already there at line #304","commit_id":"ac9282010daf2caad73ebdcaeff74d52f59813fd"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"160bb39b2c28e8ee041e97f274b1ceda6a182efd","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        utils.validate_container_state(container, \u0027update\u0027)"},{"line_number":308,"context_line":"        if patch.get(\u0027memory\u0027):"},{"line_number":309,"context_line":"            patch[\u0027memory\u0027] \u003d str(patch[\u0027memory\u0027]) + \u0027M\u0027"},{"line_number":310,"context_line":"        context \u003d pecan.request.context"},{"line_number":311,"context_line":"        compute_api \u003d pecan.request.compute_api"},{"line_number":312,"context_line":"        container \u003d compute_api.container_update(context, container, patch)"},{"line_number":313,"context_line":"        return Container.convert_with_links(container.as_dict())"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_4fa83b20","line":310,"in_reply_to":"7a3c09a3_5a3e62b9","updated":"2017-01-13 20:09:36.000000000","message":"Will delete it.","commit_id":"ac9282010daf2caad73ebdcaeff74d52f59813fd"}],"zun/compute/manager.py":[{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"05570a6e319a8ea5ab720f4c9cf66e997c38b607","unresolved":false,"context_lines":[{"line_number":197,"context_line":"                  container\u003dcontainer)"},{"line_number":198,"context_line":"        try:"},{"line_number":199,"context_line":"            self._validate_container_state(container, \u0027pause\u0027)"},{"line_number":200,"context_line":"            container \u003d self.driver.pause(container)"},{"line_number":201,"context_line":"            container.save()"},{"line_number":202,"context_line":"            return container"},{"line_number":203,"context_line":"        except exception.DockerError as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_5a0d2d36","side":"PARENT","line":200,"updated":"2016-10-28 16:40:48.000000000","message":"@madhuri, Could you plz suggest why these lines have been removed?\nIf you delete these lines will there be PAUSED status in DB? asking just for curiosity","commit_id":"648aa26d55fa9194d8fa85729665ee575d1c7a2d"},{"author":{"_account_id":12407,"name":"Shubham Kumar Sharma","email":"shubham.git@gmail.com","username":"shubham.git"},"change_message_id":"0444d1d9fe00acb77b8788658fda3e56b5032915","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \u0027pause\u0027: [\u0027Running\u0027],"},{"line_number":37,"context_line":"    \u0027unpause\u0027: [\u0027Paused\u0027],"},{"line_number":38,"context_line":"    \u0027kill\u0027: [\u0027Running\u0027],"},{"line_number":39,"context_line":"    \u0027update\u0027: [\u0027Running\u0027, \u0027Stopped\u0027, \u0027Paused\u0027]"},{"line_number":40,"context_line":"}"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_555350e1","line":39,"updated":"2016-10-28 05:31:22.000000000","message":"I don\u0027t think that \u0027paused\u0027 is a valid state for updating container.","commit_id":"73ef839728fc10e9f9b5e8795570fc383e2c8fa6"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"05f8520aac0d233e163ce2b7952668418d9060ae","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \u0027pause\u0027: [\u0027Running\u0027],"},{"line_number":37,"context_line":"    \u0027unpause\u0027: [\u0027Paused\u0027],"},{"line_number":38,"context_line":"    \u0027kill\u0027: [\u0027Running\u0027],"},{"line_number":39,"context_line":"    \u0027update\u0027: [\u0027Running\u0027, \u0027Stopped\u0027, \u0027Paused\u0027]"},{"line_number":40,"context_line":"}"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_8ff666f7","line":39,"in_reply_to":"ba5da102_1ad45c1e","updated":"2016-11-01 14:33:15.000000000","message":"+1, i also tried to update cpu-share of paused container and paused containers was updated and unpaused successfully.","commit_id":"73ef839728fc10e9f9b5e8795570fc383e2c8fa6"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"05570a6e319a8ea5ab720f4c9cf66e997c38b607","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \u0027pause\u0027: [\u0027Running\u0027],"},{"line_number":37,"context_line":"    \u0027unpause\u0027: [\u0027Paused\u0027],"},{"line_number":38,"context_line":"    \u0027kill\u0027: [\u0027Running\u0027],"},{"line_number":39,"context_line":"    \u0027update\u0027: [\u0027Running\u0027, \u0027Stopped\u0027, \u0027Paused\u0027]"},{"line_number":40,"context_line":"}"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_9a36e5e5","line":39,"in_reply_to":"ba5da102_555350e1","updated":"2016-10-28 16:40:48.000000000","message":"It may be due to removal of lines 199 \u0026 200","commit_id":"73ef839728fc10e9f9b5e8795570fc383e2c8fa6"},{"author":{"_account_id":19370,"name":"Prithiv","email":"prithiv.mohan@intel.com","username":"prithiv"},"change_message_id":"da8f0fa23081eb492d3dda041232b0aecdbd8e42","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \u0027pause\u0027: [\u0027Running\u0027],"},{"line_number":37,"context_line":"    \u0027unpause\u0027: [\u0027Paused\u0027],"},{"line_number":38,"context_line":"    \u0027kill\u0027: [\u0027Running\u0027],"},{"line_number":39,"context_line":"    \u0027update\u0027: [\u0027Running\u0027, \u0027Stopped\u0027, \u0027Paused\u0027]"},{"line_number":40,"context_line":"}"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_1ad45c1e","line":39,"in_reply_to":"ba5da102_555350e1","updated":"2016-11-01 11:13:45.000000000","message":"Paused can be a valid state for updating the container. I dont see a reason why. Docker supports it","commit_id":"73ef839728fc10e9f9b5e8795570fc383e2c8fa6"},{"author":{"_account_id":12407,"name":"Shubham Kumar Sharma","email":"shubham.git@gmail.com","username":"shubham.git"},"change_message_id":"0444d1d9fe00acb77b8788658fda3e56b5032915","unresolved":false,"context_lines":[{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        LOG.debug(\u0027Updating a container...\u0027, container\u003dcontainer)"},{"line_number":286,"context_line":"        try:"},{"line_number":287,"context_line":"            self._validate_container_state(container, \u0027update\u0027)"},{"line_number":288,"context_line":"            self.driver.update(container, patch)"},{"line_number":289,"context_line":"            update()"},{"line_number":290,"context_line":"            return container"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_953c0895","line":287,"updated":"2016-10-28 05:31:22.000000000","message":"kernel_memory can be updated only on a stopper container. While this check will allow to update kernel_memory on running container as well.","commit_id":"73ef839728fc10e9f9b5e8795570fc383e2c8fa6"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"05570a6e319a8ea5ab720f4c9cf66e997c38b607","unresolved":false,"context_lines":[{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        LOG.debug(\u0027Updating a container...\u0027, container\u003dcontainer)"},{"line_number":286,"context_line":"        try:"},{"line_number":287,"context_line":"            self._validate_container_state(container, \u0027update\u0027)"},{"line_number":288,"context_line":"            self.driver.update(container, patch)"},{"line_number":289,"context_line":"            update()"},{"line_number":290,"context_line":"            return container"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5da102_0fc0d9df","line":287,"in_reply_to":"ba5da102_953c0895","updated":"2016-10-28 16:40:48.000000000","message":"+1 Shubham, below link also mentions the same\nhttps://docs.docker.com/engine/reference/commandline/update/","commit_id":"73ef839728fc10e9f9b5e8795570fc383e2c8fa6"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"be5fc3cc63d39662504e50988a2a5a0d2ad5a147","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        LOG.debug(\u0027Updating a container...\u0027, container\u003dcontainer)"},{"line_number":296,"context_line":"        try:"},{"line_number":297,"context_line":"            self._validate_container_state(container, \u0027update\u0027)"},{"line_number":298,"context_line":"            self.driver.update(container, patch)"},{"line_number":299,"context_line":"            update()"},{"line_number":300,"context_line":"            return container"},{"line_number":301,"context_line":"        except exception.DockerError as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_46d6a928","line":298,"range":{"start_line":298,"start_character":42,"end_line":298,"end_character":47},"updated":"2016-11-18 16:22:53.000000000","message":"@Madhuri,\n\nI think it will be difficult for each driver to depend on the format of \"patch\" . This requires each driver to understand the format of \"patch\" and deal with it accordingly, which is infeasible.\n\nPersonally, I recommend an alternative approach. In the update method, you can list all the attributes that are updatable instead. Then, read the *patch* to figure out which attributes need to update and call driver.update(..) to do the actual update.\n\n    class Driver:\n        def update(self, container, name\u003dNone, cpu\u003dNone, memory\u003dNone, ...)","commit_id":"31cb957e4525bdb7c2297fd4197fc9bc23cd4126"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"f903b51c2d7825aff0a641542f5e8368b432f431","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        LOG.debug(\u0027Updating a container...\u0027, container\u003dcontainer)"},{"line_number":296,"context_line":"        try:"},{"line_number":297,"context_line":"            self._validate_container_state(container, \u0027update\u0027)"},{"line_number":298,"context_line":"            self.driver.update(container, patch)"},{"line_number":299,"context_line":"            update()"},{"line_number":300,"context_line":"            return container"},{"line_number":301,"context_line":"        except exception.DockerError as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_5069d424","line":298,"range":{"start_line":298,"start_character":42,"end_line":298,"end_character":47},"in_reply_to":"7a77a97e_46d6a928","updated":"2016-11-21 09:32:09.000000000","message":"@Hongbin, the patch here is the dictionary containing the attribute to change and its value which I think should apply to all the drivers.\nAlso using your approach defined here, can we abstract the update method?\nDo you still think we need to define all the attributes in update method?","commit_id":"31cb957e4525bdb7c2297fd4197fc9bc23cd4126"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"9c5077d58c550c63bf835fab6e284375be402cef","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        LOG.debug(\u0027Updating a container...\u0027, container\u003dcontainer)"},{"line_number":296,"context_line":"        try:"},{"line_number":297,"context_line":"            self._validate_container_state(container, \u0027update\u0027)"},{"line_number":298,"context_line":"            self.driver.update(container, patch)"},{"line_number":299,"context_line":"            update()"},{"line_number":300,"context_line":"            return container"},{"line_number":301,"context_line":"        except exception.DockerError as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_f92e3df9","line":298,"range":{"start_line":298,"start_character":42,"end_line":298,"end_character":47},"in_reply_to":"7a77a97e_5069d424","updated":"2016-11-21 15:28:20.000000000","message":"@Madhuri,\n\nPersonally, I think define all attributes will make the interface more clear. However, we can discuss this with the team later. Right now, let\u0027s merge this patch first if you want.","commit_id":"31cb957e4525bdb7c2297fd4197fc9bc23cd4126"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"2b0fb9f47217e375e204a795b9bc22d706569f75","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        LOG.debug(\u0027Updating a container...\u0027, container\u003dcontainer)"},{"line_number":296,"context_line":"        try:"},{"line_number":297,"context_line":"            self._validate_container_state(container, \u0027update\u0027)"},{"line_number":298,"context_line":"            self.driver.update(container, patch)"},{"line_number":299,"context_line":"            update()"},{"line_number":300,"context_line":"            return container"},{"line_number":301,"context_line":"        except exception.DockerError as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_4b6d94cb","line":298,"range":{"start_line":298,"start_character":42,"end_line":298,"end_character":47},"in_reply_to":"7a77a97e_f92e3df9","updated":"2016-11-21 15:37:38.000000000","message":"@Madhuri,\n\nActually, the project is at an early stage so I don\u0027t think we need to worry about the details too much. Therefore, I am ok to merge this patch first (if there is no other objection) and refine the interface later.","commit_id":"31cb957e4525bdb7c2297fd4197fc9bc23cd4126"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"99019a00b04033b999cc5ad15f8559689c468b27","unresolved":false,"context_lines":[{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    @translate_exception"},{"line_number":332,"context_line":"    def container_update(self, context, container, patch):"},{"line_number":333,"context_line":"        def update():"},{"line_number":334,"context_line":"            # Update only the fields that have changed"},{"line_number":335,"context_line":"            for field in objects.Container.fields:"},{"line_number":336,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_ec63a73f","line":333,"updated":"2017-01-14 09:24:27.000000000","message":"Since we have restricted the USER through API about the set of inputs, i think here we can simply check for the fields in patch and set the object attribute if they are not equal. What do you think?","commit_id":"2c86aa8b37fb8b19c03bdfaae74ae894c989ec7f"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"ce6bec3ae94695d9372e45226910bfc4e4c3897d","unresolved":false,"context_lines":[{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    @translate_exception"},{"line_number":332,"context_line":"    def container_update(self, context, container, patch):"},{"line_number":333,"context_line":"        def update():"},{"line_number":334,"context_line":"            # Update only the fields that have changed"},{"line_number":335,"context_line":"            for field in objects.Container.fields:"},{"line_number":336,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_1062c1ad","line":333,"in_reply_to":"7a3c09a3_ec63a73f","updated":"2017-01-15 00:07:47.000000000","message":"Done","commit_id":"2c86aa8b37fb8b19c03bdfaae74ae894c989ec7f"}],"zun/container/docker/utils.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"4cd815e5b665e296ac230c698bbd6f239d38ed26","unresolved":false,"context_lines":[{"line_number":53,"context_line":"CONF \u003d cfg.CONF"},{"line_number":54,"context_line":"CONF.register_opts(docker_opts, \u0027docker\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"_allowed_update_attributes \u003d [\u0027blkio_weight\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027,"},{"line_number":57,"context_line":"                              \u0027cpu_shares\u0027, \u0027cpuset_cpus\u0027, \u0027cpuset_mems\u0027,"},{"line_number":58,"context_line":"                              \u0027mem_limit \u0027, \u0027mem_reservation\u0027,"},{"line_number":59,"context_line":"                              \u0027memswap_limit\u0027, \u0027restart_policy\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"def parse_docker_image(image):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_67b39598","line":59,"range":{"start_line":56,"start_character":30,"end_line":59,"end_character":63},"updated":"2016-11-03 16:56:34.000000000","message":"@Madhuri,\n\nI am not sure if it makes sense to allow users to update these attributes, since we currently don\u0027t allow to create a container by setting some of these attributes. I worry there will be confusions if users can update an attribute that is not in the \"Container\" object.\n\nRight now, users can create a container by specifying: name, image, command, cpu, memory, environmental variables, workdir, ports, hostname, labels. It seems to me that allowed_update_attributes can be chosen from the list above. What do you think?","commit_id":"1ae8e66ca5a1d8fa1ab0b93e1e897cd079438ea0"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"6a732432f42ec1f0063a3a284acc2cd7ee3c6898","unresolved":false,"context_lines":[{"line_number":53,"context_line":"CONF \u003d cfg.CONF"},{"line_number":54,"context_line":"CONF.register_opts(docker_opts, \u0027docker\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"_allowed_update_attributes \u003d [\u0027blkio_weight\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027,"},{"line_number":57,"context_line":"                              \u0027cpu_shares\u0027, \u0027cpuset_cpus\u0027, \u0027cpuset_mems\u0027,"},{"line_number":58,"context_line":"                              \u0027mem_limit \u0027, \u0027mem_reservation\u0027,"},{"line_number":59,"context_line":"                              \u0027memswap_limit\u0027, \u0027restart_policy\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"def parse_docker_image(image):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_c2d52fe5","line":59,"range":{"start_line":56,"start_character":30,"end_line":59,"end_character":63},"in_reply_to":"ba5da102_67b39598","updated":"2016-11-03 17:09:42.000000000","message":"+1, nice point @hongbin","commit_id":"1ae8e66ca5a1d8fa1ab0b93e1e897cd079438ea0"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"00604346336752453ca5adc8ed7bc01f86d9b9d0","unresolved":false,"context_lines":[{"line_number":53,"context_line":"CONF \u003d cfg.CONF"},{"line_number":54,"context_line":"CONF.register_opts(docker_opts, \u0027docker\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"_allowed_update_attributes \u003d [\u0027blkio_weight\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027,"},{"line_number":57,"context_line":"                              \u0027cpu_shares\u0027, \u0027cpuset_cpus\u0027, \u0027cpuset_mems\u0027,"},{"line_number":58,"context_line":"                              \u0027mem_limit \u0027, \u0027mem_reservation\u0027,"},{"line_number":59,"context_line":"                              \u0027memswap_limit\u0027, \u0027restart_policy\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"def parse_docker_image(image):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_9e29bdf5","line":59,"range":{"start_line":56,"start_character":30,"end_line":59,"end_character":63},"in_reply_to":"ba5da102_67b39598","updated":"2016-11-04 07:21:08.000000000","message":"@hongbin, Thank you for your input. But I have different opinion on it.\n\nI think zun should not block any users from doing any operation that one can do with the container runtime backend(which is docker currently). \nTo address your concern, I think we can add new API endpoint like /containers/{UUID}/inspect. This will return all the metadata associated with the container specific to the runtime. This will allow users to see the updated values.","commit_id":"1ae8e66ca5a1d8fa1ab0b93e1e897cd079438ea0"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"ffb4ebf0ea1e1ad400a9d7a6c49728560fd206de","unresolved":false,"context_lines":[{"line_number":53,"context_line":"CONF \u003d cfg.CONF"},{"line_number":54,"context_line":"CONF.register_opts(docker_opts, \u0027docker\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"_allowed_update_attributes \u003d [\u0027blkio_weight\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027,"},{"line_number":57,"context_line":"                              \u0027cpu_shares\u0027, \u0027cpuset_cpus\u0027, \u0027cpuset_mems\u0027,"},{"line_number":58,"context_line":"                              \u0027mem_limit \u0027, \u0027mem_reservation\u0027,"},{"line_number":59,"context_line":"                              \u0027memswap_limit\u0027, \u0027restart_policy\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"def parse_docker_image(image):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_9e1c4b6c","line":59,"range":{"start_line":56,"start_character":30,"end_line":59,"end_character":63},"in_reply_to":"ba5da102_7f9220f8","updated":"2016-11-04 15:06:29.000000000","message":"Good point. Maybe there should be a field called \"extra-opts\" that allows users to pass coe/runtime specific parameters? We can discuss that.","commit_id":"1ae8e66ca5a1d8fa1ab0b93e1e897cd079438ea0"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"bb6b38d90c349ecb76408841fe762418b8ac4b2c","unresolved":false,"context_lines":[{"line_number":53,"context_line":"CONF \u003d cfg.CONF"},{"line_number":54,"context_line":"CONF.register_opts(docker_opts, \u0027docker\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"_allowed_update_attributes \u003d [\u0027blkio_weight\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027,"},{"line_number":57,"context_line":"                              \u0027cpu_shares\u0027, \u0027cpuset_cpus\u0027, \u0027cpuset_mems\u0027,"},{"line_number":58,"context_line":"                              \u0027mem_limit \u0027, \u0027mem_reservation\u0027,"},{"line_number":59,"context_line":"                              \u0027memswap_limit\u0027, \u0027restart_policy\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"def parse_docker_image(image):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a77a97e_740a888b","line":59,"range":{"start_line":56,"start_character":30,"end_line":59,"end_character":63},"in_reply_to":"ba5da102_9e1c4b6c","updated":"2016-11-18 07:32:44.000000000","message":"Do you mean to say that we can store these params when updated in container db?","commit_id":"1ae8e66ca5a1d8fa1ab0b93e1e897cd079438ea0"},{"author":{"_account_id":19370,"name":"Prithiv","email":"prithiv.mohan@intel.com","username":"prithiv"},"change_message_id":"3c03972c5cb4662ca03cc4d0612a3e5748d1d68d","unresolved":false,"context_lines":[{"line_number":53,"context_line":"CONF \u003d cfg.CONF"},{"line_number":54,"context_line":"CONF.register_opts(docker_opts, \u0027docker\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"_allowed_update_attributes \u003d [\u0027blkio_weight\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027,"},{"line_number":57,"context_line":"                              \u0027cpu_shares\u0027, \u0027cpuset_cpus\u0027, \u0027cpuset_mems\u0027,"},{"line_number":58,"context_line":"                              \u0027mem_limit \u0027, \u0027mem_reservation\u0027,"},{"line_number":59,"context_line":"                              \u0027memswap_limit\u0027, \u0027restart_policy\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"def parse_docker_image(image):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_7f9220f8","line":59,"range":{"start_line":56,"start_character":30,"end_line":59,"end_character":63},"in_reply_to":"ba5da102_9e29bdf5","updated":"2016-11-04 10:27:43.000000000","message":"I agree. I would still say these are not required at this point of time. Also, we should agree on how the CPU pinning is going to be exposed. Is it going to be how docker does, by providing CPU Number or OpenStack way, letting the scheduler choose the CPU based on policy. Nevertheless, this would be too advanced for this stage. Also, it is supported only in Docker at this point of time, not on K8 or rocket. I suggest lets focus on generic features rather than features specific to one particular COE.","commit_id":"1ae8e66ca5a1d8fa1ab0b93e1e897cd079438ea0"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"ffb4ebf0ea1e1ad400a9d7a6c49728560fd206de","unresolved":false,"context_lines":[{"line_number":53,"context_line":"CONF \u003d cfg.CONF"},{"line_number":54,"context_line":"CONF.register_opts(docker_opts, \u0027docker\u0027)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"_allowed_update_attributes \u003d [\u0027blkio_weight\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027,"},{"line_number":57,"context_line":"                              \u0027cpu_shares\u0027, \u0027cpuset_cpus\u0027, \u0027cpuset_mems\u0027,"},{"line_number":58,"context_line":"                              \u0027mem_limit \u0027, \u0027mem_reservation\u0027,"},{"line_number":59,"context_line":"                              \u0027memswap_limit\u0027, \u0027restart_policy\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"def parse_docker_image(image):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_90227a00","line":59,"range":{"start_line":56,"start_character":30,"end_line":59,"end_character":63},"in_reply_to":"ba5da102_9e29bdf5","updated":"2016-11-04 15:06:29.000000000","message":"ok... seems to work.","commit_id":"1ae8e66ca5a1d8fa1ab0b93e1e897cd079438ea0"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"922043f0a0d8159b3d8ed7ff1ed90e8d7f7e3957","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"CONF \u003d zun.conf.CONF"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"_allowed_update_attributes \u003d [\u0027blkio_weight\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027,"},{"line_number":29,"context_line":"                              \u0027cpu_shares\u0027, \u0027cpuset_cpus\u0027, \u0027cpuset_mems\u0027,"},{"line_number":30,"context_line":"                              \u0027mem_limit\u0027, \u0027mem_reservation\u0027,"},{"line_number":31,"context_line":"                              \u0027memswap_limit\u0027, \u0027restart_policy\u0027]"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_15726e49","line":28,"range":{"start_line":28,"start_character":31,"end_line":28,"end_character":43},"updated":"2017-01-04 21:21:25.000000000","message":"This field is not in the container object in Zun, so I don\u0027t think it is a good idea to allow it to be updated.","commit_id":"a342563294f6713240bb6a279d06c9c6676a5ff6"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"922043f0a0d8159b3d8ed7ff1ed90e8d7f7e3957","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"CONF \u003d zun.conf.CONF"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"_allowed_update_attributes \u003d [\u0027blkio_weight\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027,"},{"line_number":29,"context_line":"                              \u0027cpu_shares\u0027, \u0027cpuset_cpus\u0027, \u0027cpuset_mems\u0027,"},{"line_number":30,"context_line":"                              \u0027mem_limit\u0027, \u0027mem_reservation\u0027,"},{"line_number":31,"context_line":"                              \u0027memswap_limit\u0027, \u0027restart_policy\u0027]"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_15c0ae29","line":29,"range":{"start_line":28,"start_character":46,"end_line":29,"end_character":72},"updated":"2017-01-04 21:21:25.000000000","message":"Zun container has a \u0027cpu\u0027 field. Perhaps, we should allow end-users to change the \u0027cpu\u0027 field instead? For example:\n\n  $ zun update --cpu\u003d0.1\n\nIn here, you could read the value of cpu and translate it to a docker command. It might result a command to update one or multiple cpu_* fields in docker container.","commit_id":"a342563294f6713240bb6a279d06c9c6676a5ff6"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"922043f0a0d8159b3d8ed7ff1ed90e8d7f7e3957","unresolved":false,"context_lines":[{"line_number":28,"context_line":"_allowed_update_attributes \u003d [\u0027blkio_weight\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027,"},{"line_number":29,"context_line":"                              \u0027cpu_shares\u0027, \u0027cpuset_cpus\u0027, \u0027cpuset_mems\u0027,"},{"line_number":30,"context_line":"                              \u0027mem_limit\u0027, \u0027mem_reservation\u0027,"},{"line_number":31,"context_line":"                              \u0027memswap_limit\u0027, \u0027restart_policy\u0027]"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def is_docker_library_version_atleast(version):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_352db2fe","line":31,"range":{"start_line":31,"start_character":48,"end_line":31,"end_character":62},"updated":"2017-01-04 21:21:25.000000000","message":"\u0027restart_policy\u0027 hasn\u0027t been added to Zun container yet. You might need to wait for this bug: https://bugs.launchpad.net/zun/+bug/1626699 .","commit_id":"a342563294f6713240bb6a279d06c9c6676a5ff6"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"922043f0a0d8159b3d8ed7ff1ed90e8d7f7e3957","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"_allowed_update_attributes \u003d [\u0027blkio_weight\u0027, \u0027cpu_period\u0027, \u0027cpu_quota\u0027,"},{"line_number":29,"context_line":"                              \u0027cpu_shares\u0027, \u0027cpuset_cpus\u0027, \u0027cpuset_mems\u0027,"},{"line_number":30,"context_line":"                              \u0027mem_limit\u0027, \u0027mem_reservation\u0027,"},{"line_number":31,"context_line":"                              \u0027memswap_limit\u0027, \u0027restart_policy\u0027]"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def is_docker_library_version_atleast(version):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_d5d0e6f8","line":31,"range":{"start_line":30,"start_character":30,"end_line":31,"end_character":45},"updated":"2017-01-04 21:21:25.000000000","message":"Ditto, there is a \u0027memory\u0027 field in Zun container object. It is better to allow end-users to update the \u0027memory\u0027 field instead.","commit_id":"a342563294f6713240bb6a279d06c9c6676a5ff6"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"7361a5ddc529b8dd97f61f86399807af1a7e8cd6","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        raise exception.DockerError(error_msg\u003dsix.text_type(e))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def validate_patch(container, patch):"},{"line_number":62,"context_line":"    for i in patch.keys():"},{"line_number":63,"context_line":"        if i not in _allowed_update_attributes:"},{"line_number":64,"context_line":"            msg \u003d (\"Cannot update attribute %s. The only allowed \""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_5a1d820e","line":61,"updated":"2017-01-13 05:26:02.000000000","message":"Can we move this validation to API layer through JSON schema validator?","commit_id":"ac9282010daf2caad73ebdcaeff74d52f59813fd"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"160bb39b2c28e8ee041e97f274b1ceda6a182efd","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        raise exception.DockerError(error_msg\u003dsix.text_type(e))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def validate_patch(container, patch):"},{"line_number":62,"context_line":"    for i in patch.keys():"},{"line_number":63,"context_line":"        if i not in _allowed_update_attributes:"},{"line_number":64,"context_line":"            msg \u003d (\"Cannot update attribute %s. The only allowed \""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_cf726be5","line":61,"in_reply_to":"7a3c09a3_5a1d820e","updated":"2017-01-13 20:09:36.000000000","message":"Sure. Will try that.","commit_id":"ac9282010daf2caad73ebdcaeff74d52f59813fd"}]}
