Skip to content

Commit d56b94b

Browse files
committed
Reboot a microVM when our agent exits
We need to upgrade Debian from stretch to buster, since stretch's systemd doesn't support SuccessAction. And the upgrade moves /sbin/init to /usr/sbin/init, due to https://wiki.debian.org/UsrMerge Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent 0416864 commit d56b94b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

tools/image-builder/Dockerfile.debian-image

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# express or implied. See the License for the specific language governing
1212
# permissions and limitations under the License.
1313

14-
FROM debian:stretch-slim
14+
FROM debian:buster-slim
1515

1616
RUN apt-get update && \
1717
DEBIAN_FRONTEND=noninteractive apt-get -y install \

tools/image-builder/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ endif
5656
debootstrap \
5757
--variant=minbase \
5858
--include=udev,systemd,systemd-sysv,procps,libseccomp2 \
59-
stretch \
59+
buster \
6060
"$(WORKDIR)" $(DEBMIRROR)
6161
rm -rf "$(WORKDIR)/var/cache/apt/archives" \
6262
"$(WORKDIR)/usr/share/doc" \

tools/image-builder/files_debootstrap/etc/systemd/system/firecracker-agent.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Description=Firecracker VM agent
1515
StartLimitIntervalSec=2
1616
After=local-fs.target
1717
Requires=local-fs.target
18+
SuccessAction=reboot
1819

1920
[Service]
2021
Type=simple
2122
WorkingDirectory=/container
2223
ExecStart=/usr/local/bin/agent
23-
Restart=always

tools/image-builder/files_debootstrap/sbin/overlay-init

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ do_overlay
6161

6262
# invoke the actual system init program and procede with the boot
6363
# process.
64-
exec /sbin/init $@
64+
exec /usr/sbin/init $@

0 commit comments

Comments
 (0)