Skip to content

Commit

Permalink
Fix snap startup error (#7354)
Browse files Browse the repository at this point in the history
Cherry-pick d950b62.

To test, I built new snaps in the CI build pipeline, ran the end-to-end tests pipeline against them, and confirmed the snap jobs pass. Since the snap jobs install with --devmode, I also published to a temporary branch in the marketplace and tested manually.
  • Loading branch information
damonbarry committed Aug 26, 2024
1 parent ee7b776 commit 436c1cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 3 additions & 3 deletions edgelet/contrib/snap/socat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ done
# socket exists or not otherwise the snap installation will fail.
# This is a better UX as the user can now fix the issue themselves.. say
# they installed iotedge before docker.
systemd-notify --ready

$SNAP/usr/bin/socat UNIX-LISTEN:$SNAP_COMMON/docker-proxy.sock,reuseaddr,fork,unlink-early,user=snap_aziotedge,group=snap_aziotedge UNIX-CONNECT:$docker_socket
exec systemd-notify --exec --ready \; $SNAP/usr/bin/socat \
UNIX-LISTEN:$SNAP_COMMON/docker-proxy.sock,reuseaddr,fork,unlink-early,user=snap_aziotedge,group=snap_aziotedge \
UNIX-CONNECT:$docker_socket
6 changes: 0 additions & 6 deletions snap/hooks/configure
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ mkdir -p /etc/aziot/edged/config.d
snapctl get raw-config > /etc/aziot/config.toml

{
toml_kvp "hostname" "$(hostnamectl hostname)"
} | tee /etc/aziot/keyd/config.d/01-snap.toml /etc/aziot/certd/config.d/01-snap.toml /etc/aziot/identityd/config.d/01-snap.toml /etc/aziot/tpmd/config.d/01-snap.toml

{
toml_kvp "hostname" "$(hostnamectl hostname)"

toml_new_section "agent"
toml_kvp "name" "edgeAgent"
toml_kvp "type" "docker"
Expand Down
6 changes: 3 additions & 3 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: azure-iot-edge
base: core22 # the base snap is the execution environment for this snap
base: core24 # the base snap is the execution environment for this snap
summary: Managed solution for deploying and configuring software on IoT devices
description: |
Azure IoT Edge is a fully managed service that delivers cloud intelligence
Expand All @@ -16,8 +16,8 @@ system-usernames:
package-repositories:
- type: apt
components: [ main ]
suites: [ jammy ]
url: https://packages.microsoft.com/ubuntu/22.04/prod
suites: [ noble ]
url: https://packages.microsoft.com/ubuntu/24.04/prod
key-id: BC528686B50D79E339D3721CEB3E94ADBE1229CF

parts:
Expand Down

0 comments on commit 436c1cc

Please sign in to comment.