Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

log commands and stdout/stderr #48

Closed
rn opened this issue Jul 13, 2017 · 7 comments
Closed

log commands and stdout/stderr #48

rn opened this issue Jul 13, 2017 · 7 comments
Assignees

Comments

@rn
Copy link
Contributor

rn commented Jul 13, 2017

I was debugging an issue with LCOW and it seems that gcs is shelling out to a number of commands inside the utility VM. It would be useful for debug if the code would log:

  • the full command line of commands executed
  • the stdout and stderr of the command
@jterry75
Copy link
Contributor

jterry75 commented Aug 7, 2017

@jhowardmsft - You said docker will show you these logs? How can @rn view them or am I missing that these are different commands than what you thought I had said offline.

Otherwise will use an io.MultiWriter here

@lowenna
Copy link
Contributor

lowenna commented Aug 7, 2017

Certainly the command being executed itslogged in full when the daemon is run in debug mode (dockerd -D)

eg (just a couple)

DEBU[2017-08-07T13:21:47.207258300-07:00] opengcs: RunProcess: ls /sys/bus/scsi/devices/0:0:0:3/block

DEBU[2017-08-07T13:21:47.236063500-07:00] opengcs: RunProcess: mkfs.ext4 -q -E lazy_itable_init=1 -O ^has_journal,sparse_super2,uninit_bg,^resize_inode /dev/sdb

@rn
Copy link
Contributor Author

rn commented Aug 7, 2017

I may have missed that in the busy debug logs. Do you know if the output of the commands is also avail?

@lowenna
Copy link
Contributor

lowenna commented Aug 7, 2017

@rn no, it's not. What commands specifically are you interested in?

@rn
Copy link
Contributor Author

rn commented Aug 7, 2017

just in general. It's hard to predict which command may fail :)

It would have helped debugging in the past if I had gotten the error messages, Most/all of the commands are very quiet so it shouldn't log much.

@lowenna
Copy link
Contributor

lowenna commented Aug 7, 2017

I think failures do log the output. Maybe they didn't in earlier incantations of the code. True, most are quiet, but it should be obvious from the logs if a command does fail. I'm concerned about universally adding it though (success cases). Esp for tar2vhd/vhd2tar.

@rn
Copy link
Contributor Author

rn commented Aug 7, 2017

OK. I don't recall if I saw something in the daemon logs or not. Let me close this for now as the commands themselves are logged and if I hit an issue again I may re-open with additional info.

@rn rn closed this as completed Aug 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants