Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Systemd Mode Karmor logs producing error #275

Open
Pietrokechi opened this issue Mar 6, 2023 · 1 comment · May be fixed by kubearmor/KubeArmor#1150
Open

Systemd Mode Karmor logs producing error #275

Pietrokechi opened this issue Mar 6, 2023 · 1 comment · May be fixed by kubearmor/KubeArmor#1150

Comments

@Pietrokechi
Copy link

Pietrokechi commented Mar 6, 2023

Bug Report

General Information

Folks just working on adding some systemd tests and following the installation in bare metal policy sleep deny but when I try to get the log I get the below error. Seems looking for cluster but this is not suppose to happen as the installation is in systemd mode for VM policies.

To Reproduce

$ karmor log --json
Error: unknown command “log” for “karmor”
Did you mean this?
logs

And when I use Karmor logs I get the below

$ karmor logs --json
Error: Get “http://localhost:8080/api/v1/pods?labelSelector=kubearmor- app%3Dkubearmor-relay”: dial tcp 127.0.0.1:8080: connect: connection refused

it’s looking for a cluster on bare metal which would not exist if we are doing systemd mode policy implementation.

Expected behavior

$ karmor logs --json

{
"Timestamp": 1639803960,
"UpdatedTime": "2021-12-18T05:06:00.077564Z",
"ClusterName": "Default",
"HostName": "pandora",
"HostPID": 3390423,
"PPID": 168556,
"PID": 3390423,
"UID": 1000,
"PolicyName": "hsp-kubearmor-dev-proc-path-block",
"Severity": "1",
"Type": "MatchedHostPolicy",
"Source": "zsh",
"Operation": "Process",
"Resource": "/usr/bin/sleep",
"Data": "syscall=SYS_EXECVE",
"Action": "Block",
"Result": "Permission denied"
}

@Chinwendu20
Copy link

My proposition is that we set the KUBEAMOR_SERVICE env variable to the default grpc port as part of the post installation process. Should carry on with submitting a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants