Skip to content

Commit

Permalink
fix(check): check if module dm_crypt is enabled
Browse files Browse the repository at this point in the history
ref: longhorn/longhorn 9153

Signed-off-by: James Lu <[email protected]>
  • Loading branch information
mantissahz committed Sep 27, 2024
1 parent 832ce96 commit a901250
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions pkg/local/preflight/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ func (local *Checker) Init() error {
local.packages = []string{
"nfs-common", "open-iscsi",
}
local.modules = []string{}
local.modules = []string{
"dm_crypt",
}
local.services = []string{
"multipathd.service",
}
Expand All @@ -117,7 +119,9 @@ func (local *Checker) Init() error {
local.packages = []string{
"nfs-utils", "iscsi-initiator-utils",
}
local.modules = []string{}
local.modules = []string{
"dm_crypt",
}
local.services = []string{
"multipathd.service",
}
Expand All @@ -133,7 +137,9 @@ func (local *Checker) Init() error {
local.packages = []string{
"nfs-client", "open-iscsi",
}
local.modules = []string{}
local.modules = []string{
"dm_crypt",
}
local.services = []string{
"multipathd.service",
}
Expand All @@ -149,7 +155,9 @@ func (local *Checker) Init() error {
local.packages = []string{
"nfs-utils", "open-iscsi",
}
local.modules = []string{}
local.modules = []string{
"dm_crypt",
}
local.services = []string{
"multipathd.service",
}
Expand Down Expand Up @@ -192,6 +200,10 @@ func (local *Checker) Run() error {
return err
}

if err := local.checkModulesLoaded(false); err != nil {
return err
}

if local.EnableSpdk {
instructionSets := map[string][]string{
"amd64": {"sse4_2"},
Expand Down

0 comments on commit a901250

Please sign in to comment.