Skip to content
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 recipes-azure-iot/azure-identityd/aziot-identityd.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ SRC_URI += " \
# workspace
SRC_URI += " \
file://aziot-identityd-precondition.service \
file://aziot-identityd-precondition.timer \
file://iot-identity-service.conf \
file://iot-identity-service-certd.template.toml \
"
Expand Down Expand Up @@ -189,6 +190,7 @@ do_install() {
else
sed -i "s/@@AZIOTCLI@@/aziotctl/" ${D}${systemd_system_unitdir}/aziot-identityd-precondition.service
fi
install -m 0644 ${WORKDIR}/aziot-identityd-precondition.timer ${D}${systemd_system_unitdir}/aziot-identityd-precondition.timer
}

pkg_postinst:${PN}() {
Expand All @@ -209,6 +211,7 @@ SYSTEMD_SERVICE:${PN} = " \
aziot-identityd.service \
aziot-identityd.socket \
aziot-identityd-precondition.service \
aziot-identityd-precondition.timer \
aziot-keyd.service \
aziot-keyd.socket \
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ ConditionPathExists=|/run/omnect-device-service/omnect_bootloader_updated

ConditionFileNotEmpty=|!/etc/aziot/identityd/config.d/00-super.toml

# with RestartSec=5 the default limit (5 starts per 10s) is never reached, so
# the unit would loop in auto-restart forever instead of failing; the window
# has to hold the whole burst, i.e. StartLimitBurst * (RestartSec + runtime of
# one 'config apply')
StartLimitBurst=5
Comment thread
JoergZeidler marked this conversation as resolved.
StartLimitIntervalSec=120

[Service]
Type=oneshot
ExecStart=@@AZIOTCLI@@ config apply
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Retry Azure IoT Identity Service Precondition

[Timer]
# must exceed the unit's start-limit window, else the retry is rejected as well
OnUnitInactiveSec=10min
Comment thread
JanZachmann marked this conversation as resolved.

[Install]
WantedBy=timers.target
Loading