Commit Graph
16 Commits
Author SHA1 Message Date
Angus Lees 9c95ed5f6f Don't misinterpret command output as string format
Previous code tried to interpret the string output as a `fmt.Sprintf`
string formatter, mangling `%` into `%!(MISSING)`, etc.

Thanks to go, I don't belive these are exploitable (unlike the similar
error in C).

Since this seemed to be a common error in the codebase, I did a quick
audit by visually inspecting the results of `git grep 'f([^"]'`.  I
don't have a good suggestion for automated tests to prevent this in
future :(

Example error (look for `(MISSING)`):
```
E0927 05:31:07.618429   11227 driver-call.go:237] Failed to unmarshal output for command: unmount, output: "2018-09-27 05:31:07.191711 I | exec: Running command: df --type ceph /var/lib/kubelet/pods/95461479-c216-11e8-bcf0-02030782ac80/volumes/ceph.rook.io~rook/oe-scratch\n2018-09-27 05:46:43.808596 I | Filesystem                                                 1K-blocks     Used Available Use%!M(MISSING)ounted on\n2018-09-27 05:46:43.808659 I | 10.107.25.147:6790,10.109.173.79:6790,10.104.85.255:6790:/ 151678976 49410048 102268928  33%!/(MISSING)var/lib/kubelet/pods/95461479-c216-11e8-bcf0-02030782ac80/volumes/ceph.rook.io~rook/oe-scratch\n{\"status\":\"Success\"}\n", error: invalid character '-' after top-level value
```

Signed-off-by: Angus Lees <gus@inodes.org>
2018-10-15 15:59:13 +11:00
Jared Watts 6a2e20aaa8 include stderr output in CommandError.Error() output
Signed-off-by: Jared Watts <jbw976@gmail.com>
2018-03-28 13:26:00 -07:00
Steve Leon b4279e06fb Rook plugin for Kubernetes implemented as flexvolume
- Operator is deployed under namespace rook-system
- Operator deploys rook-agent on all nodes as daemonset also on
  rook-system
- Rook-agent installs flexvolume driver on hosts
- Rook-agent listens on unix socket for driver requests
- Rook-agent perform attach/detach on its node
- Rook-agent creates/delete CRD volumeattach objects
- Added fencing to support ROX and RWO
- Added unit and integration tests
- Updated examples and docks

fixes #432
2017-10-09 09:14:08 -07:00
Travis Nielsen ec181c0390 logs: stop writing the frequent health check 2017-08-07 10:58:52 -07:00
Travis Nielsen cb5741989b log all output of commands executed with an output file 2017-06-21 11:29:14 -07:00
Jared Watts 585501b925 use an output file when invoking ceph commands to isolate the payload from any logging 2017-06-20 20:57:46 -07:00
Travis Nielsen 0a035ed402 support for RBD images, all api tests passing
RBD image support fixes, ensure /etc/ceph is created in toolbox image, return output string in exec even for errors because the ceph tools return useful information there upon error
2017-06-20 20:57:46 -07:00
Travis Nielsen 58aa72a254 remove dependency on bash 2017-05-05 12:25:31 -07:00
Jared Watts e5cca80654 Operator and cephmgr support for specifying storage resources and configuration 2017-04-04 15:32:49 -07:00
Michael Goff 4870f951f0 cli and rgw: Added support for list, create, update, get, and delete users as well as listing buckets. Updated connection info to be for a user. 2017-02-08 09:50:19 -08:00
Travis Nielsen 1d2cca0a26 check if process is being monitored before starting a new process 2016-12-16 09:11:26 -08:00
Travis Nielsen cd21a158d8 log child process output with specific log id 2016-11-18 22:45:21 -08:00
Jared Watts 0e00f57758 Migrate logging package from built-in to github.com/coreos/capnslog, allow user specified logging level, tune logging levels for existing log statements 2016-11-16 14:19:42 -08:00
Bassam Tabbara b3c4f18c89 initial docs and licensing 2016-11-07 17:13:39 -08:00
Travis Nielsen 632f418cea execute all child processes with logging and same executor 2016-10-31 13:07:11 -07:00
Jared Watts 4e6b5424b2 Move Executor functionality to its own package 2016-10-12 09:07:47 -07:00