Skip to content

Commit

Permalink
Merge pull request #187 from markylaing/sideload-binaries
Browse files Browse the repository at this point in the history
bin: Allow sideloading of lxd binaries
  • Loading branch information
tomponline authored Jun 14, 2024
2 parents 8c93946 + 2566222 commit 8b48129
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ export PURGE_LXD=1

Note: if you need to run tests on temporary machines, [Testflinger reservations](https://docs.google.com/document/d/11Kot68mnBY9Wq9DXRzTVrKpx5cMkkhBC5RrM51eyybY) might be useful.

To test a custom build of LXD, you can set the `LXD_SIDELOAD_PATH` environment variable.
This will be copied to `/var/snap/lxd/common/lxd.debug` and the daemon will be reloaded before the test run.

```
export LXD_SIDELOAD_PATH=/tmp/lxd
./bin/local-run tests/interception latest/edge
```


# Running tests on OpenStack (ProdStack)

Expand Down
6 changes: 6 additions & 0 deletions bin/helpers
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ install_lxd() (
# on first invocation
mkdir -p ~/snap/lxd/common/config/
touch ~/snap/lxd/common/config/config.yml

if [ -n "${LXD_SIDELOAD_PATH:-}" ]; then
systemctl stop snap.lxd.daemon
cp "${LXD_SIDELOAD_PATH}" /var/snap/lxd/common/lxd.debug
systemctl start snap.lxd.daemon
fi
)

# hasNeededAPIExtension: check if LXD supports the needed extension.
Expand Down

0 comments on commit 8b48129

Please sign in to comment.