Skip to content

Commit

Permalink
hypervisor: don't init in install mode
Browse files Browse the repository at this point in the history
if containerd is initialized during installation the installation will
fail generating an onboarding certificate

Signed-off-by: Christoph Ostarek <[email protected]>
  • Loading branch information
christoph-zededa committed Oct 31, 2023
1 parent 5efd826 commit 082a37b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/pillar/hypervisor/hypervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"os"

"github.com/lf-edge/eve/pkg/pillar/types"
fileutils "github.com/lf-edge/eve/pkg/pillar/utils/file"
"github.com/shirou/gopsutil/cpu"
"github.com/shirou/gopsutil/mem"
"github.com/sirupsen/logrus"
Expand All @@ -18,6 +19,12 @@ import (
var currentHypervisor Hypervisor

func init() {
if fileutils.DirExists(nil, "/opt/pillar/opt") {
// if /opt/pillar/opt exists it means we're running in the installer and we should not inititialize the containerd
// hypervisor as it interferes with the installer
return
}

var err error

flagSet := flag.NewFlagSet("", flag.ExitOnError)
Expand Down

0 comments on commit 082a37b

Please sign in to comment.