)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"04b87012b7caadea052e54b0e3fecf2fffaa4c30","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently _ensure_config_dirs_exist creates tftpboot/\u003cuuid\u003e dir"},{"line_number":10,"context_line":"with wrong permission. This is due to the system umask setting which"},{"line_number":11,"context_line":"overrides the default permission of 0777 to 0755 or 0750. When the"},{"line_number":12,"context_line":"permission is 0750, BM can\u0027t get deploy_kernel and ramdisk from"},{"line_number":13,"context_line":"tftpserver. So this patch tries to fix the issue by passing the"},{"line_number":14,"context_line":"the mode 0755 to fileutils.ensure_tree."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a430d35_51a54b02","line":11,"range":{"start_line":11,"start_character":14,"end_line":11,"end_character":32},"updated":"2017-02-03 21:18:33.000000000","message":"nit: More so the expected permissions of tftp.","commit_id":"89d3047be5fd70835c995d7e80001a3a976b14ae"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"9bd43144a7f4844c3236b82ea6142a4f07d17083","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Currently _ensure_config_dirs_exist creates tftpboot/\u003cuuid\u003e dir"},{"line_number":10,"context_line":"with wrong permission. This is due to the system umask setting which"},{"line_number":11,"context_line":"overrides the default permission of 0777 to 0755 or 0750. When the"},{"line_number":12,"context_line":"permission is 0750, BM can\u0027t get deploy_kernel and ramdisk from"},{"line_number":13,"context_line":"tftpserver. So this patch tries to fix the issue by passing the"},{"line_number":14,"context_line":"the mode 0755 to fileutils.ensure_tree."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a430d35_bc2f36a0","line":12,"updated":"2017-02-03 14:35:39.000000000","message":"This may happen only when tftp process is launched from other user than root and as result can\u0027t read files created by Ironic (on CI we do not experiencing this problem, because tftp is launched from root.) Please mention this in commit message.","commit_id":"89d3047be5fd70835c995d7e80001a3a976b14ae"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"04b87012b7caadea052e54b0e3fecf2fffaa4c30","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Currently _ensure_config_dirs_exist creates tftpboot/\u003cuuid\u003e dir"},{"line_number":10,"context_line":"with wrong permission. This is due to the system umask setting which"},{"line_number":11,"context_line":"overrides the default permission of 0777 to 0755 or 0750. When the"},{"line_number":12,"context_line":"permission is 0750, BM can\u0027t get deploy_kernel and ramdisk from"},{"line_number":13,"context_line":"tftpserver. So this patch tries to fix the issue by passing the"},{"line_number":14,"context_line":"the mode 0755 to fileutils.ensure_tree."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a430d35_f15f170c","line":12,"in_reply_to":"1a430d35_bc2f36a0","updated":"2017-02-03 21:18:33.000000000","message":"In most cases, it must be launched as root and then it can mask it\u0027s self over to another user id, but still the reliance upon umask... which can vary... is problematic.  I think this is good as-is","commit_id":"89d3047be5fd70835c995d7e80001a3a976b14ae"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"9bd43144a7f4844c3236b82ea6142a4f07d17083","unresolved":false,"context_lines":[{"line_number":14,"context_line":"the mode 0755 to fileutils.ensure_tree."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I3119ec7ae31bf82f716bf082fa4c3296d6aa3587"},{"line_number":17,"context_line":"Closes-bug: #1655568"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a430d35_9f650ce3","line":17,"updated":"2017-02-03 14:35:39.000000000","message":"Since it fixes we should have a release notes with fixes section here.","commit_id":"89d3047be5fd70835c995d7e80001a3a976b14ae"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"cae8adbddcd26b980ecc956e002472d8238f92a6","unresolved":false,"context_lines":[{"line_number":14,"context_line":"the mode 0755 to fileutils.ensure_tree."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I3119ec7ae31bf82f716bf082fa4c3296d6aa3587"},{"line_number":17,"context_line":"Closes-bug: #1655568"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a430d35_0fb0d342","line":17,"in_reply_to":"1a430d35_717327b2","updated":"2017-02-06 10:18:46.000000000","message":"ops, indeed","commit_id":"89d3047be5fd70835c995d7e80001a3a976b14ae"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"04b87012b7caadea052e54b0e3fecf2fffaa4c30","unresolved":false,"context_lines":[{"line_number":14,"context_line":"the mode 0755 to fileutils.ensure_tree."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I3119ec7ae31bf82f716bf082fa4c3296d6aa3587"},{"line_number":17,"context_line":"Closes-bug: #1655568"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a430d35_717327b2","line":17,"in_reply_to":"1a430d35_9f650ce3","updated":"2017-02-03 21:18:33.000000000","message":"+1","commit_id":"89d3047be5fd70835c995d7e80001a3a976b14ae"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"60a4fd34a37d3114221f08f47e05c12ee433fcd3","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Madhuri Kumari \u003cmadhuri.rai07@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-02-15 07:04:13 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix directories permission"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently _ensure_config_dirs_exist creates tftpboot/\u003cuuid\u003e dir"},{"line_number":10,"context_line":"with wrong permission. This is due to the system umask setting which"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"fa31d9ce_41985b1c","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":26},"updated":"2017-02-15 15:36:07.000000000","message":"If you say that it happens only in case of tftp launching process, then the commit message should be updated to be more explicit\nHow about \u0027Fix directory permissions for tftpboot\u0027 ?","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"58acc8ed25cd8b6fc4cc1bbcfd5b57e64056010b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Madhuri Kumari \u003cmadhuri.rai07@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-02-15 07:04:13 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix directories permission"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently _ensure_config_dirs_exist creates tftpboot/\u003cuuid\u003e dir"},{"line_number":10,"context_line":"with wrong permission. This is due to the system umask setting which"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"fa31d9ce_b85e7b10","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":26},"in_reply_to":"fa31d9ce_41985b1c","updated":"2017-02-16 14:07:19.000000000","message":"+1","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"e0b97036016b7e1f07c793282cc9dbb3f75b3550","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix directories permission"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently _ensure_config_dirs_exist creates tftpboot/\u003cuuid\u003e dir"},{"line_number":10,"context_line":"with wrong permission. This is due to the system umask setting which"},{"line_number":11,"context_line":"overrides the default permission of 0777 to 0755 or 0750. When the"},{"line_number":12,"context_line":"permission is 0750, BM can\u0027t get deploy_kernel and ramdisk from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"fa31d9ce_a048ea88","line":9,"range":{"start_line":9,"start_character":10,"end_line":9,"end_character":35},"updated":"2017-02-17 00:18:04.000000000","message":"nit: s/_ensure_config_dirs_exist/method \"_ensure_config_dirs_exist\" or something different that tells what is this clearly. Right now can\u0027t tell if this is a config option or a method.","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"45eb41f44cd8c2da44c12f729aa7d9f3864a71ba","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix directories permission"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently _ensure_config_dirs_exist creates tftpboot/\u003cuuid\u003e dir"},{"line_number":10,"context_line":"with wrong permission. This is due to the system umask setting which"},{"line_number":11,"context_line":"overrides the default permission of 0777 to 0755 or 0750. When the"},{"line_number":12,"context_line":"permission is 0750, BM can\u0027t get deploy_kernel and ramdisk from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da36d5c6_1cc37339","line":9,"range":{"start_line":9,"start_character":10,"end_line":9,"end_character":35},"in_reply_to":"fa31d9ce_a048ea88","updated":"2017-02-23 07:19:05.000000000","message":"Done","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"60a4fd34a37d3114221f08f47e05c12ee433fcd3","unresolved":false,"context_lines":[{"line_number":13,"context_line":"tftpserver. This may happen only when tftp process is launched from"},{"line_number":14,"context_line":"other user than root and as result can\u0027t read files created by Ironic."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"So this patch tries to fix the issue by explicitly changing the"},{"line_number":17,"context_line":"permissions."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I3119ec7ae31bf82f716bf082fa4c3296d6aa3587"},{"line_number":20,"context_line":"Closes-bug: #1655568"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"fa31d9ce_1cfeccad","line":17,"range":{"start_line":16,"start_character":0,"end_line":17,"end_character":12},"updated":"2017-02-15 15:36:07.000000000","message":"nit:Moreover, I do not really like granting permissions to everyone (may cause some security issues). WDYT about assigning a correct group as owner to this directory and/or adding user to the correct group as it was suggested by Julia and Vasyl?","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"58acc8ed25cd8b6fc4cc1bbcfd5b57e64056010b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"tftpserver. This may happen only when tftp process is launched from"},{"line_number":14,"context_line":"other user than root and as result can\u0027t read files created by Ironic."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"So this patch tries to fix the issue by explicitly changing the"},{"line_number":17,"context_line":"permissions."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I3119ec7ae31bf82f716bf082fa4c3296d6aa3587"},{"line_number":20,"context_line":"Closes-bug: #1655568"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"fa31d9ce_584adf28","line":17,"range":{"start_line":16,"start_character":0,"end_line":17,"end_character":12},"in_reply_to":"fa31d9ce_1cfeccad","updated":"2017-02-16 14:07:19.000000000","message":"I\u0027m not sure we can make an assumption like that.  A file should be created with the primary group of the creator.  I think providing the ability for ironic to change file/group permissions begins to become a security issue as we would have to grant ironic privileges to do so, and the path can differ based on configuration.  I\u0027m much more a fan of allowing umask to normally do it\u0027s job, and if necessary allowing an operator to explicitly define the permissions they need to make ironic operate with-in their security context.","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"cfc140b84c81fff5bb2be17b1245cd0d65c168a1","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix directories permission for tftpboot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently method \"_ensure_config_dirs_exist\" creates tftpboot/\u003cuuid\u003e dir"},{"line_number":10,"context_line":"with wrong permission. This is due to the system umask setting which"},{"line_number":11,"context_line":"overrides the default permission of 0777 to 0755 or 0750. When the"},{"line_number":12,"context_line":"permission is 0750, BM can\u0027t get deploy_kernel and ramdisk from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"ba2be162_e5f6fff7","line":9,"updated":"2017-03-03 04:29:29.000000000","message":"Line \u003e70 characters.","commit_id":"43ed0bbbd2216f6a4c631c2ae78b459fc38e6dd4"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"665beba806a944048d1aefe3055109e48fef727e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix directories permission for tftpboot"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently method \"_ensure_config_dirs_exist\" creates tftpboot/\u003cuuid\u003e dir"},{"line_number":10,"context_line":"with wrong permission. This is due to the system umask setting which"},{"line_number":11,"context_line":"overrides the default permission of 0777 to 0755 or 0750. When the"},{"line_number":12,"context_line":"permission is 0750, BM can\u0027t get deploy_kernel and ramdisk from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"ff0f0b1f_f145aa44","line":9,"in_reply_to":"ba2be162_e5f6fff7","updated":"2017-05-19 04:55:31.000000000","message":"Done","commit_id":"43ed0bbbd2216f6a4c631c2ae78b459fc38e6dd4"}],"etc/ironic/ironic.conf.sample":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"277358b8a338439ba08f5edd1d90e085091f4213","unresolved":false,"context_lines":[{"line_number":3137,"context_line":"#tftp_master_path \u003d /tftpboot/master_images"},{"line_number":3138,"context_line":""},{"line_number":3139,"context_line":""},{"line_number":3140,"context_line":"# The permission for the tftp boot directories to be created with"},{"line_number":3141,"context_line":"#dir_permission \u003d 0o755"},{"line_number":3142,"context_line":""},{"line_number":3143,"context_line":"# Bootfile DHCP parameter. (string value)"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"fa31d9ce_3b2448c5","line":3140,"updated":"2017-02-16 14:00:36.000000000","message":"This string does not match the string entered in conf/pxe.py.  `tox -egenconfig` will regenerate the sample config that you can then submit with your change.","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"e0b97036016b7e1f07c793282cc9dbb3f75b3550","unresolved":false,"context_lines":[{"line_number":3137,"context_line":"#tftp_master_path \u003d /tftpboot/master_images"},{"line_number":3138,"context_line":""},{"line_number":3139,"context_line":""},{"line_number":3140,"context_line":"# The permission for the tftp boot directories to be created with"},{"line_number":3141,"context_line":"#dir_permission \u003d 0o755"},{"line_number":3142,"context_line":""},{"line_number":3143,"context_line":"# Bootfile DHCP parameter. (string value)"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"fa31d9ce_e6e4c2ad","line":3140,"in_reply_to":"fa31d9ce_3b2448c5","updated":"2017-02-17 00:18:04.000000000","message":"+1","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"45eb41f44cd8c2da44c12f729aa7d9f3864a71ba","unresolved":false,"context_lines":[{"line_number":3137,"context_line":"#tftp_master_path \u003d /tftpboot/master_images"},{"line_number":3138,"context_line":""},{"line_number":3139,"context_line":""},{"line_number":3140,"context_line":"# The permission for the tftp boot directories to be created with"},{"line_number":3141,"context_line":"#dir_permission \u003d 0o755"},{"line_number":3142,"context_line":""},{"line_number":3143,"context_line":"# Bootfile DHCP parameter. (string value)"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"da36d5c6_9cae837f","line":3140,"in_reply_to":"fa31d9ce_e6e4c2ad","updated":"2017-02-23 07:19:05.000000000","message":"Done","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"610f752c1611f58db194958d16f303c9a1f9cb29","unresolved":false,"context_lines":[{"line_number":3257,"context_line":"# caching. (string value)"},{"line_number":3258,"context_line":"#tftp_master_path \u003d /tftpboot/master_images"},{"line_number":3259,"context_line":""},{"line_number":3260,"context_line":"# The permission of tftp boot directories to be created with."},{"line_number":3261,"context_line":"# This should be set to the permission such that the"},{"line_number":3262,"context_line":"# tftpserver has access to read the contents of the configured"},{"line_number":3263,"context_line":"# tftp folder. This setting is only required when the"},{"line_number":3264,"context_line":"# operating umask restrictive such that ironic is creating"},{"line_number":3265,"context_line":"# files that cannot be read by the tftp server. Setting to"},{"line_number":3266,"context_line":"# \u003cNone\u003e will not change the permission. (string value)"},{"line_number":3267,"context_line":"# Allowed values: 755, 750"},{"line_number":3268,"context_line":"#dir_permission \u003d \u003cNone\u003e"},{"line_number":3269,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":6,"id":"da36d5c6_178b3bc4","line":3266,"range":{"start_line":3260,"start_character":0,"end_line":3266,"end_character":55},"updated":"2017-02-23 18:24:12.000000000","message":"Current description is fine. Just throwing an idea here:\n\nSpecify the directory permissions for pxe and node directories within tftp_root directory. This setting is required when tftpserver is launched from a user different than root, there\u0027s a restrictive umask, and tftpserver can\u0027t read files created by Ironic. Setting to \u003cNone\u003e will use the system\u0027s umask to assign permissions.","commit_id":"9f45675a7490153877a7a529d2bafbdb5abbe973"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"aa765d436f23d1b7651aeef87032d3331cdd3966","unresolved":false,"context_lines":[{"line_number":3257,"context_line":"# caching. (string value)"},{"line_number":3258,"context_line":"#tftp_master_path \u003d /tftpboot/master_images"},{"line_number":3259,"context_line":""},{"line_number":3260,"context_line":"# The permission of tftp boot directories to be created with."},{"line_number":3261,"context_line":"# This should be set to the permission such that the"},{"line_number":3262,"context_line":"# tftpserver has access to read the contents of the configured"},{"line_number":3263,"context_line":"# tftp folder. This setting is only required when the"},{"line_number":3264,"context_line":"# operating umask restrictive such that ironic is creating"},{"line_number":3265,"context_line":"# files that cannot be read by the tftp server. Setting to"},{"line_number":3266,"context_line":"# \u003cNone\u003e will not change the permission. (string value)"},{"line_number":3267,"context_line":"# Allowed values: 755, 750"},{"line_number":3268,"context_line":"#dir_permission \u003d \u003cNone\u003e"},{"line_number":3269,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":6,"id":"da36d5c6_37b39199","line":3266,"range":{"start_line":3260,"start_character":0,"end_line":3266,"end_character":55},"in_reply_to":"da36d5c6_178b3bc4","updated":"2017-02-27 09:55:55.000000000","message":"Yes you\u0027re right here. Setting to 0 will create the dirs restrictive to system\u0027s umask. Please read Julia\u0027s comment on patchset #4 for details.","commit_id":"9f45675a7490153877a7a529d2bafbdb5abbe973"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"610f752c1611f58db194958d16f303c9a1f9cb29","unresolved":false,"context_lines":[{"line_number":3264,"context_line":"# operating umask restrictive such that ironic is creating"},{"line_number":3265,"context_line":"# files that cannot be read by the tftp server. Setting to"},{"line_number":3266,"context_line":"# \u003cNone\u003e will not change the permission. (string value)"},{"line_number":3267,"context_line":"# Allowed values: 755, 750"},{"line_number":3268,"context_line":"#dir_permission \u003d \u003cNone\u003e"},{"line_number":3269,"context_line":""},{"line_number":3270,"context_line":"# Bootfile DHCP parameter. (string value)"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"da36d5c6_544771bb","line":3267,"range":{"start_line":3267,"start_character":0,"end_line":3267,"end_character":26},"updated":"2017-02-23 18:24:12.000000000","message":"I couldn\u0027t find the code where we specifically check for 755 or 750.\nAre we going to specifically allow only 755 or 750, or the operator is allowed to set other value?","commit_id":"9f45675a7490153877a7a529d2bafbdb5abbe973"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"aa765d436f23d1b7651aeef87032d3331cdd3966","unresolved":false,"context_lines":[{"line_number":3264,"context_line":"# operating umask restrictive such that ironic is creating"},{"line_number":3265,"context_line":"# files that cannot be read by the tftp server. Setting to"},{"line_number":3266,"context_line":"# \u003cNone\u003e will not change the permission. (string value)"},{"line_number":3267,"context_line":"# Allowed values: 755, 750"},{"line_number":3268,"context_line":"#dir_permission \u003d \u003cNone\u003e"},{"line_number":3269,"context_line":""},{"line_number":3270,"context_line":"# Bootfile DHCP parameter. (string value)"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"da36d5c6_3761d105","line":3267,"range":{"start_line":3267,"start_character":0,"end_line":3267,"end_character":26},"in_reply_to":"da36d5c6_544771bb","updated":"2017-02-27 09:55:55.000000000","message":"I have removed this choices as IntOpt doesn\u0027t have it.","commit_id":"9f45675a7490153877a7a529d2bafbdb5abbe973"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"cb310eaec4d02c5a81625be0aac40ee6f38cd217","unresolved":false,"context_lines":[{"line_number":3260,"context_line":"# The permission of tftp boot directories to be created with."},{"line_number":3261,"context_line":"# This should be set to the permission such that the"},{"line_number":3262,"context_line":"# tftpserver has access to read the contents of the configured"},{"line_number":3263,"context_line":"# tftp folder. This setting is only required when the"},{"line_number":3264,"context_line":"# operating umask restrictive such that ironic is creating"},{"line_number":3265,"context_line":"# files that cannot be read by the tftp server. Setting to"},{"line_number":3266,"context_line":"# \u003cNone\u003e will not change the permission. (integer value)"},{"line_number":3267,"context_line":"#dir_permission \u003d \u003cNone\u003e"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"ba2be162_e5c931ae","line":3264,"range":{"start_line":3263,"start_character":15,"end_line":3264,"end_character":29},"updated":"2017-02-28 16:34:05.000000000","message":"nit1: ... when the operating system\u0027s umask is restrictive ...","commit_id":"e5e2cfb3371c1e2929aeec31ce8fdf5adb435ef2"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d771d4b3429621f81137a1bd93ece2f9c50ee862","unresolved":false,"context_lines":[{"line_number":3260,"context_line":"# The permission of tftp boot directories to be created with."},{"line_number":3261,"context_line":"# This should be set to the permission such that the"},{"line_number":3262,"context_line":"# tftpserver has access to read the contents of the configured"},{"line_number":3263,"context_line":"# tftp folder. This setting is only required when the"},{"line_number":3264,"context_line":"# operating umask restrictive such that ironic is creating"},{"line_number":3265,"context_line":"# files that cannot be read by the tftp server. Setting to"},{"line_number":3266,"context_line":"# \u003cNone\u003e will not change the permission. (integer value)"},{"line_number":3267,"context_line":"#dir_permission \u003d \u003cNone\u003e"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"ba2be162_625a4552","line":3264,"range":{"start_line":3263,"start_character":15,"end_line":3264,"end_character":29},"in_reply_to":"ba2be162_c98eff26","updated":"2017-03-02 06:16:23.000000000","message":"Done","commit_id":"e5e2cfb3371c1e2929aeec31ce8fdf5adb435ef2"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c6754eca70b1eed680de6ea44dc607fe6552b43c","unresolved":false,"context_lines":[{"line_number":3260,"context_line":"# The permission of tftp boot directories to be created with."},{"line_number":3261,"context_line":"# This should be set to the permission such that the"},{"line_number":3262,"context_line":"# tftpserver has access to read the contents of the configured"},{"line_number":3263,"context_line":"# tftp folder. This setting is only required when the"},{"line_number":3264,"context_line":"# operating umask restrictive such that ironic is creating"},{"line_number":3265,"context_line":"# files that cannot be read by the tftp server. Setting to"},{"line_number":3266,"context_line":"# \u003cNone\u003e will not change the permission. (integer value)"},{"line_number":3267,"context_line":"#dir_permission \u003d \u003cNone\u003e"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"ba2be162_c98eff26","line":3264,"range":{"start_line":3263,"start_character":15,"end_line":3264,"end_character":29},"in_reply_to":"ba2be162_e5c931ae","updated":"2017-02-28 21:37:01.000000000","message":"+1","commit_id":"e5e2cfb3371c1e2929aeec31ce8fdf5adb435ef2"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c6754eca70b1eed680de6ea44dc607fe6552b43c","unresolved":false,"context_lines":[{"line_number":3263,"context_line":"# tftp folder. This setting is only required when the"},{"line_number":3264,"context_line":"# operating umask restrictive such that ironic is creating"},{"line_number":3265,"context_line":"# files that cannot be read by the tftp server. Setting to"},{"line_number":3266,"context_line":"# \u003cNone\u003e will not change the permission. (integer value)"},{"line_number":3267,"context_line":"#dir_permission \u003d \u003cNone\u003e"},{"line_number":3268,"context_line":""},{"line_number":3269,"context_line":"# Bootfile DHCP parameter. (string value)"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"ba2be162_49d12ffb","line":3266,"range":{"start_line":3266,"start_character":42,"end_line":3266,"end_character":55},"updated":"2017-02-28 21:37:01.000000000","message":"Reading this, I think \"755\" might be what I would want to set as an operator, except \"0o755\" is in the unit tests.  We need to detail exact format required.","commit_id":"e5e2cfb3371c1e2929aeec31ce8fdf5adb435ef2"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"cb310eaec4d02c5a81625be0aac40ee6f38cd217","unresolved":false,"context_lines":[{"line_number":3262,"context_line":"# tftpserver has access to read the contents of the configured"},{"line_number":3263,"context_line":"# tftp folder. This setting is only required when the"},{"line_number":3264,"context_line":"# operating umask restrictive such that ironic is creating"},{"line_number":3265,"context_line":"# files that cannot be read by the tftp server. Setting to"},{"line_number":3266,"context_line":"# \u003cNone\u003e will not change the permission. (integer value)"},{"line_number":3267,"context_line":"#dir_permission \u003d \u003cNone\u003e"},{"line_number":3268,"context_line":""},{"line_number":3269,"context_line":"# Bootfile DHCP parameter. (string value)"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"ba2be162_c53b4d9b","line":3266,"range":{"start_line":3265,"start_character":48,"end_line":3266,"end_character":40},"updated":"2017-02-28 16:34:05.000000000","message":"nit2: ... will not change the permission, but will use the system\u0027s umask.","commit_id":"e5e2cfb3371c1e2929aeec31ce8fdf5adb435ef2"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"5790bbc3815bb7fecb64da99708a94a7923d132f","unresolved":false,"context_lines":[{"line_number":3263,"context_line":"# tftp folder. This setting is only required when the"},{"line_number":3264,"context_line":"# operating umask restrictive such that ironic is creating"},{"line_number":3265,"context_line":"# files that cannot be read by the tftp server. Setting to"},{"line_number":3266,"context_line":"# \u003cNone\u003e will not change the permission. (integer value)"},{"line_number":3267,"context_line":"#dir_permission \u003d \u003cNone\u003e"},{"line_number":3268,"context_line":""},{"line_number":3269,"context_line":"# Bootfile DHCP parameter. (string value)"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"9a30ddce_ba875011","line":3266,"range":{"start_line":3266,"start_character":42,"end_line":3266,"end_character":55},"in_reply_to":"ba2be162_26e641b0","updated":"2017-03-07 05:56:55.000000000","message":"Yes it will work","commit_id":"e5e2cfb3371c1e2929aeec31ce8fdf5adb435ef2"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d771d4b3429621f81137a1bd93ece2f9c50ee862","unresolved":false,"context_lines":[{"line_number":3262,"context_line":"# tftpserver has access to read the contents of the configured"},{"line_number":3263,"context_line":"# tftp folder. This setting is only required when the"},{"line_number":3264,"context_line":"# operating umask restrictive such that ironic is creating"},{"line_number":3265,"context_line":"# files that cannot be read by the tftp server. Setting to"},{"line_number":3266,"context_line":"# \u003cNone\u003e will not change the permission. (integer value)"},{"line_number":3267,"context_line":"#dir_permission \u003d \u003cNone\u003e"},{"line_number":3268,"context_line":""},{"line_number":3269,"context_line":"# Bootfile DHCP parameter. (string value)"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"ba2be162_a2543d21","line":3266,"range":{"start_line":3265,"start_character":48,"end_line":3266,"end_character":40},"in_reply_to":"ba2be162_4995af3e","updated":"2017-03-02 06:16:23.000000000","message":"Done","commit_id":"e5e2cfb3371c1e2929aeec31ce8fdf5adb435ef2"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d771d4b3429621f81137a1bd93ece2f9c50ee862","unresolved":false,"context_lines":[{"line_number":3263,"context_line":"# tftp folder. This setting is only required when the"},{"line_number":3264,"context_line":"# operating umask restrictive such that ironic is creating"},{"line_number":3265,"context_line":"# files that cannot be read by the tftp server. Setting to"},{"line_number":3266,"context_line":"# \u003cNone\u003e will not change the permission. (integer value)"},{"line_number":3267,"context_line":"#dir_permission \u003d \u003cNone\u003e"},{"line_number":3268,"context_line":""},{"line_number":3269,"context_line":"# Bootfile DHCP parameter. (string value)"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"ba2be162_e23475fc","line":3266,"range":{"start_line":3266,"start_character":42,"end_line":3266,"end_character":55},"in_reply_to":"ba2be162_49d12ffb","updated":"2017-03-02 06:16:23.000000000","message":"Julia, both integer and octal works with chmod. Either should work in config also. So I think its not necessary to specify the format in conf. WDYT?","commit_id":"e5e2cfb3371c1e2929aeec31ce8fdf5adb435ef2"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c6754eca70b1eed680de6ea44dc607fe6552b43c","unresolved":false,"context_lines":[{"line_number":3262,"context_line":"# tftpserver has access to read the contents of the configured"},{"line_number":3263,"context_line":"# tftp folder. This setting is only required when the"},{"line_number":3264,"context_line":"# operating umask restrictive such that ironic is creating"},{"line_number":3265,"context_line":"# files that cannot be read by the tftp server. Setting to"},{"line_number":3266,"context_line":"# \u003cNone\u003e will not change the permission. (integer value)"},{"line_number":3267,"context_line":"#dir_permission \u003d \u003cNone\u003e"},{"line_number":3268,"context_line":""},{"line_number":3269,"context_line":"# Bootfile DHCP parameter. (string value)"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"ba2be162_4995af3e","line":3266,"range":{"start_line":3265,"start_character":48,"end_line":3266,"end_character":40},"in_reply_to":"ba2be162_c53b4d9b","updated":"2017-02-28 21:37:01.000000000","message":"Perhaps \"Not defining the value, will result in the system umask to be utilized for the creation of new tftp folders.\" ?","commit_id":"e5e2cfb3371c1e2929aeec31ce8fdf5adb435ef2"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"f08e13c066cb02c673c1663da42f6b43460f3108","unresolved":false,"context_lines":[{"line_number":3263,"context_line":"# tftp folder. This setting is only required when the"},{"line_number":3264,"context_line":"# operating umask restrictive such that ironic is creating"},{"line_number":3265,"context_line":"# files that cannot be read by the tftp server. Setting to"},{"line_number":3266,"context_line":"# \u003cNone\u003e will not change the permission. (integer value)"},{"line_number":3267,"context_line":"#dir_permission \u003d \u003cNone\u003e"},{"line_number":3268,"context_line":""},{"line_number":3269,"context_line":"# Bootfile DHCP parameter. (string value)"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"ba2be162_26e641b0","line":3266,"range":{"start_line":3266,"start_character":42,"end_line":3266,"end_character":55},"in_reply_to":"ba2be162_e23475fc","updated":"2017-03-03 17:47:54.000000000","message":"I wonder if setting octal value in python style would work, example:\n\n  dir_permission \u003d 0o755","commit_id":"e5e2cfb3371c1e2929aeec31ce8fdf5adb435ef2"}],"ironic/common/pxe_utils.py":[{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"121ccd4a35c279cfa74c54430387a8862f1814aa","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    root_dir \u003d get_root_dir()"},{"line_number":52,"context_line":"    node_dir \u003d os.path.join(root_dir, node_uuid)"},{"line_number":53,"context_line":"    fileutils.ensure_tree(node_dir)"},{"line_number":54,"context_line":"    os.chmod(node_dir, 0o755)"},{"line_number":55,"context_line":"    pxe_dir \u003d os.path.join(root_dir, PXE_CFG_DIR_NAME)"},{"line_number":56,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":57,"context_line":"    os.chmod(pxe_dir, 0o755)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_ed859359","line":54,"updated":"2017-02-01 21:13:59.000000000","message":"tftp and ironic processes are running with different users (ironic launched from stack, while tftp service  is launched under tftp) user. Instead of granting read perms for everyone might be we should set correct owner/group for this directory so tftp can read files?","commit_id":"ac60f8b4df2c7e03e6eae506220f82d65f566f70"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"154cf6018a2ec9160b4b6c6b0bf428f7eac176ba","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    os.chmod(node_dir, 0o755)"},{"line_number":55,"context_line":"    pxe_dir \u003d os.path.join(root_dir, PXE_CFG_DIR_NAME)"},{"line_number":56,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":57,"context_line":"    os.chmod(pxe_dir, 0o755)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def _link_mac_pxe_configs(task):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_4d02640b","line":57,"updated":"2017-01-31 14:42:39.000000000","message":"You should be able to pass the mode to the ensure_tree() method directly: https://github.com/openstack/oslo.utils/blob/32cc400608cc71859eaaad3fbaea526a801224b9/oslo_utils/fileutils.py#L33","commit_id":"ac60f8b4df2c7e03e6eae506220f82d65f566f70"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"c2d4c91230eeb382a62cadbc993bb686385f88ca","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    os.chmod(node_dir, 0o755)"},{"line_number":55,"context_line":"    pxe_dir \u003d os.path.join(root_dir, PXE_CFG_DIR_NAME)"},{"line_number":56,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":57,"context_line":"    os.chmod(pxe_dir, 0o755)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def _link_mac_pxe_configs(task):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_fe58fb8b","line":57,"in_reply_to":"3a461143_157bef7b","updated":"2017-02-01 06:02:47.000000000","message":"Thanks John for providing the solution.\n\nAgree with John, umask will override mode.\nSo now the option can be either of explicitly doing chmod or go with John\u0027s solution.\nIMO either of the solution will work. So could you suggest which one to go with?","commit_id":"ac60f8b4df2c7e03e6eae506220f82d65f566f70"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"11b056e2dbaae294478ceecc33252162cada059a","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    os.chmod(node_dir, 0o755)"},{"line_number":55,"context_line":"    pxe_dir \u003d os.path.join(root_dir, PXE_CFG_DIR_NAME)"},{"line_number":56,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":57,"context_line":"    os.chmod(pxe_dir, 0o755)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def _link_mac_pxe_configs(task):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_157bef7b","line":57,"in_reply_to":"3a461143_4d02640b","updated":"2017-01-31 22:08:28.000000000","message":"Unfortunately that won\u0027t work. umask overrides \u0027mode\u0027 :(\n\nhttps://docs.python.org/2/library/os.html#os.mkdir\n\n    umask \u003d os.umask(0o777)\n    os.mkdir(\u0027foo\u0027, 0o755)\n\nDirectory created has permissions 0o000\n\nBut maybe could set umask before calling ensure_tree() ? And reset it back?\n\n old_umask \u003d os.umask(0o000)\n fileutils.ensure_tree(...)\n fileutils.ensure_tree(...)\n os.umask(old_umask)\n\nNot sure if want to put that into an @contextlib.contextmanager thingy.\n\n with set_umask(0o000):\n  fileutils.ensure_tree(...)\n  fileutils.ensure_tree(...)\n\n @contextlib.contextmanager\n def set_umask(umask):\n   old_umask \u003d os.umask(umask)\n   try:\n      yield old_umask\n   finally:\n      os.umask(old_umask)","commit_id":"ac60f8b4df2c7e03e6eae506220f82d65f566f70"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"e392615816272e0bca0eb763208d1948d9b0f0d6","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    os.chmod(node_dir, 0o755)"},{"line_number":55,"context_line":"    pxe_dir \u003d os.path.join(root_dir, PXE_CFG_DIR_NAME)"},{"line_number":56,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":57,"context_line":"    os.chmod(pxe_dir, 0o755)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def _link_mac_pxe_configs(task):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_c7eef6b3","line":57,"in_reply_to":"3a461143_dbb41f84","updated":"2017-02-01 20:29:00.000000000","message":"Yeah that seems simpler and looks like it will work :)","commit_id":"ac60f8b4df2c7e03e6eae506220f82d65f566f70"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ceb5bd6ba1f91742faedb68f7999a2f6d67c9a42","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    os.chmod(node_dir, 0o755)"},{"line_number":55,"context_line":"    pxe_dir \u003d os.path.join(root_dir, PXE_CFG_DIR_NAME)"},{"line_number":56,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":57,"context_line":"    os.chmod(pxe_dir, 0o755)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def _link_mac_pxe_configs(task):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a461143_dbb41f84","line":57,"in_reply_to":"3a461143_fe58fb8b","updated":"2017-02-01 14:52:57.000000000","message":"Oh right,\n\nThanks John, yeah I like the suggestions, perhaps:\n \n try:\n     old_umask \u003d os.umask(0o000)\n     fileutils.ensure_tree(...)\n     fileutils.ensure_tree(...) \n finnaly:\n     os.umask(old_umask)\n\nshould be enough ?","commit_id":"ac60f8b4df2c7e03e6eae506220f82d65f566f70"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"12ff0ad0e4115ea760563ee26e351b8a24b5d393","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    root_dir \u003d get_root_dir()"},{"line_number":52,"context_line":"    try:"},{"line_number":53,"context_line":"        old_umask \u003d os.umask(0o000)"},{"line_number":54,"context_line":"        fileutils.ensure_tree(os.path.join(root_dir, node_uuid), 0o755)"},{"line_number":55,"context_line":"        fileutils.ensure_tree(os.path.join(root_dir, PXE_CFG_DIR_NAME), 0o755)"},{"line_number":56,"context_line":"    finally:"},{"line_number":57,"context_line":"        os.umask(old_umask)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a461143_eb3f1fd4","line":54,"range":{"start_line":54,"start_character":65,"end_line":54,"end_character":70},"updated":"2017-02-02 15:19:14.000000000","message":"nit:\n\n mode\u003d0o755\n\nJust to make it easier for readers of the code in the future.","commit_id":"d63c4b3cc2fc476de76a8c170dbc7c524096a4ce"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"12ff0ad0e4115ea760563ee26e351b8a24b5d393","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    try:"},{"line_number":53,"context_line":"        old_umask \u003d os.umask(0o000)"},{"line_number":54,"context_line":"        fileutils.ensure_tree(os.path.join(root_dir, node_uuid), 0o755)"},{"line_number":55,"context_line":"        fileutils.ensure_tree(os.path.join(root_dir, PXE_CFG_DIR_NAME), 0o755)"},{"line_number":56,"context_line":"    finally:"},{"line_number":57,"context_line":"        os.umask(old_umask)"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a461143_2b2207ba","line":55,"updated":"2017-02-02 15:19:14.000000000","message":"ditto","commit_id":"d63c4b3cc2fc476de76a8c170dbc7c524096a4ce"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"efee8e5caa17b7b8d4b6c8096c55c19f4aeb9867","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    pxe_dir \u003d os.path.join(root_dir, PXE_CFG_DIR_NAME)"},{"line_number":55,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    dir_permission \u003d CONF.pxe.dir_permission"},{"line_number":58,"context_line":"    if dir_permission:"},{"line_number":59,"context_line":"        os.chmod(node_dir, dir_permission)"},{"line_number":60,"context_line":"        os.chmod(pxe_dir, dir_permission)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_5e43d912","line":57,"range":{"start_line":57,"start_character":0,"end_line":57,"end_character":44},"updated":"2017-02-15 15:59:08.000000000","message":"I know this solves the issue, but I have mixed feelings about needing a config option for dir permissions, when we know beforehand what is needed to fix the issue.\n\nUsers can still give 0o777, which are too permissive (sure this would be the user\u0027s call, but still too wide open). Users may also give 0o640 which leads to deploy failures, at this point they might need to understand the ironic internals to find out what\u0027s happening.","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"560f816ebea57915bc5d8e59a6ad52c35a1cb852","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    pxe_dir \u003d os.path.join(root_dir, PXE_CFG_DIR_NAME)"},{"line_number":55,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    dir_permission \u003d CONF.pxe.dir_permission"},{"line_number":58,"context_line":"    if dir_permission:"},{"line_number":59,"context_line":"        os.chmod(node_dir, dir_permission)"},{"line_number":60,"context_line":"        os.chmod(pxe_dir, dir_permission)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_8d86e514","line":57,"range":{"start_line":57,"start_character":4,"end_line":57,"end_character":44},"updated":"2017-02-16 08:58:18.000000000","message":"User can not give any permission to file until he is not an owner (or a member of appropriate group) of the file. So giving these too permissive rights for user beforehand is not too nice, IMHO","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"45eb41f44cd8c2da44c12f729aa7d9f3864a71ba","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    pxe_dir \u003d os.path.join(root_dir, PXE_CFG_DIR_NAME)"},{"line_number":55,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    dir_permission \u003d CONF.pxe.dir_permission"},{"line_number":58,"context_line":"    if dir_permission:"},{"line_number":59,"context_line":"        os.chmod(node_dir, dir_permission)"},{"line_number":60,"context_line":"        os.chmod(pxe_dir, dir_permission)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da36d5c6_5c916b46","line":57,"range":{"start_line":57,"start_character":4,"end_line":57,"end_character":44},"in_reply_to":"fa31d9ce_3b36efb4","updated":"2017-02-23 07:19:05.000000000","message":"Done","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"462e726941cf74559d6f1e85399ee30f6379ba90","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    pxe_dir \u003d os.path.join(root_dir, PXE_CFG_DIR_NAME)"},{"line_number":55,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    dir_permission \u003d CONF.pxe.dir_permission"},{"line_number":58,"context_line":"    if dir_permission:"},{"line_number":59,"context_line":"        os.chmod(node_dir, dir_permission)"},{"line_number":60,"context_line":"        os.chmod(pxe_dir, dir_permission)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_ea6038a7","line":57,"range":{"start_line":57,"start_character":0,"end_line":57,"end_character":44},"in_reply_to":"fa31d9ce_5e43d912","updated":"2017-02-15 21:42:34.000000000","message":"I tend to agree with this line of thinking. This may also contribute to config bloat.","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"45eb41f44cd8c2da44c12f729aa7d9f3864a71ba","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    pxe_dir \u003d os.path.join(root_dir, PXE_CFG_DIR_NAME)"},{"line_number":55,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    dir_permission \u003d CONF.pxe.dir_permission"},{"line_number":58,"context_line":"    if dir_permission:"},{"line_number":59,"context_line":"        os.chmod(node_dir, dir_permission)"},{"line_number":60,"context_line":"        os.chmod(pxe_dir, dir_permission)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da36d5c6_5cb88bc8","line":57,"range":{"start_line":57,"start_character":4,"end_line":57,"end_character":44},"in_reply_to":"fa31d9ce_8d86e514","updated":"2017-02-23 07:19:05.000000000","message":"I think Julia\u0027s comment have answered your queries.\nThanks!","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"277358b8a338439ba08f5edd1d90e085091f4213","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    pxe_dir \u003d os.path.join(root_dir, PXE_CFG_DIR_NAME)"},{"line_number":55,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    dir_permission \u003d CONF.pxe.dir_permission"},{"line_number":58,"context_line":"    if dir_permission:"},{"line_number":59,"context_line":"        os.chmod(node_dir, dir_permission)"},{"line_number":60,"context_line":"        os.chmod(pxe_dir, dir_permission)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_f60d65e9","line":57,"range":{"start_line":57,"start_character":4,"end_line":57,"end_character":44},"in_reply_to":"fa31d9ce_8d86e514","updated":"2017-02-16 14:00:36.000000000","message":"So, I agree we may encounter config bloat, but I think this makes sense to allow an operator and ironic to be aware of appropriate file permissions given that distributions ship with varying umasks, and hardening guides detail making the umask more restrictive.  In most cases, this is okay, but in the case of a conductor where we need to help ensure cross user access permissions for files, since tftpd may run as a different and completely unprivileged user, this makes sense.","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"e0b97036016b7e1f07c793282cc9dbb3f75b3550","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    pxe_dir \u003d os.path.join(root_dir, PXE_CFG_DIR_NAME)"},{"line_number":55,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    dir_permission \u003d CONF.pxe.dir_permission"},{"line_number":58,"context_line":"    if dir_permission:"},{"line_number":59,"context_line":"        os.chmod(node_dir, dir_permission)"},{"line_number":60,"context_line":"        os.chmod(pxe_dir, dir_permission)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_3b36efb4","line":57,"range":{"start_line":57,"start_character":4,"end_line":57,"end_character":44},"in_reply_to":"fa31d9ce_f60d65e9","updated":"2017-02-17 00:18:04.000000000","message":"Can we have choices for this option that takes only two values may be 755 or 750?","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"277358b8a338439ba08f5edd1d90e085091f4213","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    dir_permission \u003d CONF.pxe.dir_permission"},{"line_number":58,"context_line":"    if dir_permission:"},{"line_number":59,"context_line":"        os.chmod(node_dir, dir_permission)"},{"line_number":60,"context_line":"        os.chmod(pxe_dir, dir_permission)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def _link_mac_pxe_configs(task):"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_d6bdc1d8","line":60,"range":{"start_line":58,"start_character":4,"end_line":60,"end_character":41},"updated":"2017-02-16 14:00:36.000000000","message":"We should only change the permissions if the folder does not exist. i.e. if defined, an operator could have already created it _and_ placed specific ACLs upon the folder which _may_ not recurse downward.","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"45eb41f44cd8c2da44c12f729aa7d9f3864a71ba","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    dir_permission \u003d CONF.pxe.dir_permission"},{"line_number":58,"context_line":"    if dir_permission:"},{"line_number":59,"context_line":"        os.chmod(node_dir, dir_permission)"},{"line_number":60,"context_line":"        os.chmod(pxe_dir, dir_permission)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def _link_mac_pxe_configs(task):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da36d5c6_7cbd4fb6","line":60,"range":{"start_line":58,"start_character":4,"end_line":60,"end_character":41},"in_reply_to":"fa31d9ce_9bcefbb2","updated":"2017-02-23 07:19:05.000000000","message":"Done","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"e0b97036016b7e1f07c793282cc9dbb3f75b3550","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    dir_permission \u003d CONF.pxe.dir_permission"},{"line_number":58,"context_line":"    if dir_permission:"},{"line_number":59,"context_line":"        os.chmod(node_dir, dir_permission)"},{"line_number":60,"context_line":"        os.chmod(pxe_dir, dir_permission)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"def _link_mac_pxe_configs(task):"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_9bcefbb2","line":60,"range":{"start_line":58,"start_character":4,"end_line":60,"end_character":41},"in_reply_to":"fa31d9ce_d6bdc1d8","updated":"2017-02-17 00:18:04.000000000","message":"+1","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"610f752c1611f58db194958d16f303c9a1f9cb29","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    # already created it and placed specific ACLs upon the folder"},{"line_number":57,"context_line":"    # which may not recurse downward."},{"line_number":58,"context_line":"    dir_exist \u003d False"},{"line_number":59,"context_line":"    if os.path.isdir(node_dir) and os.path.isdir(pxe_dir):"},{"line_number":60,"context_line":"        dir_exist \u003d True"},{"line_number":61,"context_line":"    fileutils.ensure_tree(node_dir)"},{"line_number":62,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da36d5c6_ea7a3f87","line":60,"range":{"start_line":59,"start_character":0,"end_line":60,"end_character":24},"updated":"2017-02-23 18:24:12.000000000","message":"Does it make sense to check directories individually?\nJust in case either node_dir or pxe_dir existed previously.\nNote: code is not tested.\n\nfor item in [node_dir, pxe_dir]:\n  if not os.path.isdir(item):\n    fileutils.ensure_tree(item)\n\n    if CONF.pxe.dir_permission:\n      os.chmod(item, CONF.pxe.dir_permission)","commit_id":"9f45675a7490153877a7a529d2bafbdb5abbe973"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"aa765d436f23d1b7651aeef87032d3331cdd3966","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    # already created it and placed specific ACLs upon the folder"},{"line_number":57,"context_line":"    # which may not recurse downward."},{"line_number":58,"context_line":"    dir_exist \u003d False"},{"line_number":59,"context_line":"    if os.path.isdir(node_dir) and os.path.isdir(pxe_dir):"},{"line_number":60,"context_line":"        dir_exist \u003d True"},{"line_number":61,"context_line":"    fileutils.ensure_tree(node_dir)"},{"line_number":62,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da36d5c6_5752c567","line":60,"range":{"start_line":59,"start_character":0,"end_line":60,"end_character":24},"in_reply_to":"da36d5c6_b5aa5083","updated":"2017-02-27 09:55:55.000000000","message":"Done","commit_id":"9f45675a7490153877a7a529d2bafbdb5abbe973"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"a73fc2ef3c0864eacc1eb91e526fab74fbb93be5","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    # already created it and placed specific ACLs upon the folder"},{"line_number":57,"context_line":"    # which may not recurse downward."},{"line_number":58,"context_line":"    dir_exist \u003d False"},{"line_number":59,"context_line":"    if os.path.isdir(node_dir) and os.path.isdir(pxe_dir):"},{"line_number":60,"context_line":"        dir_exist \u003d True"},{"line_number":61,"context_line":"    fileutils.ensure_tree(node_dir)"},{"line_number":62,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da36d5c6_b5aa5083","line":60,"range":{"start_line":59,"start_character":0,"end_line":60,"end_character":24},"in_reply_to":"da36d5c6_ea7a3f87","updated":"2017-02-24 09:57:46.000000000","message":"* +1 regarding unittest\n* +1 regarding checking directories. Here the logic is broken, because you change permission only if both directories do not exist. Solio\u0027s code is good","commit_id":"9f45675a7490153877a7a529d2bafbdb5abbe973"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"aa765d436f23d1b7651aeef87032d3331cdd3966","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    # already created it and placed specific ACLs upon the folder"},{"line_number":57,"context_line":"    # which may not recurse downward."},{"line_number":58,"context_line":"    dir_exist \u003d False"},{"line_number":59,"context_line":"    if os.path.isdir(node_dir) and os.path.isdir(pxe_dir):"},{"line_number":60,"context_line":"        dir_exist \u003d True"},{"line_number":61,"context_line":"    fileutils.ensure_tree(node_dir)"},{"line_number":62,"context_line":"    fileutils.ensure_tree(pxe_dir)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da36d5c6_bf4cbd9e","line":60,"range":{"start_line":59,"start_character":0,"end_line":60,"end_character":24},"in_reply_to":"da36d5c6_ea7a3f87","updated":"2017-02-27 09:55:55.000000000","message":"Done","commit_id":"9f45675a7490153877a7a529d2bafbdb5abbe973"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"4bc614bb17b40c4027979545ced63b933f37686f","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    # does not exist. i.e. if defined, an operator could have"},{"line_number":56,"context_line":"    # already created it and placed specific ACLs upon the folder"},{"line_number":57,"context_line":"    # which may not recurse downward."},{"line_number":58,"context_line":"    for directory in [node_dir, pxe_dir]:"},{"line_number":59,"context_line":"        if not os.path.isdir(directory):"},{"line_number":60,"context_line":"            fileutils.ensure_tree(directory)"},{"line_number":61,"context_line":"            if CONF.pxe.dir_permission:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da36d5c6_d10213b4","line":58,"range":{"start_line":58,"start_character":20,"end_line":58,"end_character":41},"updated":"2017-02-28 10:45:31.000000000","message":"+1. technically it would not matter, but tuple is counted as immutable, and in your case the pair (node_dir, pxe_dir) should be immutable","commit_id":"5b9c514faf722747d2bcbc5e585427ab1b944f7f"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"76f47a02ea0ed986099cd8c51531e1e7c5119f6b","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    # does not exist. i.e. if defined, an operator could have"},{"line_number":56,"context_line":"    # already created it and placed specific ACLs upon the folder"},{"line_number":57,"context_line":"    # which may not recurse downward."},{"line_number":58,"context_line":"    for directory in [node_dir, pxe_dir]:"},{"line_number":59,"context_line":"        if not os.path.isdir(directory):"},{"line_number":60,"context_line":"            fileutils.ensure_tree(directory)"},{"line_number":61,"context_line":"            if CONF.pxe.dir_permission:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da36d5c6_23942643","line":58,"range":{"start_line":58,"start_character":21,"end_line":58,"end_character":40},"updated":"2017-02-27 16:52:58.000000000","message":"This can even be a tuple. In this case I don\u0027t think it affects performance.","commit_id":"5b9c514faf722747d2bcbc5e585427ab1b944f7f"}],"ironic/conf/pxe.py":[{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"e0b97036016b7e1f07c793282cc9dbb3f75b3550","unresolved":false,"context_lines":[{"line_number":77,"context_line":"               help\u003d_(\u0027On ironic-conductor node, directory where master TFTP \u0027"},{"line_number":78,"context_line":"                      \u0027images are stored on disk. \u0027"},{"line_number":79,"context_line":"                      \u0027Setting to \u003cNone\u003e disables image caching.\u0027)),"},{"line_number":80,"context_line":"    cfg.StrOpt(\u0027dir_permission\u0027,"},{"line_number":81,"context_line":"               help\u003d_(\"The permission of tftp boot directories to be created \""},{"line_number":82,"context_line":"                      \"with. This should be set to the right permission so \""},{"line_number":83,"context_line":"                      \"that the tftpserver has access to read it. This is \""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_668292ca","line":80,"range":{"start_line":80,"start_character":16,"end_line":80,"end_character":30},"updated":"2017-02-17 00:18:04.000000000","message":"Wondering should we have a \u0027choices\u0027 added for this conf option? It can be 755 or 750?","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"45eb41f44cd8c2da44c12f729aa7d9f3864a71ba","unresolved":false,"context_lines":[{"line_number":77,"context_line":"               help\u003d_(\u0027On ironic-conductor node, directory where master TFTP \u0027"},{"line_number":78,"context_line":"                      \u0027images are stored on disk. \u0027"},{"line_number":79,"context_line":"                      \u0027Setting to \u003cNone\u003e disables image caching.\u0027)),"},{"line_number":80,"context_line":"    cfg.StrOpt(\u0027dir_permission\u0027,"},{"line_number":81,"context_line":"               help\u003d_(\"The permission of tftp boot directories to be created \""},{"line_number":82,"context_line":"                      \"with. This should be set to the right permission so \""},{"line_number":83,"context_line":"                      \"that the tftpserver has access to read it. This is \""}],"source_content_type":"text/x-python","patch_set":5,"id":"da36d5c6_2180108b","line":80,"range":{"start_line":80,"start_character":16,"end_line":80,"end_character":30},"in_reply_to":"fa31d9ce_668292ca","updated":"2017-02-23 07:19:05.000000000","message":"Done","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"277358b8a338439ba08f5edd1d90e085091f4213","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                      \u0027Setting to \u003cNone\u003e disables image caching.\u0027)),"},{"line_number":80,"context_line":"    cfg.StrOpt(\u0027dir_permission\u0027,"},{"line_number":81,"context_line":"               help\u003d_(\"The permission of tftp boot directories to be created \""},{"line_number":82,"context_line":"                      \"with. This should be set to the right permission so \""},{"line_number":83,"context_line":"                      \"that the tftpserver has access to read it. This is \""},{"line_number":84,"context_line":"                      \"only required when node\u0027s umask setting affects the \""},{"line_number":85,"context_line":"                      \"final permission. \""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_5b081c2e","line":82,"range":{"start_line":82,"start_character":55,"end_line":82,"end_character":74},"updated":"2017-02-16 14:00:36.000000000","message":"nit: \"the permission such\"","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"277358b8a338439ba08f5edd1d90e085091f4213","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    cfg.StrOpt(\u0027dir_permission\u0027,"},{"line_number":81,"context_line":"               help\u003d_(\"The permission of tftp boot directories to be created \""},{"line_number":82,"context_line":"                      \"with. This should be set to the right permission so \""},{"line_number":83,"context_line":"                      \"that the tftpserver has access to read it. This is \""},{"line_number":84,"context_line":"                      \"only required when node\u0027s umask setting affects the \""},{"line_number":85,"context_line":"                      \"final permission. \""},{"line_number":86,"context_line":"                      \"Setting to \u003cNone\u003e will not change the permission.\")),"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_d629418b","line":83,"range":{"start_line":83,"start_character":54,"end_line":83,"end_character":65},"updated":"2017-02-16 14:00:36.000000000","message":"\"to read contents of the configured tftp folder.\"?","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"e0b97036016b7e1f07c793282cc9dbb3f75b3550","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    cfg.StrOpt(\u0027dir_permission\u0027,"},{"line_number":81,"context_line":"               help\u003d_(\"The permission of tftp boot directories to be created \""},{"line_number":82,"context_line":"                      \"with. This should be set to the right permission so \""},{"line_number":83,"context_line":"                      \"that the tftpserver has access to read it. This is \""},{"line_number":84,"context_line":"                      \"only required when node\u0027s umask setting affects the \""},{"line_number":85,"context_line":"                      \"final permission. \""},{"line_number":86,"context_line":"                      \"Setting to \u003cNone\u003e will not change the permission.\")),"},{"line_number":87,"context_line":"    cfg.StrOpt(\u0027pxe_bootfile_name\u0027,"},{"line_number":88,"context_line":"               default\u003d\u0027pxelinux.0\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_86d5c6ba","line":85,"range":{"start_line":83,"start_character":66,"end_line":85,"end_character":42},"updated":"2017-02-17 00:18:04.000000000","message":"Is this required here? I mean not many operators who will use will know inner details of node? Again it is just what I think.","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"277358b8a338439ba08f5edd1d90e085091f4213","unresolved":false,"context_lines":[{"line_number":81,"context_line":"               help\u003d_(\"The permission of tftp boot directories to be created \""},{"line_number":82,"context_line":"                      \"with. This should be set to the right permission so \""},{"line_number":83,"context_line":"                      \"that the tftpserver has access to read it. This is \""},{"line_number":84,"context_line":"                      \"only required when node\u0027s umask setting affects the \""},{"line_number":85,"context_line":"                      \"final permission. \""},{"line_number":86,"context_line":"                      \"Setting to \u003cNone\u003e will not change the permission.\")),"},{"line_number":87,"context_line":"    cfg.StrOpt(\u0027pxe_bootfile_name\u0027,"},{"line_number":88,"context_line":"               default\u003d\u0027pxelinux.0\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_b6992dd3","line":85,"range":{"start_line":84,"start_character":63,"end_line":85,"end_character":42},"updated":"2017-02-16 14:00:36.000000000","message":"So the umask will always affect the permissions that end up being used on files created.  Perhaps \"This setting is only required when the operating umask restrictive such that ironic is creating files that cannot be read by the tftp server.\" ?","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"45eb41f44cd8c2da44c12f729aa7d9f3864a71ba","unresolved":false,"context_lines":[{"line_number":81,"context_line":"               help\u003d_(\"The permission of tftp boot directories to be created \""},{"line_number":82,"context_line":"                      \"with. This should be set to the right permission so \""},{"line_number":83,"context_line":"                      \"that the tftpserver has access to read it. This is \""},{"line_number":84,"context_line":"                      \"only required when node\u0027s umask setting affects the \""},{"line_number":85,"context_line":"                      \"final permission. \""},{"line_number":86,"context_line":"                      \"Setting to \u003cNone\u003e will not change the permission.\")),"},{"line_number":87,"context_line":"    cfg.StrOpt(\u0027pxe_bootfile_name\u0027,"},{"line_number":88,"context_line":"               default\u003d\u0027pxelinux.0\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"da36d5c6_212e50a5","line":85,"range":{"start_line":84,"start_character":63,"end_line":85,"end_character":42},"in_reply_to":"fa31d9ce_b6992dd3","updated":"2017-02-23 07:19:05.000000000","message":"Done","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"277358b8a338439ba08f5edd1d90e085091f4213","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                      \"that the tftpserver has access to read it. This is \""},{"line_number":84,"context_line":"                      \"only required when node\u0027s umask setting affects the \""},{"line_number":85,"context_line":"                      \"final permission. \""},{"line_number":86,"context_line":"                      \"Setting to \u003cNone\u003e will not change the permission.\")),"},{"line_number":87,"context_line":"    cfg.StrOpt(\u0027pxe_bootfile_name\u0027,"},{"line_number":88,"context_line":"               default\u003d\u0027pxelinux.0\u0027,"},{"line_number":89,"context_line":"               help\u003d_(\u0027Bootfile DHCP parameter.\u0027)),"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa31d9ce_96b50933","line":86,"updated":"2017-02-16 14:00:36.000000000","message":"Lets define a default of None.  Also, we ought tot detail expected format of the string.  We can\u0027t assume an operator has any python coding experience or an understanding of what the string that python expects is.  Potentially, this could be made easier for a user by just expecting the standard unix triplet (i.e. 755 or 750, etc.)","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"45eb41f44cd8c2da44c12f729aa7d9f3864a71ba","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                      \"that the tftpserver has access to read it. This is \""},{"line_number":84,"context_line":"                      \"only required when node\u0027s umask setting affects the \""},{"line_number":85,"context_line":"                      \"final permission. \""},{"line_number":86,"context_line":"                      \"Setting to \u003cNone\u003e will not change the permission.\")),"},{"line_number":87,"context_line":"    cfg.StrOpt(\u0027pxe_bootfile_name\u0027,"},{"line_number":88,"context_line":"               default\u003d\u0027pxelinux.0\u0027,"},{"line_number":89,"context_line":"               help\u003d_(\u0027Bootfile DHCP parameter.\u0027)),"}],"source_content_type":"text/x-python","patch_set":5,"id":"da36d5c6_412b4494","line":86,"in_reply_to":"fa31d9ce_96b50933","updated":"2017-02-23 07:19:05.000000000","message":"Done","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"610f752c1611f58db194958d16f303c9a1f9cb29","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                      \u0027Setting to \u003cNone\u003e disables image caching.\u0027)),"},{"line_number":80,"context_line":"    cfg.StrOpt(\u0027dir_permission\u0027,"},{"line_number":81,"context_line":"               default\u003dNone,"},{"line_number":82,"context_line":"               choices\u003d[755, 750],"},{"line_number":83,"context_line":"               help\u003d_(\"The permission of tftp boot directories to be created \""},{"line_number":84,"context_line":"                      \"with. This should be set to the permission such that \""},{"line_number":85,"context_line":"                      \"the tftpserver has access to read the contents of the \""}],"source_content_type":"text/x-python","patch_set":6,"id":"da36d5c6_125b49f7","line":82,"range":{"start_line":82,"start_character":0,"end_line":82,"end_character":33},"updated":"2017-02-23 18:24:12.000000000","message":"I don\u0027t know much about oslo_config. Is there a difference in using ints or strings?\n\n  choices\u003d[\u0027755\u0027, \u0027750\u0027],","commit_id":"9f45675a7490153877a7a529d2bafbdb5abbe973"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"a73fc2ef3c0864eacc1eb91e526fab74fbb93be5","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                      \u0027Setting to \u003cNone\u003e disables image caching.\u0027)),"},{"line_number":80,"context_line":"    cfg.StrOpt(\u0027dir_permission\u0027,"},{"line_number":81,"context_line":"               default\u003dNone,"},{"line_number":82,"context_line":"               choices\u003d[755, 750],"},{"line_number":83,"context_line":"               help\u003d_(\"The permission of tftp boot directories to be created \""},{"line_number":84,"context_line":"                      \"with. This should be set to the permission such that \""},{"line_number":85,"context_line":"                      \"the tftpserver has access to read the contents of the \""}],"source_content_type":"text/x-python","patch_set":6,"id":"da36d5c6_35f100ce","line":82,"range":{"start_line":82,"start_character":0,"end_line":82,"end_character":33},"in_reply_to":"da36d5c6_125b49f7","updated":"2017-02-24 09:57:46.000000000","message":"As this is StrOpt, the choices should be string. \nBut actually I would try to make IntOpt and leave choices as it is.\nIt seems to me more essential","commit_id":"9f45675a7490153877a7a529d2bafbdb5abbe973"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"aa765d436f23d1b7651aeef87032d3331cdd3966","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                      \u0027Setting to \u003cNone\u003e disables image caching.\u0027)),"},{"line_number":80,"context_line":"    cfg.StrOpt(\u0027dir_permission\u0027,"},{"line_number":81,"context_line":"               default\u003dNone,"},{"line_number":82,"context_line":"               choices\u003d[755, 750],"},{"line_number":83,"context_line":"               help\u003d_(\"The permission of tftp boot directories to be created \""},{"line_number":84,"context_line":"                      \"with. This should be set to the permission such that \""},{"line_number":85,"context_line":"                      \"the tftpserver has access to read the contents of the \""}],"source_content_type":"text/x-python","patch_set":6,"id":"da36d5c6_97527d33","line":82,"range":{"start_line":82,"start_character":0,"end_line":82,"end_character":33},"in_reply_to":"da36d5c6_35f100ce","updated":"2017-02-27 09:55:55.000000000","message":"Done. I have changed it to IntOpt.","commit_id":"9f45675a7490153877a7a529d2bafbdb5abbe973"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"76addff9a6d03029c33b725852925078c6b040b2","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                      \u0027images are stored on disk. \u0027"},{"line_number":79,"context_line":"                      \u0027Setting to \u003cNone\u003e disables image caching.\u0027)),"},{"line_number":80,"context_line":"    cfg.IntOpt(\u0027dir_permission\u0027,"},{"line_number":81,"context_line":"               default\u003d0,"},{"line_number":82,"context_line":"               help\u003d_(\"The permission of tftp boot directories to be created \""},{"line_number":83,"context_line":"                      \"with. This should be set to the permission such that \""},{"line_number":84,"context_line":"                      \"the tftpserver has access to read the contents of the \""}],"source_content_type":"text/x-python","patch_set":7,"id":"da36d5c6_f2701edf","line":81,"range":{"start_line":81,"start_character":15,"end_line":81,"end_character":25},"updated":"2017-02-27 14:56:28.000000000","message":"Why default is 0, not None?\nActuall, default paramter is None by default\nhttps://docs.openstack.org/developer/oslo.config/opts.html#option-definitions\nSo this just could be erased","commit_id":"5b9c514faf722747d2bcbc5e585427ab1b944f7f"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"76f47a02ea0ed986099cd8c51531e1e7c5119f6b","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                      \u0027images are stored on disk. \u0027"},{"line_number":79,"context_line":"                      \u0027Setting to \u003cNone\u003e disables image caching.\u0027)),"},{"line_number":80,"context_line":"    cfg.IntOpt(\u0027dir_permission\u0027,"},{"line_number":81,"context_line":"               default\u003d0,"},{"line_number":82,"context_line":"               help\u003d_(\"The permission of tftp boot directories to be created \""},{"line_number":83,"context_line":"                      \"with. This should be set to the permission such that \""},{"line_number":84,"context_line":"                      \"the tftpserver has access to read the contents of the \""}],"source_content_type":"text/x-python","patch_set":7,"id":"da36d5c6_f5e563dc","line":81,"range":{"start_line":81,"start_character":15,"end_line":81,"end_character":25},"in_reply_to":"da36d5c6_f2701edf","updated":"2017-02-27 16:52:58.000000000","message":"Right, I like the idea of having None as default value.\nSince 0 is actually a valid permission that could be used in `chmod 0 foo_file`.","commit_id":"5b9c514faf722747d2bcbc5e585427ab1b944f7f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c6754eca70b1eed680de6ea44dc607fe6552b43c","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                      \u0027images are stored on disk. \u0027"},{"line_number":79,"context_line":"                      \u0027Setting to \u003cNone\u003e disables image caching.\u0027)),"},{"line_number":80,"context_line":"    cfg.IntOpt(\u0027dir_permission\u0027,"},{"line_number":81,"context_line":"               help\u003d_(\"The permission of tftp boot directories to be created \""},{"line_number":82,"context_line":"                      \"with. This should be set to the permission such that \""},{"line_number":83,"context_line":"                      \"the tftpserver has access to read the contents of the \""},{"line_number":84,"context_line":"                      \"configured tftp folder. This setting is only required \""},{"line_number":85,"context_line":"                      \"when the operating umask restrictive such that ironic \""},{"line_number":86,"context_line":"                      \"is creating files that cannot be read by the tftp \""},{"line_number":87,"context_line":"                      \"server. \""},{"line_number":88,"context_line":"                      \"Setting to \u003cNone\u003e will not change the permission.\")),"},{"line_number":89,"context_line":"    cfg.StrOpt(\u0027pxe_bootfile_name\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba2be162_6910b34f","line":86,"range":{"start_line":81,"start_character":22,"end_line":86,"end_character":74},"updated":"2017-02-28 21:37:01.000000000","message":"Perhaps \"The permission that upon directory creation, will be applied to the PXE folders upon creation.\" as the first sentence?\n\nWe need to also detail what format is expected, I believe the os.chmod method requires an explicit format.","commit_id":"e5e2cfb3371c1e2929aeec31ce8fdf5adb435ef2"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d771d4b3429621f81137a1bd93ece2f9c50ee862","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                      \u0027images are stored on disk. \u0027"},{"line_number":79,"context_line":"                      \u0027Setting to \u003cNone\u003e disables image caching.\u0027)),"},{"line_number":80,"context_line":"    cfg.IntOpt(\u0027dir_permission\u0027,"},{"line_number":81,"context_line":"               help\u003d_(\"The permission of tftp boot directories to be created \""},{"line_number":82,"context_line":"                      \"with. This should be set to the permission such that \""},{"line_number":83,"context_line":"                      \"the tftpserver has access to read the contents of the \""},{"line_number":84,"context_line":"                      \"configured tftp folder. This setting is only required \""},{"line_number":85,"context_line":"                      \"when the operating umask restrictive such that ironic \""},{"line_number":86,"context_line":"                      \"is creating files that cannot be read by the tftp \""},{"line_number":87,"context_line":"                      \"server. \""},{"line_number":88,"context_line":"                      \"Setting to \u003cNone\u003e will not change the permission.\")),"},{"line_number":89,"context_line":"    cfg.StrOpt(\u0027pxe_bootfile_name\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba2be162_1d72caad","line":86,"range":{"start_line":81,"start_character":22,"end_line":86,"end_character":74},"in_reply_to":"ba2be162_6910b34f","updated":"2017-03-02 06:16:23.000000000","message":"Done","commit_id":"e5e2cfb3371c1e2929aeec31ce8fdf5adb435ef2"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"11033da2fc3c0d59b2e857bfed43fc7a3f63fb3b","unresolved":false,"context_lines":[{"line_number":77,"context_line":"               help\u003d_(\u0027On ironic-conductor node, directory where master TFTP \u0027"},{"line_number":78,"context_line":"                      \u0027images are stored on disk. \u0027"},{"line_number":79,"context_line":"                      \u0027Setting to \u003cNone\u003e disables image caching.\u0027)),"},{"line_number":80,"context_line":"    cfg.IntOpt(\u0027dir_permission\u0027,"},{"line_number":81,"context_line":"               help\u003d_(\"The permission that will be applied to the TFTP \""},{"line_number":82,"context_line":"                      \"folders upon creation. This should be set to the \""},{"line_number":83,"context_line":"                      \"permission such that the tftpserver has access to \""}],"source_content_type":"text/x-python","patch_set":11,"id":"ff0f0b1f_5e179eee","line":80,"updated":"2017-05-20 19:06:58.000000000","message":"Are we sure this works?\n\n $ mkdir foo\n $ python\n Python 2.7.13 (default, May 10 2017, 20:04:28)\n [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2\n Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n \u003e\u003e\u003e import os\n \u003e\u003e\u003e os.chmod(\"foo\", 755)\n \u003e\u003e\u003e\n $ ll -d foo\n d-wxrw--wt. 2 jlvillal jlvillal 4096 May 20 08:56 foo\n [jlvillal@6700k ironic]$ python\n Python 2.7.13 (default, May 10 2017, 20:04:28)\n [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2\n Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n \u003e\u003e\u003e import os\n \u003e\u003e\u003e os.chmod(\"foo\", 0o755)\n \u003e\u003e\u003e\n $ ll -d foo\n drwxr-xr-x. 2 jlvillal jlvillal 4096 May 20 08:56 foo","commit_id":"0f7a85e1ecd7b3e7bdbc297f47a498139ed40107"}],"ironic/tests/unit/common/test_pxe_utils.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5fdffc60b33f8264ebaf74539490e754b5e042b1","unresolved":false,"context_lines":[{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    @mock.patch(\u0027ironic.common.utils.write_to_file\u0027, autospec\u003dTrue)"},{"line_number":281,"context_line":"    @mock.patch(\u0027ironic.common.utils.render_template\u0027, autospec\u003dTrue)"},{"line_number":282,"context_line":"    @mock.patch(\u0027oslo_utils.fileutils.ensure_tree\u0027, autospec\u003dTrue)"},{"line_number":283,"context_line":"    def test_create_pxe_config(self, ensure_tree_mock, render_mock,"},{"line_number":284,"context_line":"                               write_mock):"},{"line_number":285,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a461143_fab53231","line":282,"updated":"2017-02-02 11:05:08.000000000","message":"Let\u0027s also assert that umask has been called and restored in the unittests, e.g:\n\n @mock.patch.object(os, \u0027umask\u0027, autospec\u003dTrue)\n def function(self, ..., umask_mock):\n     ...\n     umask_mock.return_value \u003d 0o777\n     ...\n     umask_calls \u003d [mock.call(0o000), mock.call(0o777)]\n     umask_mock.assert_has_calls(umask_calls)\n\n\n(ditto for the affected tests below as well)","commit_id":"d63c4b3cc2fc476de76a8c170dbc7c524096a4ce"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"76addff9a6d03029c33b725852925078c6b040b2","unresolved":false,"context_lines":[{"line_number":282,"context_line":"    @mock.patch(\u0027ironic.common.utils.write_to_file\u0027, autospec\u003dTrue)"},{"line_number":283,"context_line":"    @mock.patch(\u0027ironic.common.utils.render_template\u0027, autospec\u003dTrue)"},{"line_number":284,"context_line":"    @mock.patch(\u0027oslo_utils.fileutils.ensure_tree\u0027, autospec\u003dTrue)"},{"line_number":285,"context_line":"    def test_create_pxe_config(self, ensure_tree_mock, render_mock,"},{"line_number":286,"context_line":"                               write_mock, chmod_mock):"},{"line_number":287,"context_line":"        self.config(dir_permission\u003d0o755, group\u003d\u0027pxe\u0027)"},{"line_number":288,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da36d5c6_9dfd330b","line":285,"range":{"start_line":285,"start_character":4,"end_line":285,"end_character":67},"updated":"2017-02-27 14:56:28.000000000","message":"Nit: By default dir_permission is None, so firstly the basic test should be defined, like it was previously. Just adding some unittests with changing permissions makes sense","commit_id":"5b9c514faf722747d2bcbc5e585427ab1b944f7f"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"76f47a02ea0ed986099cd8c51531e1e7c5119f6b","unresolved":false,"context_lines":[{"line_number":282,"context_line":"    @mock.patch(\u0027ironic.common.utils.write_to_file\u0027, autospec\u003dTrue)"},{"line_number":283,"context_line":"    @mock.patch(\u0027ironic.common.utils.render_template\u0027, autospec\u003dTrue)"},{"line_number":284,"context_line":"    @mock.patch(\u0027oslo_utils.fileutils.ensure_tree\u0027, autospec\u003dTrue)"},{"line_number":285,"context_line":"    def test_create_pxe_config(self, ensure_tree_mock, render_mock,"},{"line_number":286,"context_line":"                               write_mock, chmod_mock):"},{"line_number":287,"context_line":"        self.config(dir_permission\u003d0o755, group\u003d\u0027pxe\u0027)"},{"line_number":288,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da36d5c6_755413ca","line":285,"range":{"start_line":285,"start_character":4,"end_line":285,"end_character":67},"in_reply_to":"da36d5c6_9dfd330b","updated":"2017-02-27 16:52:58.000000000","message":"+1 nit: Probably test names should be:\ntest_create_pxe_config   to test dir_permission\u003dNone\ntest_create_pxe_config_dir_permission   to test dir_permission setting","commit_id":"5b9c514faf722747d2bcbc5e585427ab1b944f7f"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"76f47a02ea0ed986099cd8c51531e1e7c5119f6b","unresolved":false,"context_lines":[{"line_number":340,"context_line":"    @mock.patch(\u0027ironic.common.utils.write_to_file\u0027, autospec\u003dTrue)"},{"line_number":341,"context_line":"    @mock.patch(\u0027ironic.common.utils.render_template\u0027, autospec\u003dTrue)"},{"line_number":342,"context_line":"    @mock.patch(\u0027oslo_utils.fileutils.ensure_tree\u0027, autospec\u003dTrue)"},{"line_number":343,"context_line":"    def test_create_pxe_config_dir_created(self, ensure_tree_mock,"},{"line_number":344,"context_line":"                                           render_mock,"},{"line_number":345,"context_line":"                                           write_mock, chmod_mock):"},{"line_number":346,"context_line":"        self.config(dir_permission\u003d0o755, group\u003d\u0027pxe\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da36d5c6_b216a156","line":343,"range":{"start_line":343,"start_character":35,"end_line":343,"end_character":42},"updated":"2017-02-27 16:52:58.000000000","message":"nit: it\u0027d be clearer if the test name were:\n\n  test_create_pxe_config_dirs_existed\n  test_create_pxe_config_dirs_prev_created","commit_id":"5b9c514faf722747d2bcbc5e585427ab1b944f7f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c6754eca70b1eed680de6ea44dc607fe6552b43c","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    def test_create_pxe_config_set_dir_permission(self, ensure_tree_mock,"},{"line_number":313,"context_line":"                                                  render_mock,"},{"line_number":314,"context_line":"                                                  write_mock, chmod_mock):"},{"line_number":315,"context_line":"        self.config(dir_permission\u003d0o755, group\u003d\u0027pxe\u0027)"},{"line_number":316,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":317,"context_line":"            pxe_utils.create_pxe_config(task, self.pxe_options,"},{"line_number":318,"context_line":"                                        CONF.pxe.pxe_config_template)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba2be162_69f6f3d8","line":315,"range":{"start_line":315,"start_character":35,"end_line":315,"end_character":40},"updated":"2017-02-28 21:37:01.000000000","message":"So we\u0027re setting an octal number instead of an integer number, which AIUI is what is expected for the mode change.  That being said, the configuration option is integer.  At a minimum, I think we really need to explicitly detail the format that the number is expected in in the configuration details.","commit_id":"e5e2cfb3371c1e2929aeec31ce8fdf5adb435ef2"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"cfc140b84c81fff5bb2be17b1245cd0d65c168a1","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                                             write_mock, chmod_mock):"},{"line_number":345,"context_line":"        self.config(dir_permission\u003d0o755, group\u003d\u0027pxe\u0027)"},{"line_number":346,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":347,"context_line":"            # NOTE: create the directories, this test the case when the"},{"line_number":348,"context_line":"            # directories are created by operators. We should not change"},{"line_number":349,"context_line":"            # the permission in the same case."},{"line_number":350,"context_line":"            pxe_temp_dir \u003d tempfile.mkdtemp()"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba2be162_c57adb76","line":347,"range":{"start_line":347,"start_character":49,"end_line":347,"end_character":53},"updated":"2017-03-03 04:29:29.000000000","message":"tests","commit_id":"43ed0bbbd2216f6a4c631c2ae78b459fc38e6dd4"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"665beba806a944048d1aefe3055109e48fef727e","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                                             write_mock, chmod_mock):"},{"line_number":345,"context_line":"        self.config(dir_permission\u003d0o755, group\u003d\u0027pxe\u0027)"},{"line_number":346,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":347,"context_line":"            # NOTE: create the directories, this test the case when the"},{"line_number":348,"context_line":"            # directories are created by operators. We should not change"},{"line_number":349,"context_line":"            # the permission in the same case."},{"line_number":350,"context_line":"            pxe_temp_dir \u003d tempfile.mkdtemp()"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_5141f638","line":347,"range":{"start_line":347,"start_character":49,"end_line":347,"end_character":53},"in_reply_to":"ba2be162_c57adb76","updated":"2017-05-19 04:55:31.000000000","message":"Removed this line to mock isdir as suggested by Yuriy.","commit_id":"43ed0bbbd2216f6a4c631c2ae78b459fc38e6dd4"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"54b4b199b1c25a7f6dc0da41af2a1ed4eddfc2f1","unresolved":false,"context_lines":[{"line_number":350,"context_line":"            pxe_temp_dir \u003d tempfile.mkdtemp()"},{"line_number":351,"context_line":"            self.config(tftp_root\u003dpxe_temp_dir, group\u003d\u0027pxe\u0027)"},{"line_number":352,"context_line":"            node_dir \u003d os.path.join(CONF.pxe.tftp_root, self.node.uuid)"},{"line_number":353,"context_line":"            os.mkdir(node_dir)"},{"line_number":354,"context_line":"            pxe_dir \u003d os.path.join(CONF.pxe.tftp_root, \u0027pxelinux.cfg\u0027)"},{"line_number":355,"context_line":"            os.mkdir(pxe_dir)"},{"line_number":356,"context_line":"            pxe_utils.create_pxe_config(task, self.pxe_options,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_b193e9f9","line":353,"updated":"2017-03-07 12:44:09.000000000","message":"IMO better mock os.path.isdir instead of creating real directory here, even if will be cleaned by fixture in normal test execution.","commit_id":"43ed0bbbd2216f6a4c631c2ae78b459fc38e6dd4"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"665beba806a944048d1aefe3055109e48fef727e","unresolved":false,"context_lines":[{"line_number":350,"context_line":"            pxe_temp_dir \u003d tempfile.mkdtemp()"},{"line_number":351,"context_line":"            self.config(tftp_root\u003dpxe_temp_dir, group\u003d\u0027pxe\u0027)"},{"line_number":352,"context_line":"            node_dir \u003d os.path.join(CONF.pxe.tftp_root, self.node.uuid)"},{"line_number":353,"context_line":"            os.mkdir(node_dir)"},{"line_number":354,"context_line":"            pxe_dir \u003d os.path.join(CONF.pxe.tftp_root, \u0027pxelinux.cfg\u0027)"},{"line_number":355,"context_line":"            os.mkdir(pxe_dir)"},{"line_number":356,"context_line":"            pxe_utils.create_pxe_config(task, self.pxe_options,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_1136dee7","line":353,"in_reply_to":"9a30ddce_b193e9f9","updated":"2017-05-19 04:55:31.000000000","message":"Done","commit_id":"43ed0bbbd2216f6a4c631c2ae78b459fc38e6dd4"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"54b4b199b1c25a7f6dc0da41af2a1ed4eddfc2f1","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            node_dir \u003d os.path.join(CONF.pxe.tftp_root, self.node.uuid)"},{"line_number":353,"context_line":"            os.mkdir(node_dir)"},{"line_number":354,"context_line":"            pxe_dir \u003d os.path.join(CONF.pxe.tftp_root, \u0027pxelinux.cfg\u0027)"},{"line_number":355,"context_line":"            os.mkdir(pxe_dir)"},{"line_number":356,"context_line":"            pxe_utils.create_pxe_config(task, self.pxe_options,"},{"line_number":357,"context_line":"                                        CONF.pxe.pxe_config_template)"},{"line_number":358,"context_line":"            render_mock.assert_called_with("}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_f1bba173","line":355,"updated":"2017-03-07 12:44:09.000000000","message":"ditto","commit_id":"43ed0bbbd2216f6a4c631c2ae78b459fc38e6dd4"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"665beba806a944048d1aefe3055109e48fef727e","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            node_dir \u003d os.path.join(CONF.pxe.tftp_root, self.node.uuid)"},{"line_number":353,"context_line":"            os.mkdir(node_dir)"},{"line_number":354,"context_line":"            pxe_dir \u003d os.path.join(CONF.pxe.tftp_root, \u0027pxelinux.cfg\u0027)"},{"line_number":355,"context_line":"            os.mkdir(pxe_dir)"},{"line_number":356,"context_line":"            pxe_utils.create_pxe_config(task, self.pxe_options,"},{"line_number":357,"context_line":"                                        CONF.pxe.pxe_config_template)"},{"line_number":358,"context_line":"            render_mock.assert_called_with("}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_d14d0673","line":355,"in_reply_to":"9a30ddce_f1bba173","updated":"2017-05-19 04:55:31.000000000","message":"Done","commit_id":"43ed0bbbd2216f6a4c631c2ae78b459fc38e6dd4"}],"releasenotes/notes/fix-dir-permissions-bc56e83a651bbdb0.yaml":[{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"3dc692c08ab6c17fa9f6d0c160239654ac1bed25","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"issues:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The node\u0027s and PXE configuration directories were created with wrong"},{"line_number":5,"context_line":"    permission. This is due to system umask setting which overrides the"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"1a430d35_db3f5fd4","line":2,"updated":"2017-02-06 15:31:34.000000000","message":"issues section is to define known issues introduced by this patch. Please remove it.","commit_id":"8e1bf56cb3d21f27b84d0e0255e045a310c99651"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"f46349ef1ba62600e444b396ddf826bea41d1899","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"issues:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The node\u0027s and PXE configuration directories were created with wrong"},{"line_number":5,"context_line":"    permission. This is due to system umask setting which overrides the"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"fa31d9ce_e984ee0b","line":2,"in_reply_to":"1a430d35_db3f5fd4","updated":"2017-02-15 07:08:02.000000000","message":"Done","commit_id":"8e1bf56cb3d21f27b84d0e0255e045a310c99651"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"3dc692c08ab6c17fa9f6d0c160239654ac1bed25","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    BM can\u0027t get deploy_kernel and ramdisk from tftpserver."},{"line_number":8,"context_line":"fixes:"},{"line_number":9,"context_line":"  - |"},{"line_number":10,"context_line":"    This fixes the issue of directories with wrong permission by overriding the"},{"line_number":11,"context_line":"    system umask setting and explicitly passing the desired permission 0755 to"},{"line_number":12,"context_line":"    the fileutils.ensure_tree method which creates the directory. After the"},{"line_number":13,"context_line":"    directories are created we restore the system\u0027s umask."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"1a430d35_3636bae6","line":10,"range":{"start_line":10,"start_character":4,"end_line":10,"end_character":5},"updated":"2017-02-06 15:31:34.000000000","message":"might be: \"Fix tftpboot/\u003cuuid\u003e directory permissions to be 755 to allow tftp process to read the files.\" ?","commit_id":"8e1bf56cb3d21f27b84d0e0255e045a310c99651"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"f46349ef1ba62600e444b396ddf826bea41d1899","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    BM can\u0027t get deploy_kernel and ramdisk from tftpserver."},{"line_number":8,"context_line":"fixes:"},{"line_number":9,"context_line":"  - |"},{"line_number":10,"context_line":"    This fixes the issue of directories with wrong permission by overriding the"},{"line_number":11,"context_line":"    system umask setting and explicitly passing the desired permission 0755 to"},{"line_number":12,"context_line":"    the fileutils.ensure_tree method which creates the directory. After the"},{"line_number":13,"context_line":"    directories are created we restore the system\u0027s umask."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"fa31d9ce_098062f4","line":10,"range":{"start_line":10,"start_character":4,"end_line":10,"end_character":5},"in_reply_to":"1a430d35_3636bae6","updated":"2017-02-15 07:08:02.000000000","message":"Done","commit_id":"8e1bf56cb3d21f27b84d0e0255e045a310c99651"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"60a4fd34a37d3114221f08f47e05c12ee433fcd3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Fix tftpboot/\u003cuuid\u003e directory permissions to be 755 to allow"},{"line_number":5,"context_line":"    tftp process to read the files."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"fa31d9ce_41293b89","line":3,"range":{"start_line":3,"start_character":3,"end_line":3,"end_character":5},"updated":"2017-02-15 15:36:07.000000000","message":"Erase this empty line, please :)","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"45eb41f44cd8c2da44c12f729aa7d9f3864a71ba","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Fix tftpboot/\u003cuuid\u003e directory permissions to be 755 to allow"},{"line_number":5,"context_line":"    tftp process to read the files."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"da36d5c6_c1a2d44a","line":3,"range":{"start_line":3,"start_character":3,"end_line":3,"end_character":5},"in_reply_to":"fa31d9ce_41293b89","updated":"2017-02-23 07:19:05.000000000","message":"Done","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"277358b8a338439ba08f5edd1d90e085091f4213","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Fix tftpboot/\u003cuuid\u003e directory permissions to be 755 to allow"},{"line_number":5,"context_line":"    tftp process to read the files."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"fa31d9ce_d67ce1ed","line":4,"range":{"start_line":4,"start_character":52,"end_line":4,"end_character":55},"updated":"2017-02-16 14:00:36.000000000","message":"Suggesting explicit permissions is a bad idea.","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"277358b8a338439ba08f5edd1d90e085091f4213","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Fix tftpboot/\u003cuuid\u003e directory permissions to be 755 to allow"},{"line_number":5,"context_line":"    tftp process to read the files."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"fa31d9ce_f6fc8574","line":4,"range":{"start_line":4,"start_character":4,"end_line":4,"end_character":7},"updated":"2017-02-16 14:00:36.000000000","message":"s/Fix/Fixes/","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"45eb41f44cd8c2da44c12f729aa7d9f3864a71ba","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Fix tftpboot/\u003cuuid\u003e directory permissions to be 755 to allow"},{"line_number":5,"context_line":"    tftp process to read the files."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"da36d5c6_e18b58c1","line":4,"range":{"start_line":4,"start_character":4,"end_line":4,"end_character":7},"in_reply_to":"fa31d9ce_f6fc8574","updated":"2017-02-23 07:19:05.000000000","message":"Done","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"277358b8a338439ba08f5edd1d90e085091f4213","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"fa31d9ce_5621d1b3","line":6,"updated":"2017-02-16 14:00:36.000000000","message":"How about \"Adds the capability for an operator to explicitly define the permission for created tftpboot folders. This provides the ability for ironic to be utilized with a restrictive umask, where the tftp server may not be able to read the file.\" ?\n\nAlso, we should link to the bug.","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"45eb41f44cd8c2da44c12f729aa7d9f3864a71ba","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"da36d5c6_2192d0f6","line":6,"in_reply_to":"fa31d9ce_5621d1b3","updated":"2017-02-23 07:19:05.000000000","message":"I don\u0027t see any other release note that links to the bug.","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"e0b97036016b7e1f07c793282cc9dbb3f75b3550","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"fa31d9ce_5b62c3ae","line":6,"in_reply_to":"fa31d9ce_5621d1b3","updated":"2017-02-17 00:18:04.000000000","message":"I think the new config option proposed should be mentioned here.","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"45eb41f44cd8c2da44c12f729aa7d9f3864a71ba","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"da36d5c6_81c37cec","line":6,"in_reply_to":"fa31d9ce_5b62c3ae","updated":"2017-02-23 07:19:05.000000000","message":"Done","commit_id":"ffe12ce97719be0d9209c72d4480100e2f30e04c"}]}
