sandstorm-io / sandstorm

Sandstorm is a self-hostable web productivity suite. It's implemented as a security-hardened web app package manager.
https://sandstorm.io
Other
6.74k stars 707 forks source link

Provide a way for "spk dev" to disable adding to sandstorm-files.list #669

Open paulproteus opened 9 years ago

paulproteus commented 9 years ago

Context: App developers would appreciate a way to (feel like they are) SSH-ing in to a Sandstorm grain, while it is running, so they can poke around and figure out what is going on.

Summary: spk dev should have a way to disable tracing. I'm filing this against the sandstorm repo since I believe it would take some kind of change for spk or sandstorm to make this work.

Steps to reproduce

vagrant-spk ssh
cd /opt/app/.sandstorm
sudo nsenter --target $(pidof sandstorm-http-bridge) --wd --mount --net --ipc --uts --pid

Expected results

Operations performed during the nsenter do not not modify sandstorm-files.list since it is intended for debug use.

Actual results

Doing this results in a bigger sandstorm-files.list.

kentonv commented 9 years ago

This should go along with an spk sh command (or something) that rendezvous with spk dev, tells it to disable tracking temporarily, then runs a shell in the namespace. After exiting, it tells spk dev to resume tracking.