mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-24 06:39:58 +00:00
Disable VM cgroup shenanigans (#3730)
As discussed - temporary, so it can unblock releasing autoscaling. Cleaner to fully remove, then add back rather than commenting it out.
This commit is contained in:
@@ -11,22 +11,15 @@ RUN set -e \
|
|||||||
&& touch /etc/inittab
|
&& touch /etc/inittab
|
||||||
|
|
||||||
RUN set -e \
|
RUN set -e \
|
||||||
&& echo "::sysinit:cgconfigparser -l /etc/cgconfig.conf -s 1664" >> /etc/inittab \
|
&& echo "::respawn:su vm-informant -c '/usr/local/bin/vm-informant --auto-restart'" >> /etc/inittab
|
||||||
&& echo "::respawn:su vm-informant -c '/usr/local/bin/vm-informant --auto-restart --cgroup=neon-postgres'" >> /etc/inittab
|
|
||||||
|
|
||||||
# Combine, starting from non-VM compute node image.
|
# Combine, starting from non-VM compute node image.
|
||||||
FROM $SRC_IMAGE as base
|
FROM $SRC_IMAGE as base
|
||||||
|
|
||||||
# Temporarily set user back to root so we can run apt update and adduser
|
# Temporarily set user back to root so we can run adduser
|
||||||
USER root
|
USER root
|
||||||
RUN apt update && \
|
|
||||||
apt install --no-install-recommends -y \
|
|
||||||
cgroup-tools
|
|
||||||
RUN adduser vm-informant --disabled-password --no-create-home
|
RUN adduser vm-informant --disabled-password --no-create-home
|
||||||
USER postgres
|
USER postgres
|
||||||
|
|
||||||
ADD vm-cgconfig.conf /etc/cgconfig.conf
|
|
||||||
COPY --from=informant /etc/inittab /etc/inittab
|
COPY --from=informant /etc/inittab /etc/inittab
|
||||||
COPY --from=informant /usr/bin/vm-informant /usr/local/bin/vm-informant
|
COPY --from=informant /usr/bin/vm-informant /usr/local/bin/vm-informant
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/sbin/cgexec", "-g", "*:neon-postgres", "/usr/local/bin/compute_ctl"]
|
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
# Configuration for cgroups in VM compute nodes
|
|
||||||
group neon-postgres {
|
|
||||||
perm {
|
|
||||||
admin {
|
|
||||||
uid = vm-informant;
|
|
||||||
}
|
|
||||||
task {
|
|
||||||
gid = users;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
memory {}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user