pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.7k stars 1.7k forks source link

OpenVZ v7 #4014

Closed gobboo closed 2 years ago

gobboo commented 2 years ago

Current Behavior

Pterodactyl states that OpenVZ should not be used due to it being unstable or outright not support docker, however OpenVZ v7 seems to support Docker itself and just wondering if it can potentially run wings with the right configuration changes.

I could be incorrect I'm just wondering what its down to then because docker works just not sure about how cgroups work and such

And if this isn't applicable please let me know and I'll delete this issue :) Just want to know if its capable of running off of openvz 7

Expected Behavior

Same as above, for it to be able to run the docker containers and not crash.

Steps to Reproduce

Install wings on an OpenVZ 7 Virtual Machine and on install ( using Pavlov VR )

Panel Version

1.7

Wings Version

1.6

Games and/or Eggs Affected

No response

Docker Image

quay.io/parkervcp/pterodactyl-images:debian_source

Error Logs

INFO: [Mar 19 15:17:50.835] writing log files to disk path=/var/log/pterodactyl/wings.log
DEBUG: [Mar 19 15:17:50.836] running in debug mode
 INFO: [Mar 19 15:17:50.836] loading configuration from file config_file=/etc/pterodactyl/config.yml
 INFO: [Mar 19 15:17:50.837] configured wings with system timezone timezone=Etc/UTC
DEBUG: [Mar 19 15:17:50.837] ensuring root data directory exists path=/var/lib/pterodactyl
DEBUG: [Mar 19 15:17:50.837] ensuring server data directory exists path=/var/lib/pterodactyl/volumes
DEBUG: [Mar 19 15:17:50.838] ensuring archive data directory exists path=/var/lib/pterodactyl/archives
DEBUG: [Mar 19 15:17:50.838] ensuring backup data directory exists path=/var/lib/pterodactyl/backups
 INFO: [Mar 19 15:17:50.838] checking for pterodactyl system user username={999 992}
 INFO: [Mar 19 15:17:50.839] configured system user successfully gid=992 uid=999 username=pterodactyl
 INFO: [Mar 19 15:17:50.839] fetching list of servers from API
DEBUG: [Mar 19 15:17:50.839] making request to external HTTP endpoint endpoint={redacted}/api/remote/servers?page=0&per_page=50 headers=map[Accept:[application/vnd.pterodactyl.v1+json] Authorization:[(redacted)] Content-Type:[application/json] User-Agent:[Pterodactyl Wings/v1.6.1 (id:4xdExYCoCjSlbbCm)]] method=GET
 INFO: [Mar 19 15:17:50.901] processing servers returned by the API total_configs=0
DEBUG: [Mar 19 15:17:50.901] using 4 workerpools to instantiate server instances
 INFO: [Mar 19 15:17:50.901] finished processing server configurations duration=585.775µs
 INFO: [Mar 19 15:17:50.904] configuring internal webserver host_address={redacted} host_port=8080 use_auto_tls=false use_ssl=true
 INFO: [Mar 19 15:17:50.905] updating server states on Panel: marking installing/restoring servers as normal
DEBUG: [Mar 19 15:17:50.905] making request to external HTTP endpoint endpoint={redacted}/api/remote/servers/reset headers=map[Accept:[application/vnd.pterodactyl.v1+json] Authorization:[(redacted)] Content-Type:[application/json] User-Agent:[Pterodactyl Wings/v1.6.1 (id:4xdExYCoCjSlbbCm)]] method=POST
 INFO: [Mar 19 15:17:50.907] sftp server listening for connections listen={redacted}:2022 public_key=ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL0OzNlXUxBJlbyTPPIFtchy63urt+uHoRPdmqtZ9xFv
