)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"e1e8de6db27d4bb97f5af32fb85dc6a0e53048ca","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"agent driver will download the image from glance into in-memory-folder"},{"line_number":10,"context_line":"first then run \u0027qemu-img\u0027 to \u0027copy\u0027 image to local harddisk, but if"},{"line_number":11,"context_line":"the RAM size is less than the converted image, will break the ipa"},{"line_number":12,"context_line":"deployments."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I5ed62a8936e996ffed60c811bd01d3be97f95547"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa1b9901_5ec73345","line":11,"updated":"2015-08-24 08:17:47.000000000","message":"I am not sure if this statement is correct.  We just need the amount of space to cache the compressed image in memory","commit_id":"38a3d9aadfdceea4c61715d3bbec8a5dc2ca93a6"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"88c68efdda550bbd7af3cd2fb4928f029c4dcf38","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"agent driver will download the image from glance into in-memory-folder"},{"line_number":10,"context_line":"first then run \u0027qemu-img\u0027 to \u0027copy\u0027 image to local harddisk, but if"},{"line_number":11,"context_line":"the RAM size is less than the converted image, will break the ipa"},{"line_number":12,"context_line":"deployments."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I5ed62a8936e996ffed60c811bd01d3be97f95547"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fa1b9901_c2958f40","line":11,"updated":"2015-08-24 15:22:27.000000000","message":"nit: s/ipa/IPA/","commit_id":"38a3d9aadfdceea4c61715d3bbec8a5dc2ca93a6"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"442b70396733fed9f706b305d626fdfad0735d8b","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Check image size before provisioning for agent driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"agent driver will download the image from glance into in-memory-folder"},{"line_number":10,"context_line":"first then run \u0027qemu-img\u0027 to \u0027copy\u0027 image to local harddisk, but if"},{"line_number":11,"context_line":"the RAM size is less than the (image size + reserved RAM size), will"},{"line_number":12,"context_line":"break the IPA deployments."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"da20952f_8b50d433","line":9,"updated":"2015-09-03 23:23:35.000000000","message":"Nit: s/agent driver/agent/","commit_id":"991b3a66576a6065b91a1f51ea9be90f0bc951f8"}],"ironic/drivers/modules/agent.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"380183a5725bd36b62b17589342c4a3ed802418a","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        the ram size."},{"line_number":254,"context_line":"    \"\"\""},{"line_number":255,"context_line":"    properties \u003d task.node.properties"},{"line_number":256,"context_line":"    memory_mb \u003d int(properties.get(\u0027memory_mb\u0027, 0))"},{"line_number":257,"context_line":"    image \u003d images.get_image_properties(task.context, image_source)"},{"line_number":258,"context_line":"    image_mb \u003d int(image.get(\u0027size\u0027, 0))"},{"line_number":259,"context_line":"    if image_mb \u003e memory_mb:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_ab49ba32","line":256,"updated":"2015-08-21 10:20:55.000000000","message":"We should skip check if \u0027memory_mb\u0027 is not defined.","commit_id":"5396b14e67d2c98ad4d31f02d9b7033fa7cd9a9e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"bc3dae50108e58dfee3800ef803a07c521318003","unresolved":false,"context_lines":[{"line_number":254,"context_line":"    \"\"\""},{"line_number":255,"context_line":"    properties \u003d task.node.properties"},{"line_number":256,"context_line":"    memory_mb \u003d int(properties.get(\u0027memory_mb\u0027, 0))"},{"line_number":257,"context_line":"    image \u003d images.get_image_properties(task.context, image_source)"},{"line_number":258,"context_line":"    image_mb \u003d int(image.get(\u0027size\u0027, 0))"},{"line_number":259,"context_line":"    if image_mb \u003e memory_mb:"},{"line_number":260,"context_line":"        msg \u003d (_(\u0027Memory size is too small for requested image. Image \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_5f5c5518","line":257,"updated":"2015-08-21 11:28:50.000000000","message":"You should use this function here: https://github.com/openstack/ironic/blob/master/ironic/common/images.py#L387-L390 Converted from Glance \"properties\" does not contain \"size\", \"image_mb\" l258 will be always 0.","commit_id":"5396b14e67d2c98ad4d31f02d9b7033fa7cd9a9e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"380183a5725bd36b62b17589342c4a3ed802418a","unresolved":false,"context_lines":[{"line_number":255,"context_line":"    properties \u003d task.node.properties"},{"line_number":256,"context_line":"    memory_mb \u003d int(properties.get(\u0027memory_mb\u0027, 0))"},{"line_number":257,"context_line":"    image \u003d images.get_image_properties(task.context, image_source)"},{"line_number":258,"context_line":"    image_mb \u003d int(image.get(\u0027size\u0027, 0))"},{"line_number":259,"context_line":"    if image_mb \u003e memory_mb:"},{"line_number":260,"context_line":"        msg \u003d (_(\u0027Memory size is too small for requested image. Image \u0027"},{"line_number":261,"context_line":"                 \u0027virtual size: %(image_mb)d MB, Memory size: \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_cbb2ee05","line":258,"updated":"2015-08-21 10:20:55.000000000","message":"\u0027size\u0027 returned in bytes here, not in mb.","commit_id":"5396b14e67d2c98ad4d31f02d9b7033fa7cd9a9e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"380183a5725bd36b62b17589342c4a3ed802418a","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    image_mb \u003d int(image.get(\u0027size\u0027, 0))"},{"line_number":259,"context_line":"    if image_mb \u003e memory_mb:"},{"line_number":260,"context_line":"        msg \u003d (_(\u0027Memory size is too small for requested image. Image \u0027"},{"line_number":261,"context_line":"                 \u0027virtual size: %(image_mb)d MB, Memory size: \u0027"},{"line_number":262,"context_line":"                 \u0027%(memory_mb)d MB\u0027)"},{"line_number":263,"context_line":"               % {\u0027image_mb\u0027: image_mb, \u0027memory_mb\u0027: memory_mb})"},{"line_number":264,"context_line":"        raise exception.InstanceDeployFailure(msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_4be6de44","line":261,"updated":"2015-08-21 10:20:55.000000000","message":"This is not a \"virtual\" size.","commit_id":"5396b14e67d2c98ad4d31f02d9b7033fa7cd9a9e"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"d33ff2ebf42b4c7259634c6a506a0502d4fa328c","unresolved":false,"context_lines":[{"line_number":261,"context_line":"                 \u0027virtual size: %(image_mb)d MB, Memory size: \u0027"},{"line_number":262,"context_line":"                 \u0027%(memory_mb)d MB\u0027)"},{"line_number":263,"context_line":"               % {\u0027image_mb\u0027: image_mb, \u0027memory_mb\u0027: memory_mb})"},{"line_number":264,"context_line":"        raise exception.InstanceDeployFailure(msg)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"class AgentDeploy(base.DeployInterface):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_9152f233","line":264,"updated":"2015-08-21 06:46:43.000000000","message":"I\u0027m not very sure if InstanceDeployFailure is the right exception to be thrown here as it\u0027s called in validate , rather than deploy. This can be invoked through node-validate also, may be InvalidParameterValue sounds more apt ( image_source here doesn\u0027t confine to the requirements )","commit_id":"5396b14e67d2c98ad4d31f02d9b7033fa7cd9a9e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"380183a5725bd36b62b17589342c4a3ed802418a","unresolved":false,"context_lines":[{"line_number":261,"context_line":"                 \u0027virtual size: %(image_mb)d MB, Memory size: \u0027"},{"line_number":262,"context_line":"                 \u0027%(memory_mb)d MB\u0027)"},{"line_number":263,"context_line":"               % {\u0027image_mb\u0027: image_mb, \u0027memory_mb\u0027: memory_mb})"},{"line_number":264,"context_line":"        raise exception.InstanceDeployFailure(msg)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"class AgentDeploy(base.DeployInterface):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_a4fc87b8","line":264,"in_reply_to":"fa1b9901_9152f233","updated":"2015-08-21 10:20:55.000000000","message":"+1 https://github.com/openstack/ironic/blob/master/ironic/conductor/manager.py#L719-L723","commit_id":"5396b14e67d2c98ad4d31f02d9b7033fa7cd9a9e"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"f151289d5a83979404ebad9bf2b8d7068ec1c36d","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        return"},{"line_number":259,"context_line":"    memory_size \u003d int(properties.get(\u0027memory_mb\u0027, 0)) * 1024 * 1024"},{"line_number":260,"context_line":"    image_size \u003d int(images.download_size(task.context, image_source))"},{"line_number":261,"context_line":"    if image_size \u003e memory_size:"},{"line_number":262,"context_line":"        msg \u003d (_(\u0027Memory size is too small for requested image. Image \u0027"},{"line_number":263,"context_line":"                 \u0027size: %(image_size)d bytes, Memory size: \u0027"},{"line_number":264,"context_line":"                 \u0027%(memory_size)d bytes.\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_7398306b","line":261,"updated":"2015-08-24 07:40:57.000000000","message":"Should we reserve some RAM, such 1G for IPA OS, else we still get image download error with space issue, and it is better that we can  configure such reserved ram size, make sense?","commit_id":"d47fab93e84183d08289bdff702cb31a4e6ddd02"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"e1e8de6db27d4bb97f5af32fb85dc6a0e53048ca","unresolved":false,"context_lines":[{"line_number":248,"context_line":"def check_image_size(task, image_source):"},{"line_number":249,"context_line":"    \"\"\"Check if the requested image is larger than the ram size."},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    :param task: a TaskManager instance containing the node to act on."},{"line_number":252,"context_line":"    :raises: InvalidParameterValue if size of the image is greater than"},{"line_number":253,"context_line":"        the ram size."},{"line_number":254,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_7ee6b7e9","line":251,"updated":"2015-08-24 08:17:47.000000000","message":"missing \n\n  :param image_source:","commit_id":"38a3d9aadfdceea4c61715d3bbec8a5dc2ca93a6"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"e1e8de6db27d4bb97f5af32fb85dc6a0e53048ca","unresolved":false,"context_lines":[{"line_number":255,"context_line":"    properties \u003d task.node.properties"},{"line_number":256,"context_line":"    # skip check if \u0027memory_mb\u0027 is not defined"},{"line_number":257,"context_line":"    if \u0027memory_mb\u0027 not in properties:"},{"line_number":258,"context_line":"        return"},{"line_number":259,"context_line":"    memory_size \u003d int(properties.get(\u0027memory_mb\u0027, 0)) * 1024 * 1024"},{"line_number":260,"context_line":"    image_size \u003d int(images.download_size(task.context, image_source))"},{"line_number":261,"context_line":"    if image_size \u003e memory_size:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_fe80878d","line":258,"updated":"2015-08-24 08:17:47.000000000","message":"Better to log a warning, a debug message at least.","commit_id":"38a3d9aadfdceea4c61715d3bbec8a5dc2ca93a6"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"8a19b2ec1ce3cc9fde06ede9b4ba608f31a89526","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    # skip check if \u0027memory_mb\u0027 is not defined"},{"line_number":257,"context_line":"    if \u0027memory_mb\u0027 not in properties:"},{"line_number":258,"context_line":"        return"},{"line_number":259,"context_line":"    memory_size \u003d int(properties.get(\u0027memory_mb\u0027, 0)) * 1024 * 1024"},{"line_number":260,"context_line":"    image_size \u003d int(images.download_size(task.context, image_source))"},{"line_number":261,"context_line":"    if image_size \u003e memory_size:"},{"line_number":262,"context_line":"        msg \u003d (_(\u0027Memory size is too small for requested image. Image \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_6eb5a27c","line":259,"updated":"2015-08-24 09:33:19.000000000","message":"nit: For readability \n\nfrom oslo_utils import units\n\nmemory_size \u003d int(properties.get(\u0027memory_mb\u0027, 0)) * units.Mi","commit_id":"38a3d9aadfdceea4c61715d3bbec8a5dc2ca93a6"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"d3ff09ca6b3b2c83f4f2e71b23ac062baae04627","unresolved":false,"context_lines":[{"line_number":257,"context_line":"    if \u0027memory_mb\u0027 not in properties:"},{"line_number":258,"context_line":"        return"},{"line_number":259,"context_line":"    memory_size \u003d int(properties.get(\u0027memory_mb\u0027, 0)) * 1024 * 1024"},{"line_number":260,"context_line":"    image_size \u003d int(images.download_size(task.context, image_source))"},{"line_number":261,"context_line":"    if image_size \u003e memory_size:"},{"line_number":262,"context_line":"        msg \u003d (_(\u0027Memory size is too small for requested image. Image \u0027"},{"line_number":263,"context_line":"                 \u0027size: %(image_size)d bytes, Memory size: \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_f3a9a025","line":260,"updated":"2015-08-24 07:45:31.000000000","message":"Not sure the type of image, if it is not raw format, we need to get the *real* size in raw level first.","commit_id":"38a3d9aadfdceea4c61715d3bbec8a5dc2ca93a6"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"e1e8de6db27d4bb97f5af32fb85dc6a0e53048ca","unresolved":false,"context_lines":[{"line_number":257,"context_line":"    if \u0027memory_mb\u0027 not in properties:"},{"line_number":258,"context_line":"        return"},{"line_number":259,"context_line":"    memory_size \u003d int(properties.get(\u0027memory_mb\u0027, 0)) * 1024 * 1024"},{"line_number":260,"context_line":"    image_size \u003d int(images.download_size(task.context, image_source))"},{"line_number":261,"context_line":"    if image_size \u003e memory_size:"},{"line_number":262,"context_line":"        msg \u003d (_(\u0027Memory size is too small for requested image. Image \u0027"},{"line_number":263,"context_line":"                 \u0027size: %(image_size)d bytes, Memory size: \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_de64a34a","line":260,"in_reply_to":"fa1b9901_f3a9a025","updated":"2015-08-24 08:17:47.000000000","message":"As discussed in IRC, I think in any case we just need to check the image size as raw/qcow2, we just cache the image in memory and just uncompress to disk.\n\nhttps://github.com/openstack/ironic-python-agent/blob/master/ironic_python_agent/shell/write_image.sh#L42","commit_id":"38a3d9aadfdceea4c61715d3bbec8a5dc2ca93a6"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"d3ff09ca6b3b2c83f4f2e71b23ac062baae04627","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        return"},{"line_number":259,"context_line":"    memory_size \u003d int(properties.get(\u0027memory_mb\u0027, 0)) * 1024 * 1024"},{"line_number":260,"context_line":"    image_size \u003d int(images.download_size(task.context, image_source))"},{"line_number":261,"context_line":"    if image_size \u003e memory_size:"},{"line_number":262,"context_line":"        msg \u003d (_(\u0027Memory size is too small for requested image. Image \u0027"},{"line_number":263,"context_line":"                 \u0027size: %(image_size)d bytes, Memory size: \u0027"},{"line_number":264,"context_line":"                 \u0027%(memory_size)d bytes.\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_13a77450","line":261,"updated":"2015-08-24 07:45:31.000000000","message":"Should we reserve some RAM, such 1G for IPA OS, else we still get image download error with space issue, and it is better that we can configure such reserved ram size, make sense?","commit_id":"38a3d9aadfdceea4c61715d3bbec8a5dc2ca93a6"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"e1e8de6db27d4bb97f5af32fb85dc6a0e53048ca","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        return"},{"line_number":259,"context_line":"    memory_size \u003d int(properties.get(\u0027memory_mb\u0027, 0)) * 1024 * 1024"},{"line_number":260,"context_line":"    image_size \u003d int(images.download_size(task.context, image_source))"},{"line_number":261,"context_line":"    if image_size \u003e memory_size:"},{"line_number":262,"context_line":"        msg \u003d (_(\u0027Memory size is too small for requested image. Image \u0027"},{"line_number":263,"context_line":"                 \u0027size: %(image_size)d bytes, Memory size: \u0027"},{"line_number":264,"context_line":"                 \u0027%(memory_size)d bytes.\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_9ed5cbba","line":261,"in_reply_to":"fa1b9901_13a77450","updated":"2015-08-24 08:17:47.000000000","message":"+1, a config option seems a good option for me\n\n  if image_size + CONF.agent.memory_consumed_by_agent \u003e memory_size:\n    \u003cerror\u003e\n\nThis should be our guess for memory consumed by agent ramdisk for a default ramdisk that we use in gate (say coreos agent ramdisk) and how much it needs for a successful compression of the image.","commit_id":"38a3d9aadfdceea4c61715d3bbec8a5dc2ca93a6"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"8a19b2ec1ce3cc9fde06ede9b4ba608f31a89526","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        return"},{"line_number":259,"context_line":"    memory_size \u003d int(properties.get(\u0027memory_mb\u0027, 0)) * 1024 * 1024"},{"line_number":260,"context_line":"    image_size \u003d int(images.download_size(task.context, image_source))"},{"line_number":261,"context_line":"    if image_size \u003e memory_size:"},{"line_number":262,"context_line":"        msg \u003d (_(\u0027Memory size is too small for requested image. Image \u0027"},{"line_number":263,"context_line":"                 \u0027size: %(image_size)d bytes, Memory size: \u0027"},{"line_number":264,"context_line":"                 \u0027%(memory_size)d bytes.\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa1b9901_aec65a14","line":261,"in_reply_to":"fa1b9901_9ed5cbba","updated":"2015-08-24 09:33:19.000000000","message":"+1\n\nIndeed the ramdisk itself will occupy part of the memory and +1 to be parameterized because depending on the tool you\u0027re using or base OS to build the ramdisk the size will vary","commit_id":"38a3d9aadfdceea4c61715d3bbec8a5dc2ca93a6"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"4cf7bb56c61754e18a029371a0facc72ecc331aa","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        LOG.debug(\u0027Skip the image size check as memory_mb is not defined.\u0027)"},{"line_number":176,"context_line":"        return"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    memory_size \u003d int(properties.get(\u0027memory_mb\u0027, 0)) * units.Mi"},{"line_number":179,"context_line":"    image_size \u003d int(images.download_size(task.context, image_source))"},{"line_number":180,"context_line":"    reserved_size \u003d int(CONF.agent.memory_consumed_by_agent) * units.Mi"},{"line_number":181,"context_line":"    if (image_size + reserved_size) \u003e memory_size:"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_26674d4e","line":178,"updated":"2015-08-31 11:43:07.000000000","message":"nit: default \"0\" not needed, we check that parameter is defined in l174.","commit_id":"af0d69d8b5ff57f29c6cd39b6db243d6f1deb0de"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"4cf7bb56c61754e18a029371a0facc72ecc331aa","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    memory_size \u003d int(properties.get(\u0027memory_mb\u0027, 0)) * units.Mi"},{"line_number":179,"context_line":"    image_size \u003d int(images.download_size(task.context, image_source))"},{"line_number":180,"context_line":"    reserved_size \u003d int(CONF.agent.memory_consumed_by_agent) * units.Mi"},{"line_number":181,"context_line":"    if (image_size + reserved_size) \u003e memory_size:"},{"line_number":182,"context_line":"        msg \u003d (_(\u0027Memory size is too small for requested image. Image \u0027"},{"line_number":183,"context_line":"                 \u0027size: %(image_size)d bytes, Memory size: \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_e6d395d3","line":180,"updated":"2015-08-31 11:43:07.000000000","message":"int() not needed, it is IntOpt.","commit_id":"af0d69d8b5ff57f29c6cd39b6db243d6f1deb0de"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"82d185aa5929e3fd3cb43d760bbb1e6c32811423","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    properties \u003d task.node.properties"},{"line_number":173,"context_line":"    # skip check if \u0027memory_mb\u0027 is not defined"},{"line_number":174,"context_line":"    if \u0027memory_mb\u0027 not in properties:"},{"line_number":175,"context_line":"        LOG.debug(\u0027Skip the image size check as memory_mb is not defined.\u0027)"},{"line_number":176,"context_line":"        return"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    memory_size \u003d int(properties.get(\u0027memory_mb\u0027)) * units.Mi"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_84d13e25","line":175,"updated":"2015-09-01 10:00:09.000000000","message":"Maybe mention that memory_mb is a property.","commit_id":"4b281b132eef50637f69eaf986288dd6668c31e4"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"82d185aa5929e3fd3cb43d760bbb1e6c32811423","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    reserved_size \u003d CONF.agent.memory_consumed_by_agent * units.Mi"},{"line_number":181,"context_line":"    if (image_size + reserved_size) \u003e memory_size:"},{"line_number":182,"context_line":"        msg \u003d (_(\u0027Memory size is too small for requested image. Image \u0027"},{"line_number":183,"context_line":"                 \u0027size: %(image_size)d bytes, Memory size: \u0027"},{"line_number":184,"context_line":"                 \u0027%(memory_size)d bytes, Reserved size: \u0027"},{"line_number":185,"context_line":"                 \u0027%(reserved_size)d bytes.\u0027)"},{"line_number":186,"context_line":"               % {\u0027image_size\u0027: image_size, \u0027memory_size\u0027: memory_size,"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_6452ea36","line":183,"updated":"2015-09-01 10:00:09.000000000","message":"Also would be nice to mention that memory_size should be \u003e image_size + reserved_size","commit_id":"4b281b132eef50637f69eaf986288dd6668c31e4"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"442b70396733fed9f706b305d626fdfad0735d8b","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       \u0027ramdisk.\u0027)),"},{"line_number":72,"context_line":"    cfg.IntOpt(\u0027memory_consumed_by_agent\u0027,"},{"line_number":73,"context_line":"               default\u003d512,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MB).\u0027)),"},{"line_number":75,"context_line":"]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_cb524c35","line":74,"updated":"2015-09-03 23:23:35.000000000","message":"Nit: s/MB/MiB","commit_id":"991b3a66576a6065b91a1f51ea9be90f0bc951f8"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"44783309521322b9a23c3d4676c9c3f03d9595dd","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       \u0027ramdisk.\u0027)),"},{"line_number":72,"context_line":"    cfg.IntOpt(\u0027memory_consumed_by_agent\u0027,"},{"line_number":73,"context_line":"               default\u003d512,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MiB).\u0027)),"},{"line_number":75,"context_line":"]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":9,"id":"da20952f_98295f3a","line":74,"updated":"2015-09-09 10:44:29.000000000","message":"Could you elaborate on this option? How is used supposed to know it?\n\nAlso for agent built with DIB, 512 is an unrealistic value.","commit_id":"855ffd70c857ee7741a94334566955a27c9ac39c"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"72dce63623afb6e45d9a938b41aca819749109ca","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       \u0027ramdisk.\u0027)),"},{"line_number":72,"context_line":"    cfg.IntOpt(\u0027memory_consumed_by_agent\u0027,"},{"line_number":73,"context_line":"               default\u003d512,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MiB).\u0027)),"},{"line_number":75,"context_line":"]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_5beacc10","line":74,"in_reply_to":"ba15a1d1_7d4c6870","updated":"2015-09-15 10:26:06.000000000","message":"+1 for Lucas last comment","commit_id":"855ffd70c857ee7741a94334566955a27c9ac39c"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9706f3f05c213ade1ce300d5e5bd1bf6462f6f05","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       \u0027ramdisk.\u0027)),"},{"line_number":72,"context_line":"    cfg.IntOpt(\u0027memory_consumed_by_agent\u0027,"},{"line_number":73,"context_line":"               default\u003d512,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MiB).\u0027)),"},{"line_number":75,"context_line":"]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_7d4c6870","line":74,"in_reply_to":"ba15a1d1_c6361503","updated":"2015-09-15 09:34:19.000000000","message":"++ for setting it to 0 and updating the docs to explain how one could enable that check if they wish to do so","commit_id":"855ffd70c857ee7741a94334566955a27c9ac39c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"513e3ff3000860460e28b85fc4afe951f30b77d9","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       \u0027ramdisk.\u0027)),"},{"line_number":72,"context_line":"    cfg.IntOpt(\u0027memory_consumed_by_agent\u0027,"},{"line_number":73,"context_line":"               default\u003d512,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MiB).\u0027)),"},{"line_number":75,"context_line":"]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":9,"id":"da20952f_2ced47b7","line":74,"in_reply_to":"da20952f_0681448f","updated":"2015-09-10 13:26:51.000000000","message":"thanks Yuriy for the explaination.","commit_id":"855ffd70c857ee7741a94334566955a27c9ac39c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"26caf01ab1c954762bf27ba8f913ca6dbbb5d0e9","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       \u0027ramdisk.\u0027)),"},{"line_number":72,"context_line":"    cfg.IntOpt(\u0027memory_consumed_by_agent\u0027,"},{"line_number":73,"context_line":"               default\u003d512,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MiB).\u0027)),"},{"line_number":75,"context_line":"]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":9,"id":"da20952f_912935f5","line":74,"in_reply_to":"da20952f_1b71c477","updated":"2015-09-09 13:57:20.000000000","message":"\u003e real consumed memory size by agent in the deployment\n\nthen it should be reported by the agent, a user has no chances of guessing it","commit_id":"855ffd70c857ee7741a94334566955a27c9ac39c"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9f695a68f9b3f0ac92ad91830b4a135517e4aef8","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       \u0027ramdisk.\u0027)),"},{"line_number":72,"context_line":"    cfg.IntOpt(\u0027memory_consumed_by_agent\u0027,"},{"line_number":73,"context_line":"               default\u003d512,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MiB).\u0027)),"},{"line_number":75,"context_line":"]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":9,"id":"da20952f_854c5877","line":74,"in_reply_to":"da20952f_2ced47b7","updated":"2015-09-10 16:53:22.000000000","message":"It\u0027s a though one.\n\nAFAIK, the IPA images we distribute that are generated with CoreOS requires at least 1G of RAM, the VMs in gate that test those images have 1G of RAM as per [1]\n\nSo, maybe 1024 should be the default here? It seems more realistic than 512\n\n[1] https://github.com/openstack-infra/project-config/blob/master/jenkins/jobs/devstack-gate.yaml#L719-L720","commit_id":"855ffd70c857ee7741a94334566955a27c9ac39c"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"c1ae38adab00ef82ab593f49e8a0984605d11797","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       \u0027ramdisk.\u0027)),"},{"line_number":72,"context_line":"    cfg.IntOpt(\u0027memory_consumed_by_agent\u0027,"},{"line_number":73,"context_line":"               default\u003d512,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MiB).\u0027)),"},{"line_number":75,"context_line":"]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":9,"id":"da20952f_853698b2","line":74,"in_reply_to":"da20952f_45f2c007","updated":"2015-09-10 16:57:08.000000000","message":"Me again...\n\nWhat about having this check disabled by default? (Say by setting it to \"-1\" or \"0\") and we can document how operators can enable such test if they wish to do so?\n\nFood for thought","commit_id":"855ffd70c857ee7741a94334566955a27c9ac39c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"eb175c4cd1759079032d88042872a7e8076d19cc","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       \u0027ramdisk.\u0027)),"},{"line_number":72,"context_line":"    cfg.IntOpt(\u0027memory_consumed_by_agent\u0027,"},{"line_number":73,"context_line":"               default\u003d512,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MiB).\u0027)),"},{"line_number":75,"context_line":"]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_c6361503","line":74,"in_reply_to":"da20952f_853698b2","updated":"2015-09-15 01:21:31.000000000","message":"thanks all for the comments, maybe we can set the default value to 0, I totally agree with Yuriy\u0027s point, this patch should not guarantee the deploy will not failed, it only checks cases when an image is very big.","commit_id":"855ffd70c857ee7741a94334566955a27c9ac39c"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"feb3f3f6a03d9686772f5739c8b8a6a14e7bd572","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       \u0027ramdisk.\u0027)),"},{"line_number":72,"context_line":"    cfg.IntOpt(\u0027memory_consumed_by_agent\u0027,"},{"line_number":73,"context_line":"               default\u003d512,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MiB).\u0027)),"},{"line_number":75,"context_line":"]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":9,"id":"da20952f_45f2c007","line":74,"in_reply_to":"da20952f_854c5877","updated":"2015-09-10 16:55:12.000000000","message":"Just another thought, we perhaps can\u0027t set it to 1024. Because that will break the gate? That will be the maximum supported and it will fail validation when deploying the ciros image.","commit_id":"855ffd70c857ee7741a94334566955a27c9ac39c"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"29e75df16d6d6b011810a761a0ebd2f02b1ebcf9","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       \u0027ramdisk.\u0027)),"},{"line_number":72,"context_line":"    cfg.IntOpt(\u0027memory_consumed_by_agent\u0027,"},{"line_number":73,"context_line":"               default\u003d512,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MiB).\u0027)),"},{"line_number":75,"context_line":"]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":9,"id":"da20952f_0681448f","line":74,"in_reply_to":"da20952f_912935f5","updated":"2015-09-10 09:13:41.000000000","message":"@Dmitry, \u003e real consumed memory size by agent in the deployment - we can measure this value only during deploy, and it\u0027s not constant in the time. IMO this patch should not guarantee that deploy will not failed, it only checks cases when an image is very big, and does this during validate. Default for config value above should be minimal.","commit_id":"855ffd70c857ee7741a94334566955a27c9ac39c"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"993e73290f6010ea0d8723137df3a23e2c3f5434","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       \u0027ramdisk.\u0027)),"},{"line_number":72,"context_line":"    cfg.IntOpt(\u0027memory_consumed_by_agent\u0027,"},{"line_number":73,"context_line":"               default\u003d512,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MiB).\u0027)),"},{"line_number":75,"context_line":"]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":9,"id":"da20952f_1b71c477","line":74,"in_reply_to":"da20952f_98295f3a","updated":"2015-09-09 13:14:00.000000000","message":"yeah, this option should be set according to the real consumed memory size by agent in the deployment. 512 is just a default value, if use DIB, admin should reset it to a proper value.","commit_id":"855ffd70c857ee7741a94334566955a27c9ac39c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d2d76f24a4b4265c3a6cae2f16db9db3f8934939","unresolved":false,"context_lines":[{"line_number":73,"context_line":"               default\u003d0,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MiB), default is \u0027"},{"line_number":75,"context_line":"                      \u00270, you can set this according to your IPA image, if \u0027"},{"line_number":76,"context_line":"                      \u0027you want to enable the check for consumed memory.\u0027)),"},{"line_number":77,"context_line":"]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba15a1d1_9ae6ecb2","line":76,"updated":"2015-09-16 10:07:49.000000000","message":"This comment is confusing. This option does not enable/disable check for consumed memory. You still have image_size \u003e memory_size condition active if this is set to 0, you just don\u0027t account for agent size.","commit_id":"218ffb644e0eafb4cd068612026c43b2f82d3c55"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"210f6ae0d387c5ec74a277753db2d428b896836f","unresolved":false,"context_lines":[{"line_number":73,"context_line":"               default\u003d0,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MiB), default is \u0027"},{"line_number":75,"context_line":"                      \u00270, you can set this according to your IPA image, if \u0027"},{"line_number":76,"context_line":"                      \u0027you want to enable the check for consumed memory.\u0027)),"},{"line_number":77,"context_line":"]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba15a1d1_28ae7b98","line":76,"in_reply_to":"ba15a1d1_9ae6ecb2","updated":"2015-09-16 10:21:26.000000000","message":"thanks Dmitry, maybe I should specify the check is for memory consumed by agent.","commit_id":"218ffb644e0eafb4cd068612026c43b2f82d3c55"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"dabe1a3d933e36d27c8ce247e47754df25ce5ccf","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                       \u0027ramdisk.\u0027)),"},{"line_number":72,"context_line":"    cfg.IntOpt(\u0027memory_consumed_by_agent\u0027,"},{"line_number":73,"context_line":"               default\u003d0,"},{"line_number":74,"context_line":"               help\u003d_(\u0027The memory size consumed by agent (MiB), default is \u0027"},{"line_number":75,"context_line":"                      \u00270, you can set this according to your IPA image, if \u0027"},{"line_number":76,"context_line":"                      \u0027you want to enable the check for memory consumed by \u0027"},{"line_number":77,"context_line":"                      \u0027agent.\u0027)),"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_713e9a8d","line":74,"updated":"2015-09-16 11:15:01.000000000","message":"May be a little more information and splitting into different sentence. Just my suggestion. Feel free to edit it.\n\n  The memory size in MiB consumed by agent when it is booted on a\n  bare metal node.  This is used for checking if the image can \n  be downloaded and deployed on the bare metal node after booting \n  agent ramdisk.  This may be set according to  the memory \n  consumed by your agent ramdisk image.","commit_id":"9faad2cb917ba9cad038ef068ac221b1e7703b17"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"dabe1a3d933e36d27c8ce247e47754df25ce5ccf","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    properties \u003d task.node.properties"},{"line_number":176,"context_line":"    # skip check if \u0027memory_mb\u0027 is not defined"},{"line_number":177,"context_line":"    if \u0027memory_mb\u0027 not in properties:"},{"line_number":178,"context_line":"        LOG.debug(\u0027Skip the image size check as memory_mb is not defined \u0027"},{"line_number":179,"context_line":"                  \u0027in properties.\u0027)"},{"line_number":180,"context_line":"        return"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_ce0ee73a","line":178,"updated":"2015-09-16 11:15:01.000000000","message":"Can we log the node uuid here.  Shouldn\u0027t this be a warning or at least an info because IPA today anyway can\u0027t deploy if image size  \u003e memory available.","commit_id":"9faad2cb917ba9cad038ef068ac221b1e7703b17"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"dabe1a3d933e36d27c8ce247e47754df25ce5ccf","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                 \u0027the IPA deployments. Image size: %(image_size)d bytes, \u0027"},{"line_number":189,"context_line":"                 \u0027Memory size: %(memory_size)d bytes, Reserved size: \u0027"},{"line_number":190,"context_line":"                 \u0027%(reserved_size)d bytes.\u0027)"},{"line_number":191,"context_line":"               % {\u0027image_size\u0027: image_size, \u0027memory_size\u0027: memory_size,"},{"line_number":192,"context_line":"                  \u0027reserved_size\u0027: reserved_size})"},{"line_number":193,"context_line":"        raise exception.InvalidParameterValue(msg)"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_0e105f58","line":191,"updated":"2015-09-16 11:15:01.000000000","message":"Can we log this in MiB please. It should be more readable.","commit_id":"9faad2cb917ba9cad038ef068ac221b1e7703b17"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"94dfbaae21369f60ef89d38d42db148550512d86","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        contain the required information for this driver to deploy images to"},{"line_number":211,"context_line":"        the node."},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        :param task: a TaskManager instance"},{"line_number":214,"context_line":"        :raises: MissingParameterValue"},{"line_number":215,"context_line":"        \"\"\""},{"line_number":216,"context_line":"        if CONF.agent.manage_agent_boot:"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_fc94c143","line":213,"updated":"2015-09-16 11:41:40.000000000","message":"InvalidParameterValue too","commit_id":"9faad2cb917ba9cad038ef068ac221b1e7703b17"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e0580862c82324e8565ca439798b087986ac6710","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                      \u0027checking if the image can be downloaded and deployed \u0027"},{"line_number":78,"context_line":"                      \u0027on the bare metal node after booting agent ramdisk. \u0027"},{"line_number":79,"context_line":"                      \u0027This may be set according to the memory consumed by \u0027"},{"line_number":80,"context_line":"                      \u0027your agent ramdisk image.\u0027)),"},{"line_number":81,"context_line":"]"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba15a1d1_8bb3b609","line":80,"updated":"2015-09-17 16:28:51.000000000","message":"(just fix if it happens to you to submit a new patch-set)\n\ns/your/the\n\nI find it odd to say \"your\" for such things. Maybe it\u0027s only me, I don\u0027t know.","commit_id":"cd2cc9e1dfc50954cada2fbdc97e6f1fa3b6b73e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"5aee03229e8d9457c26429eecc1e0d15a9a8614c","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    \"\"\""},{"line_number":178,"context_line":"    properties \u003d task.node.properties"},{"line_number":179,"context_line":"    # skip check if \u0027memory_mb\u0027 is not defined"},{"line_number":180,"context_line":"    if \u0027memory_mb\u0027 not in properties:"},{"line_number":181,"context_line":"        LOG.warning(_LW(\u0027Skip the image size check as memory_mb is not \u0027"},{"line_number":182,"context_line":"                        \u0027defined in properties on node %s.\u0027), task.node.uuid)"},{"line_number":183,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba15a1d1_80029ab2","line":180,"updated":"2015-09-18 07:55:56.000000000","message":"This case is not covered by unit test.","commit_id":"cd2cc9e1dfc50954cada2fbdc97e6f1fa3b6b73e"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"bceb921c6f6a3a9dbe064c18fc6324a8f2830a59","unresolved":false,"context_lines":[{"line_number":178,"context_line":"    properties \u003d task.node.properties"},{"line_number":179,"context_line":"    # skip check if \u0027memory_mb\u0027 is not defined"},{"line_number":180,"context_line":"    if \u0027memory_mb\u0027 not in properties:"},{"line_number":181,"context_line":"        LOG.warning(_LW(\u0027Skip the image size check as memory_mb is not \u0027"},{"line_number":182,"context_line":"                        \u0027defined in properties on node %s.\u0027), task.node.uuid)"},{"line_number":183,"context_line":"        return"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"ba15a1d1_a4a1e495","line":181,"updated":"2015-09-18 14:41:29.000000000","message":"Nit: s/skip/skipping/","commit_id":"a715e3dcf94af4cd94ba5a51b745d411bc473182"}],"ironic/tests/drivers/test_agent.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"82d185aa5929e3fd3cb43d760bbb1e6c32811423","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    @mock.patch.object(images, \u0027download_size\u0027, autospec\u003dTrue)"},{"line_number":224,"context_line":"    def test_check_image_size_fail(self, size_mock):"},{"line_number":225,"context_line":"        size_mock.return_value \u003d 102400000"},{"line_number":226,"context_line":"        with task_manager.acquire(self.context, self.node.uuid,"},{"line_number":227,"context_line":"                                  shared\u003dFalse) as task:"},{"line_number":228,"context_line":"            task.node.properties[\u0027memory_mb\u0027] \u003d 10"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_e4e91a80","line":225,"updated":"2015-09-01 10:00:09.000000000","message":"Maybe change this test a bit (or add a new one) so that only image size + memory for agent \u003e memory_mb, while image size \u003c memory mb","commit_id":"4b281b132eef50637f69eaf986288dd6668c31e4"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"342435c8b5c8c5c80d7b0a1773b03b1e4c28f864","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            pxe_boot_validate_mock.assert_called_once_with("},{"line_number":212,"context_line":"                task.driver.boot, task)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    @mock.patch.object(images, \u0027download_size\u0027, autospec\u003dTrue)"},{"line_number":215,"context_line":"    def test_check_image_size(self, size_mock):"},{"line_number":216,"context_line":"        size_mock.return_value \u003d 1024000"},{"line_number":217,"context_line":"        with task_manager.acquire(self.context, self.node.uuid,"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_1554031f","line":214,"updated":"2015-09-03 12:43:33.000000000","message":"Please move these two new tests to class TestAgentMethods.","commit_id":"991b3a66576a6065b91a1f51ea9be90f0bc951f8"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"dabe1a3d933e36d27c8ce247e47754df25ce5ccf","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                              agent.check_image_size,"},{"line_number":160,"context_line":"                              task, \u0027fake-image\u0027)"},{"line_number":161,"context_line":"            size_mock.assert_called_once_with(self.context, \u0027fake-image\u0027)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"class TestAgentDeploy(db_base.DbTestCase):"},{"line_number":165,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_717bfa8c","line":162,"updated":"2015-09-16 11:15:01.000000000","message":"Just one more test case possible when task.node.properties[\u0027memory_mb\u0027] is not set.","commit_id":"9faad2cb917ba9cad038ef068ac221b1e7703b17"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"de8da0d5f9f065a33fe3f596c5aa941e7815fd5d","unresolved":false,"context_lines":[{"line_number":148,"context_line":"            size_mock.assert_called_once_with(self.context, \u0027fake-image\u0027)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    @mock.patch.object(images, \u0027download_size\u0027, autospec\u003dTrue)"},{"line_number":151,"context_line":"    def test_check_image_size_fail(self, size_mock):"},{"line_number":152,"context_line":"        size_mock.return_value \u003d 11 * 1024 * 1024"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        mgr_utils.mock_the_extension_manager(driver\u003d\u0027fake_agent\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba15a1d1_a0b31e4c","line":151,"updated":"2015-09-18 07:51:12.000000000","message":"Makes sense also add test that \"memory_consumed_by_agent\" config parameter works as expected (download_size 9, memory_mb 10, memory_consumed_by_agent 2 for example).","commit_id":"cd2cc9e1dfc50954cada2fbdc97e6f1fa3b6b73e"}]}
