SLIDER-559. Ensure Slider generated log files are readable by NM log aggregators
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/714a335d Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/714a335d Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/714a335d Branch: refs/heads/feature/SLIDER-460-stderr Commit: 714a335df9d93b93e5cc4f49ea4fc5c3b1e3c07c Parents: 3abc54f Author: Sumit Mohanty <smoha...@hortonworks.com> Authored: Wed Oct 22 15:55:19 2014 -0700 Committer: Sumit Mohanty <smoha...@hortonworks.com> Committed: Wed Oct 22 15:55:19 2014 -0700 ---------------------------------------------------------------------- slider-agent/src/main/python/agent/CustomServiceOrchestrator.py | 2 +- .../src/test/python/agent/TestCustomServiceOrchestrator.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/714a335d/slider-agent/src/main/python/agent/CustomServiceOrchestrator.py ---------------------------------------------------------------------- diff --git a/slider-agent/src/main/python/agent/CustomServiceOrchestrator.py b/slider-agent/src/main/python/agent/CustomServiceOrchestrator.py index 7b49a67..c632293 100644 --- a/slider-agent/src/main/python/agent/CustomServiceOrchestrator.py +++ b/slider-agent/src/main/python/agent/CustomServiceOrchestrator.py @@ -239,7 +239,7 @@ class CustomServiceOrchestrator(): self.finalize_command(command, store_command, allocated_ports) with os.fdopen(os.open(file_path, os.O_WRONLY | os.O_CREAT, - 0600), 'w') as f: + 0644), 'w') as f: content = json.dumps(command, sort_keys=False, indent=4) f.write(content) return file_path http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/714a335d/slider-agent/src/test/python/agent/TestCustomServiceOrchestrator.py ---------------------------------------------------------------------- diff --git a/slider-agent/src/test/python/agent/TestCustomServiceOrchestrator.py b/slider-agent/src/test/python/agent/TestCustomServiceOrchestrator.py index 2fb1611..92bc043 100644 --- a/slider-agent/src/test/python/agent/TestCustomServiceOrchestrator.py +++ b/slider-agent/src/test/python/agent/TestCustomServiceOrchestrator.py @@ -86,7 +86,7 @@ class TestCustomServiceOrchestrator(TestCase): json_file = orchestrator.dump_command_to_json(command, {}) self.assertTrue(os.path.exists(json_file)) self.assertTrue(os.path.getsize(json_file) > 0) - self.assertEqual(oct(os.stat(json_file).st_mode & 0777), '0600') + self.assertEqual(oct(os.stat(json_file).st_mode & 0777), '0644') self.assertTrue(json_file.endswith("command-3.json")) os.unlink(json_file)