DEBUG: [Mar 19 15:17:53.515] making request to external HTTP endpoint endpoint={redacted}/api/remote/servers/45980790-c26c-4496-bf31-85f1585db47a headers=map[Accept:[application/vnd.pterodactyl.v1+json] Authorization:[(redacted)] Content-Type:[application/json] User-Agent:[Pterodactyl Wings/v1.6.1 (id:4xdExYCoCjSlbbCm)]] method=GET
DEBUG: [Mar 19 15:17:53.545] registering event listeners: console, state, resources... server=45980790-c26c-4496-bf31-85f1585db47a
DEBUG: [Mar 19 15:17:53.546] POST /api/servers client_ip=185.183.182.147 latency=31.008531ms request_id=19dce296-e843-4d0e-9e2b-adfbfa69656b status=202
DEBUG: [Mar 19 15:17:53.546] server: creating root directory and setting permissions server=45980790-c26c-4496-bf31-85f1585db47a
DEBUG: [Mar 19 15:17:54.612] pulling docker image... this could take a bit of time image=quay.io/parkervcp/pterodactyl-images:debian_source
DEBUG: [Mar 19 15:17:54.614] completed docker image pull image=quay.io/parkervcp/pterodactyl-images:debian_source
DEBUG: [Mar 19 15:17:54.683] making request to external HTTP endpoint endpoint={redacted}/api/remote/servers/45980790-c26c-4496-bf31-85f1585db47a/install headers=map[Accept:[application/vnd.pterodactyl.v1+json] Authorization:[(redacted)] Content-Type:[application/json] User-Agent:[Pterodactyl Wings/v1.6.1 (id:4xdExYCoCjSlbbCm)]] method=GET
 INFO: [Mar 19 15:17:54.717] beginning installation process for server server=45980790-c26c-4496-bf31-85f1585db47a
DEBUG: [Mar 19 15:17:54.717] acquiring installation process lock server=45980790-c26c-4496-bf31-85f1585db47a
DEBUG: [Mar 19 15:17:55.737] pulling docker image... this could take a bit of time image=debian:buster-slim
DEBUG: [Mar 19 15:17:55.738] {"status":"Pulling from library/debian","id":"buster-slim"}
DEBUG: [Mar 19 15:17:55.740] {"status":"Digest: sha256:bbf8ca5a94fe10b78b681d0f4efe8dbc23839d26e811ab6a1f252c7663c7e244"}
DEBUG: [Mar 19 15:17:55.740] {"status":"Status: Image is up to date for debian:buster-slim"}
 INFO: [Mar 19 15:17:55.742] creating install container for server process install_script=/tmp/pterodactyl/45980790-c26c-4496-bf31-85f1585db47a/install.sh server=45980790-c26c-4496-bf31-85f1585db47a
 INFO: [Mar 19 15:17:55.891] running installation script for server in container container_id=49cbad0f97f9d3cb7f5a548af6088b3b3d69a4affe2541516c445ce0f496954f server=45980790-c26c-4496-bf31-85f1585db47a
DEBUG: [Mar 19 15:17:56.272] releasing installation process lock server=45980790-c26c-4496-bf31-85f1585db47a
DEBUG: [Mar 19 15:17:56.272] notifying panel of server install state server=45980790-c26c-4496-bf31-85f1585db47a was_successful=false
DEBUG: [Mar 19 15:17:56.273] making request to external HTTP endpoint endpoint={redacted}/api/remote/servers/45980790-c26c-4496-bf31-85f1585db47a/install headers=map[Accept:[application/vnd.pterodactyl.v1+json] Authorization:[(redacted)] Content-Type:[application/json] User-Agent:[Pterodactyl Wings/v1.6.1 (id:4xdExYCoCjSlbbCm)]] method=POST
ERROR: [Mar 19 15:17:56.309] failed to run install process for server error=Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:508: setting cgroup config for procHooks process caused: resulting devices cgroup doesn't match target mode: unknown server=45980790-c26c-4496-bf31-85f1585db47a

Stacktrace:
Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:508: setting cgroup config for procHooks process caused: resulting devices cgroup doesn't match target mode: unknown

Is there an existing issue for this?

lstefan1520 commented 2 years ago

This isn’t totally possible.

At the moment docker resource limits do not work on OVZ 7. You can run docker containers, but you can’t set resource restrictions. If I recall, you should be fine running servers with the OOM killer disabled.

parkervcp commented 2 years ago

Technically any openvz could support the panel and docker, it's hosting providers that use openvz never enabled docker support on their vm hosts or were on older versions that didn't support it.

This is a host level issue and not one with pterodactyl.

gobboo commented 2 years ago

I understand that but docker runs just fine, and I have OOM Killer off, I even tried running wings in a docker container using docker compose, works fine until obviously I try to install a server, so surely it should be capable unless I'm missing the mark here

parkervcp commented 2 years ago

The error also states it's a cgroup issue. If you are using cgroups v2 then you will need to set it back to v1 as covered here https://github.com/pterodactyl/panel/issues/3999

57-Wolve commented 2 years ago

I understand that but docker runs just fine, and I have OOM Killer off, I even tried running wings in a docker container using docker compose, works fine until obviously I try to install a server, so surely it should be capable unless I'm missing the mark here

What I had to do was edit a file on the panel to enable OOM killer on server creation. This solved the issue we had with server creations on Virtuozzo Hybrid Server 7 as OOM is enforced to prevent going over allocated resource limits.

See Issue 2079 Comment