mirror of
https://github.com/daeuniverse/dae.git
synced 2025-02-22 12:38:34 +07:00
chore: add btf lack prompt
This commit is contained in:
parent
45701f8559
commit
cceeb53db7
@ -100,12 +100,12 @@ func NewControlPlane(
|
||||
// Load pre-compiled programs and maps into the kernel.
|
||||
log.Infof("Loading eBPF programs and maps into the kernel")
|
||||
var bpf bpfObjects
|
||||
var ProgramOptions ebpf.ProgramOptions
|
||||
var ProgramOptions = ebpf.ProgramOptions{
|
||||
KernelTypes: nil,
|
||||
}
|
||||
if log.Level == logrus.PanicLevel {
|
||||
ProgramOptions = ebpf.ProgramOptions{
|
||||
LogLevel: ebpf.LogLevelBranch | ebpf.LogLevelStats,
|
||||
//LogLevel: ebpf.LogLevelInstruction | ebpf.LogLevelStats,
|
||||
}
|
||||
ProgramOptions.LogLevel = ebpf.LogLevelBranch | ebpf.LogLevelStats
|
||||
// ProgramOptions.LogLevel = ebpf.LogLevelInstruction | ebpf.LogLevelStats
|
||||
}
|
||||
|
||||
// Trick. Replace the beams with rotten timbers to reduce the loading.
|
||||
@ -147,6 +147,9 @@ retryLoadBpf:
|
||||
}
|
||||
}
|
||||
}
|
||||
if strings.Contains(err.Error(), "no BTF found for kernel version") {
|
||||
err = fmt.Errorf("%w: maybe installing the linux-headers package will solve it", err)
|
||||
}
|
||||
return nil, fmt.Errorf("loading objects: %w", err)
|
||||
}
|
||||
if _, ok := obj.(*bpfObjects); !ok {
|
||||
|
Loading…
Reference in New Issue
Block a user