Closed trentm closed 7 years ago
I'm going to opt for 2. for now since it's the easiest change and will test it. I'll look into 1. if the issue isn't solved.
using exec 4<>> $LOG
causes an error:
/lib/smartdc/common.lib: line 10: syntax error near unexpected token `>'
/lib/smartdc/common.lib: line 10: `exec 4<>> $LOG'
/lib/smartdc/mdata-fetch: line 21: smartdc_info: command not found
/lib/smartdc/mdata-fetch: line 23: user-data: command not found
/lib/smartdc/mdata-fetch: line 34: smartdc_fatal: command not found
/lib/smartdc/mdata-fetch: line 38: smartdc_info: command not found
/lib/smartdc/mdata-fetch: line 39: user-script: command not found
/lib/smartdc/mdata-fetch: line 51: smartdc_fatal: command not found
/lib/smartdc/mdata-fetch: line 55: smartdc_info: command not found
/lib/smartdc/mdata-fetch: line 56: sdc:operator-script: command not found
/lib/smartdc/mdata-fetch: line 68: smartdc_fatal: command not found
.
.
.
Moving the redirect to "triton.log" in joyent_rc.local instead of in common.lib seems to be the better way to go so far.
I have a proposed fix that I will be testing today: https://github.com/joyent/sdc-vmtools-lx-brand/pull/25
"/lib/smartdc/common.lib" has this:
Most of the boot scripts in /lib/smartdc are sourcing common.lib. That's resulting in multiple processes overwriting triton.log such that content is lost. Here is an example showing messed up results: https://gist.github.com/trentm/6702d5d81a5d3816ba5ee9062546ee07
The suggestions from discussion were to do one of:
exec 4<>> $LOG
to append