lueschem / edi

Embedded development infrastructure.
https://www.get-edi.io
GNU Lesser General Public License v3.0
38 stars 12 forks source link

openssh-server-key-generator.service might not get enabled if first boot gets interrupted #71

Closed lueschem closed 3 years ago

lueschem commented 3 years ago

Problem Description

On large scale deployments it was observed that in rare cases openssh-server-key-generator.service does not get started. The result is that the ssh host keys do not get generated and as a consequence ssh based login is not possible.

Root Cause

openssh-server-key-generator.service relies on the "first-boot" startup logic to get enabled. However, if the first boot fails in a very bad moment (before enabling the service) then the service does not get enabled on the second boot any more.

Solution

The service openssh-server-key-generator.service shall get enabled already during the image build.