Skip to content

Commit

Permalink
Cherry-picks (latest-candidate) (canonical#536)
Browse files Browse the repository at this point in the history
- Fix Dell Powerflex migrations from
canonical/lxd#13934
- Fix snap preseed support from
canonical#532
- Fix snapshot importing from
canonical/lxd#13899
  • Loading branch information
tomponline authored Aug 20, 2024
2 parents 4cd98ce + a152fe6 commit efad198
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
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

0 comments on commit efad198

Please sign in to comment.