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

Cherry-picks (latest-candidate) #536

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 3 additions & 0 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1438,6 +1438,9 @@ parts:
git cherry-pick -x 47180a352654bee9a994db714801813a59cfbb18 # lxd/apparmor/feature_check: add infastructure to check AppArmor features
git cherry-pick -x b5a4a6540e793120b85a3b280003fce236e6a56f # lxd/apparmor/instance_lxc: allow nosymfollow mount flag
git cherry-pick -x 86c3d515662068d825d23387623932bca96bc6aa # lxd/apparmor/instance_lxc: allow nosymfollow mount flag in more cases
git cherry-pick -x 69bd88119f5dc990452c79699915b3dd86dad242 # lxd/storage/backend/lxd: Pass full snapshot name when validating import in CreateInstanceFromBackup
git cherry-pick -x a35079f481c50adf7dfd571d2c815668f5f747a1 # lxd/instance/instance/utils: Don't allow snapshots named ".." in ValidName
git cherry-pick -x fcdc78dda31b210f246e075aaf4bf507b07b68f5 # lxd/instance: if storage location is remote, make cluster self healing available, and vm can migrate when src member is offline also

# Setup build environment
export GOPATH="$(realpath ./.go)"
Expand Down
11 changes: 8 additions & 3 deletions snapcraft/commands/daemon.start
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,12 @@ if [ "${daemon_verbose:-"false"}" = "true" ]; then
CMD="${CMD} --verbose"
fi

# Check if this is the first time LXD is started.
FIRSTRUN="false"
if [ ! -d "${SNAP_COMMON}/lxd/database" ]; then
FIRSTRUN="true"
fi

# We deal with errors ourselves from this point on
set +e

Expand Down Expand Up @@ -740,12 +746,11 @@ if [ "${RET}" -gt "0" ]; then
exit 1
fi

## Check if this is the first time LXD is started
if [ ! -d "${SNAP_COMMON}/lxd/database" ]; then
## Process preseed if present
if [ "${FIRSTRUN}" = "true" ]; then
set -e
echo "=> First LXD execution on this system"

## Process preseed if present
if [ -e "${SNAP_COMMON}/init.yaml" ]; then
echo "==> Running LXD preseed file"
${LXD} init --preseed < "${SNAP_COMMON}/init.yaml"
Expand Down