Skip to content

falcon-lab: validate smf log file better - #1008

Open
taspelund wants to merge 1 commit into
mainfrom
trey/falcon-lab-log
Open

taspelund wants to merge 1 commit into
mainfrom
trey/falcon-lab-log

Conversation

@taspelund

Copy link
Copy Markdown
Contributor

On illumos nodes, svcs -L is used to find the log file for diagnostic collection. However, if the service doesn't exist the error message returned has an uneven number of quotes in it.
e.g.

Pattern 'dendrite' doesn't match any instances

If this string is passed to another command on the tty, it leaves the shell hanging while it waits for the ending quote.

This ensures we discard stderr and only accept stdout if the leading character is '/', since svcs -L returns an absolute filepath.

On illumos nodes, `svcs -L` is used to find the log file for diagnostic
collection. However, if the service doesn't exist the error message
returned has an uneven number of quotes in it.
e.g.
```
Pattern 'dendrite' doesn't match any instances
```

If this string is passed to another command on the tty, it leaves the
shell hanging while it waits for the ending quote.

This ensures we discard stderr and only accept stdout if the leading
character is '/', since `svcs -L` returns an absolute filepath.

Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug CI rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants