[ARVADOS] updated: 8513e042b0033599146546bd3a2ad903c67c9ff5

Git user git at public.curoverse.com
Thu Mar 16 10:02:10 EDT 2017


Summary of changes:
 services/crunch-run/crunchrun.go | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

       via  8513e042b0033599146546bd3a2ad903c67c9ff5 (commit)
      from  1230d8a106c5c62edcbb9fcf6d1b94585e5596b2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 8513e042b0033599146546bd3a2ad903c67c9ff5
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Thu Mar 16 11:01:19 2017 -0300

    10218: Split multi-line command output so that each line is written to the logs independently.

diff --git a/services/crunch-run/crunchrun.go b/services/crunch-run/crunchrun.go
index 88c93e5..f71ec4d 100644
--- a/services/crunch-run/crunchrun.go
+++ b/services/crunch-run/crunchrun.go
@@ -533,6 +533,7 @@ func (runner *ContainerRunner) LogNodeInfo() (err error) {
 		newInfoCommand("Disk Space", "df -m"),
 	}
 
+	// Run commands with informational output to be logged.
 	var out []byte
 	for _, command := range commands {
 		out, err = exec.Command(command.command, command.args...).Output()
@@ -540,7 +541,10 @@ func (runner *ContainerRunner) LogNodeInfo() (err error) {
 			return fmt.Errorf("While running command '%s': %v",
 				command.command, err)
 		}
-		logger.Printf("%s:\n%s\n", command.label, out)
+		logger.Println(command.label)
+		for _, line := range strings.Split(string(out), "\n") {
+			logger.Println(" ", line)
+		}
 	}
 
 	err = w.Close()

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list