Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allows you to specify the ip spice/vnc listens on #100

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
84f8ac1
allows you to specify the ip spice/vnc listens on
joshie Jul 16, 2012
203cf1f
Merge pull request #164 from nshalman/update-grub-config
JohnSonnenschein Jan 18, 2013
dc1405c
OS-1669 make it possible to rotate log for running VM.js process
joshwilsdon Jan 22, 2013
1918ca1
OS-1831 update platform bunyan to 0.18.1
joshwilsdon Jan 23, 2013
1b431c9
OS-1839: Improve imgadm install message
Jan 24, 2013
c89b8c0
OS-1798 ON build should use pkgsrc python
rmustacc Jan 28, 2013
3c5883a
OS-1842 switch to Logger.child() for VM actions.
joshwilsdon Jan 29, 2013
84afd2a
OS-1848 + OS-1849 fix validation on create-snapshot, fix tests for KVM.
joshwilsdon Feb 1, 2013
e6fa542
OS-1862 fix documentation for tests.
joshwilsdon Feb 5, 2013
e5047a1
OS-1813 include files from /opt/custom/etc/rsyslog.d/ to extend rsysl…
joshwilsdon Feb 5, 2013
5cc7c24
OS-1895 fix problems updating tmpfs when tmpfs size not specified at …
joshwilsdon Feb 12, 2013
c0125d6
OS-1881 force max_swap to always be >= 256M
joshwilsdon Feb 12, 2013
6dd72b5
OS-1864 don't accept invalid IP addresses.
joshwilsdon Feb 12, 2013
ee498b5
OS-1900 fix dtrace-provider.js so correct binding is loaded.
joshwilsdon Feb 12, 2013
32ff83f
OS-1902 fix problems with transition provisioning -> running when usi…
joshwilsdon Feb 13, 2013
1648ce2
OS-1900 add test to ensure dtrace-provider keeps working correctly.
joshwilsdon Feb 13, 2013
29bcd96
OS-1903 add support for tracing timers in vmadmd.
joshwilsdon Feb 13, 2013
818bed5
OS-1851 + OS-1730 VM.reboot should wait until zone is rebooted before…
joshwilsdon Feb 13, 2013
16ba9b7
Merge branch 'listen_ip' of github.com:joshie/smartos-live into liste…
joshie Feb 14, 2013
c121908
allows you to specify the ip spice/vnc listens on
joshie Feb 14, 2013
29f35a3
Merge branch 'listen-ip' into listen_ip
joshie Feb 14, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function source_vars
function install_pkgin
{
for pkg in gmake binutils autoconf automake bison flex libtool-base \
python24 libxslt gcc-compiler sun-jre6 sun-jdk6 gmp \
python26 py26-expat libxslt gcc-compiler sun-jre6 sun-jdk6 gmp \
mpfr nodejs p5-XML-Parser gettext; do
if ! pkg_info -qe $pkg; then
$conf_priv pkgin -y install $pkg || fatal \
Expand Down Expand Up @@ -262,6 +262,7 @@ __GNUC4=""; export __GNUC4
JAVA_ROOT=/opt/local/java/sun6; export JAVA_ROOT
FLEX=/opt/local/bin/flex; export FLEX
GNUXGETTEXT=/opt/local/bin/xgettext; export GNUXGETTEXT
PYTHON_26=/opt/local/bin/python2.6; export PYTHON_26
EOF
[[ $? -eq 0 ]] || fatal "failed to write illumos nightly env file"
}
Expand Down
3 changes: 3 additions & 0 deletions overlay/generic/etc/rsyslog.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ mail.debug /var/log/syslog

auth.info /var/log/auth.log
mail.info /var/log/postfix.log

# Include files from /opt/custom/etc/rsyslog.d if it exists
$IncludeConfig /opt/custom/etc/rsyslog.d/
7 changes: 6 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ install: all
$(PREFIX_NODE)/node_modules/zutil/build/Release
cp $(EXPAT.NODE) $(PREFIX_NODE)/node_modules/expat_binding.node
cp $(DTRACE_PROVIDER.NODE) $(PREFIX_NODE)/node_modules/dtrace-provider.node
sed -e "s|require('./build.*DTraceProviderBindings')|require('/usr/node/node_modules/dtrace-provider.node')|" \
< $(DTRACE_PROVIDER_SRCDIR)/dtrace-provider.js \
> $(PREFIX_NODE)/node_modules/dtrace-provider.js
sed -e "s|var expat.*;|var expat = require('./expat_binding');|" \
< node-expat/lib/node-expat.js \
> $(PREFIX_NODE)/node_modules/node-expat.js
Expand All @@ -355,7 +358,9 @@ install: all
$(DESTDIR)/usr/vm/sbin/add-userscript
mv $(DESTDIR)/usr/vm/sbin/metadata.js $(DESTDIR)/usr/vm/sbin/metadata
mkdir -p $(DESTDIR)/usr/share/man/man1
cp node-bunyan/lib/bunyan.js $(PREFIX_NODE)/node_modules/bunyan.js
sed -e "s|require('dtrace-provider')|require('/usr/node/node_modules/dtrace-provider')|" \
< node-bunyan/lib/bunyan.js \
> $(PREFIX_NODE)/node_modules/bunyan.js
cp node-bunyan/docs/bunyan.1 $(DESTDIR)/usr/share/man/man1/bunyan.1
mkdir -p $(DESTDIR)/usr/bin
sed -e 's|^#!/usr/bin/env node.*$$|#!/usr/node/bin/node|' \
Expand Down
4 changes: 2 additions & 2 deletions src/img/node_modules/imgadm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ d usr/node/0.8 0555 root bin
d usr/node/0.8/node_modules 0555 root bin
f usr/node/0.8/node_modules/async.js 0444 root bin
f usr/node/0.8/node_modules/disklayout.js 0444 root bin
f usr/node/0.8/node_modules/dtrace-provider.js 0444 root bin
f usr/node/0.8/node_modules/dtrace-provider.node 0444 root bin
f usr/node/0.8/node_modules/getopt.js 0444 root bin
f usr/node/0.8/node_modules/kstat.node 0444 root bin
Expand Down
1 change: 1 addition & 0 deletions src/node-bunyan/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Dave Pacheco <dap@joyent.com> (https://github.com/davepacheco)
Michael Hart (https://github.com/mhart)
Isaac Schlueter (https://github.com/isaacs)
Rob Gulewich (https://github.com/rgulewich)
Bryan Cantrill (https://github.com/bcantrill)
226 changes: 224 additions & 2 deletions src/node-bunyan/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,227 @@
# bunyan Changelog

Known issues:

- [issue #58] Can't install to a dir with spaces. This is [this node-gyp
bug](https://github.com/TooTallNate/node-gyp/issues/65).


## bunyan 0.18.1

- Get the `bunyan` CLI to **not** automatically page (i.e. pipe to `less`)
if stdin isn't a TTY, or if following dtrace probe output (via `-p PID`),
or if not given log file arguments.


## bunyan 0.18.0

- Automatic paging support in the `bunyan` CLI (similar to `git log` et al).
IOW, `bunyan` will open your pager (by default `less`) and pipe rendered
log output through it. A main benefit of this is getting colored logs with
a pager without the pain. Before you had to explicit use `--color` to tell
bunyan to color output when the output was not a TTY:

bunyan foo.log --color | less -R # before
bunyan foo.log # now

Disable with the `--no-pager` option or the `BUNYAN_NO_PAGER=1` environment
variable.

Limitations: Only supported for node >=0.8. Windows is not supported (at
least not yet).

- Switch test suite to nodeunit (still using a node-tap'ish API via
a helper).


## bunyan 0.17.0

- [issue #33] Log rotation support:

var bunyan = require('bunyan');
var log = bunyan.createLogger({
name: 'myapp',
streams: [{
type: 'rotating-file',
path: '/var/log/myapp.log',
count: 7,
period: 'daily'
}]
});


- Tweak to CLI default pretty output: don't special case "latency" field.
The special casing was perhaps nice, but less self-explanatory.
Before:

[2012-12-27T21:17:38.218Z] INFO: audit/45769 on myserver: handled: 200 (15ms, audit=true, bar=baz)
GET /foo
...

After:

[2012-12-27T21:17:38.218Z] INFO: audit/45769 on myserver: handled: 200 (audit=true, bar=baz, latency=15)
GET /foo
...

- *Exit* CLI on EPIPE, otherwise we sit there useless processing a huge log
file with, e.g. `bunyan huge.log | head`.


## bunyan 0.16.8

- Guards on `-c CONDITION` usage to attempt to be more user friendly.
Bogus JS code will result in this:

$ bunyan portal.log -c 'this.req.username==boo@foo'
bunyan: error: illegal CONDITION code: SyntaxError: Unexpected token ILLEGAL
CONDITION script:
Object.prototype.TRACE = 10;
Object.prototype.DEBUG = 20;
Object.prototype.INFO = 30;
Object.prototype.WARN = 40;
Object.prototype.ERROR = 50;
Object.prototype.FATAL = 60;
this.req.username==boo@foo
Error:
SyntaxError: Unexpected token ILLEGAL
at new Script (vm.js:32:12)
at Function.Script.createScript (vm.js:48:10)
at parseArgv (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:465:27)
at main (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1252:16)
at Object.<anonymous> (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1330:3)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)

And all CONDITION scripts will be run against a minimal valid Bunyan
log record to ensure they properly guard against undefined values
(at least as much as can reasonably be checked). For example:

$ bunyan portal.log -c 'this.req.username=="bob"'
bunyan: error: CONDITION code cannot safely filter a minimal Bunyan log record
CONDITION script:
Object.prototype.TRACE = 10;
Object.prototype.DEBUG = 20;
Object.prototype.INFO = 30;
Object.prototype.WARN = 40;
Object.prototype.ERROR = 50;
Object.prototype.FATAL = 60;
this.req.username=="bob"
Minimal Bunyan log record:
{
"v": 0,
"level": 30,
"name": "name",
"hostname": "hostname",
"pid": 123,
"time": 1355514346206,
"msg": "msg"
}
Filter error:
TypeError: Cannot read property 'username' of undefined
at bunyan-condition-0:7:9
at Script.Object.keys.forEach.(anonymous function) [as runInNewContext] (vm.js:41:22)
at parseArgv (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:477:18)
at main (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1252:16)
at Object.<anonymous> (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1330:3)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)

A proper way to do that condition would be:

$ bunyan portal.log -c 'this.req && this.req.username=="bob"'



## bunyan 0.16.7

- [issue #59] Clear a possibly interrupted ANSI color code on signal
termination.


## bunyan 0.16.6

- [issue #56] Support `bunyan -p NAME` to dtrace all PIDs matching 'NAME' in
their command and args (using `ps -A -o pid,command | grep NAME` or, on SunOS
`pgrep -lf NAME`). E.g.:

bunyan -p myappname

This is useful for usage of node's [cluster
module](http://nodejs.org/docs/latest/api/all.html#all_cluster) where you'll
have multiple worker processes.


## bunyan 0.16.5

- Allow `bunyan -p '*'` to capture bunyan dtrace probes from **all** processes.
- issue #55: Add support for `BUNYAN_NO_COLOR` environment variable to
turn off all output coloring. This is still overridden by the `--color`
and `--no-color` options.


## bunyan 0.16.4

- issue #54: Ensure (again, see 0.16.2) that stderr from the dtrace child
process (when using `bunyan -p PID`) gets through. There had been a race
between exiting bunyan and the flushing of the dtrace process' stderr.


## bunyan 0.16.3

- Drop 'trentm-dtrace-provider' fork dep now that
<https://github.com/chrisa/node-dtrace-provider/pull/24> has been resolved.
Back to dtrace-provider.


## bunyan 0.16.2

- Ensure that stderr from the dtrace child process (when using `bunyan -p PID`)
gets through. The `pipe` usage wasn't working on SmartOS. This is important
to show the user if they need to 'sudo'.


## bunyan 0.16.1

- Ensure that a possible dtrace child process (with using `bunyan -p PID`) is
terminated on signal termination of the bunyan CLI (at least for SIGINT,
SIGQUIT, SIGTERM, SIGHUP).


## bunyan 0.16.0

- Add `bunyan -p PID` support. This is a convenience wrapper that effectively
calls:

dtrace -x strsize=4k -qn 'bunyan$PID:::log-*{printf("%s", copyinstr(arg0))}' | bunyan


## bunyan 0.15.0

- issue #48: Dtrace support! The elevator pitch is you can watch all logging
from all Bunyan-using process with something like this:

dtrace -x strsize=4k -qn 'bunyan*:::log-*{printf("%d: %s: %s", pid, probefunc, copyinstr(arg0))}'

And this can include log levels *below* what the service is actually configured
to log. E.g. if the service is only logging at INFO level and you need to see
DEBUG log messages, with this you can. Obviously this only works on dtrace-y
platforms: Illumos derivatives of SunOS (e.g. SmartOS, OmniOS), Mac, FreeBSD.

Or get the bunyan CLI to render logs nicely:

dtrace -x strsize=4k -qn 'bunyan*:::log-*{printf("%s", copyinstr(arg0))}' | bunyan

See <https://github.com/trentm/node-bunyan#dtrace-support> for details. By
Bryan Cantrill.


## bunyan 0.14.6

- Export `bunyan.safeCycles()`. This may be useful for custom `type == "raw"`
Expand All @@ -17,8 +239,8 @@
# After
var childLog = log.child({..., level: 'debug'});

- Improve the crash message to make it easier to provide relevant details in a
bug report.
- Improve the Bunyan CLI crash message to make it easier to provide relevant
details in a bug report.


## bunyan 0.14.5
Expand Down
23 changes: 23 additions & 0 deletions src/node-bunyan/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This is the MIT license

Copyright (c) 2011-2012 Joyent Inc.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Loading