Skip to content

AppArmor profile installation fails with parsing error in SPO 0.9.0 #2900

@MeSabya

Description

@MeSabya

What happened:
While installing Security Profiles Operator (SPO) v0.9.0 with AppArmor enabled, the operator fails to install the spo-apparmor.yaml profile. The following error is observed in the logs:

I0625 06:21:05.198512   97163 nonrootenabler.go:143] "Installing apparmor profile: /opt/spo-profiles/spo-apparmor.yaml" logger="non-root-enabler"
E0625 06:21:05.202811   97163 main.go:246] "running security-profiles-operator" err="installing apparmor profile: installing apparmor profile: running action: load policy: parsing profile: exit status 1" logger="setup"
This suggests a failure in parsing or loading the AppArmor profile despite the file being copied successfully.

What you expected to happen:
The AppArmor profile spo-apparmor.yaml should be successfully parsed and loaded by the operator without any errors.

How to reproduce it (as minimally and precisely as possible):
Deploy SPO v0.9.0 in a Kubernetes cluster.

Ensure AppArmor is enabled on the host (e.g. sudo aa-status).

Let the operator install default AppArmor profiles.

Check the SPO Daemon logs for errors related to profile installation.

Anything else we need to know?:
The spo-apparmor.yaml file is being copied successfully to the expected location.

The issue appears only during the profile load stage.

Might be related to profile format or AppArmor parser incompatibility with certain host configurations.

Environment:
Cloud provider or hardware configuration: VM

OS (e.g: cat /etc/os-release): Debian

Kernel (e.g. uname -a): 6.12.0-1-amd64

Others:

SPO version: v0.9.0

Kubernetes version: v1.30.x

AppArmor status: enabled (aa-status confirms profiles loaded)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions