-> Optional (temp) Workaround for Kubernetes + CloudNativePG (CNPG)
users
This regression prevents container processes from sending SIGURG under
the forced stacked profile cri-containerd.apparmor.d//&unconfined.
PostgreSQL uses SIGURG for latch wakeups, so hot standbys hang in
recovery (clients get "the database system is starting up", the startup
process sits in epoll_wait, no walreceiver) and the primary can be
affected too.
You don't need to disable AppArmor for the node or for other workloads.
You can make only the CNPG database pods run unconfined:
```
spec:
# ... existing spec ...
# Workaround for LP #2172640: SIGURG denied under the stacked
# cri-containerd.apparmor.d//&unconfined profile.
# AppArmor is Unconfined for the postgres/instance-manager container only;
# every other workload keeps the default profile.
#
# NOTE: CNPG's spec.securityContext REPLACES the operator's hardened
# container defaults, so the defaults are repeated here on purpose.
#
# TODO: remove this whole block once the nodes run a kernel with the
# LP #2172640 fix (see the bug for the fixed version) and/or containerd
# includes containerd/containerd#14487.
securityContext:
appArmorProfile:
type: Unconfined
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
```
AppArmor is applied at container creation, so existing pods keep the old
profile. The pods must be recreated: CNPG's rolling update normally does
this (replicas first, primary last; primaryUpdateStrategy: unsupervised
is the default). If the operator doesn't proceed, delete the replicas'
pods one at a time, waiting for 2/2 each, then the primary last.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2172640
Title:
Regression in 7.0.0-42: AppArmor forced "//&unconfined" stack on
container processes blocks signals between them (PostgreSQL hangs)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2172640/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs