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

Rust Oxidemod reloads all plugins on 1.X but not 0.7.X, suspected chown for the whole directory, or all server files #3071

Closed
dennisrijsdijk opened this issue Feb 5, 2021 · 15 comments

Comments

@dennisrijsdijk
Copy link

dennisrijsdijk commented Feb 5, 2021

Background (please complete the following information):

  • Panel or Daemon: Daemon
  • Version of Panel/Daemon: Panel 1.2.2 Wings 1.2.3
  • Server's OS: Ubuntu 18.04 Server (both panel and wings, on different machines)
  • Your Computer's OS & Browser: Windows 10, Opera GX, Firefox, Chrome

Describe the bug
When uploading plugin files to a Rust server, instead of loading just that plugin, all plugins get reloaded. this is due to how the oxide compiler works, which checks for any changes in a file, or file permissions. This has not been confirmed to be the case with SFTP. Panel file manager only

2021-02-05_21-53-25.mp4

Please provide additional information too, depending on what you have issues with:
Panel: N/A
Daemon:
uname -a: Linux Hostname 4.15.0-62-generic #69-Ubuntu SMP Wed Sep 4 20:55:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
docker info:
Client:
Debug Mode: false

Server:
Containers: 41
Running: 23
Paused: 0
Stopped: 18
Images: 67
Server Version: 19.03.2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.15.0-62-generic
Operating System: Ubuntu 18.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 125.8GiB
Name: Hostname
ID: REDACTED_ID
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

To Reproduce
Steps to reproduce the behavior:

  1. Create a Rust server with oxide auto-update turned ON, if you don't have one.
  2. Go to the Rust server
  3. Go to https://umod.org/plugins?category%5B%5D=Rust&page=1&sort=title&sortdir=asc&categories=rust and download a few plugins. for this demonstration, it does not matter which plugins you download, as long as you download multiple
  4. Have a console window and file manager window next to each other
  5. upload the first plugin
  6. type "-----" in the console, to get a visual reference of where you are
  7. Upload the second plugin, you'll notice the first plugin reloads, and the second one then compiles and loads
  8. Repeat this and observe the results

Expected behavior
A clear and concise description of what you expected to happen. If applicable, add screenshots or a recording to help explain your problem:
The expected behavior is for just the uploaded plugin to compile and load, rather than all plugins on the server to reload.

@dennisrijsdijk
Copy link
Author

it has been brought to my attention that this issue is only present on the panel file manager, not SFTP

@dennisrijsdijk
Copy link
Author

dennisrijsdijk commented Feb 5, 2021

As can be seen in the video, when ANY file is uploaded through the web interface, all files get permission update, even if the permission is already correct

Untitled.mp4

@parkervcp
Copy link
Member

All this is doing is making it to the server user owns the files.

The sftp and web file manager handle uploads completely differently.

@dennisrijsdijk
Copy link
Author

The problem is, when uploading a single file it should not chown the whole server.
this results in poor results with software that has to monitor any changes in files
and SFTP does not show this behavior at all, presumably because of how different it works
Can you explain a logical reason for any upload to change EVERY file's permissions?

@nackerr
Copy link

nackerr commented Feb 9, 2021

Bumping this as I'm also seeing the same exact issue. When uploading a file through the file manager, every single plugin gets recompiled and reloaded. This is terrible practice as a large server with more than 25+ plugins could easily crash because of this. The expected behavior should be exactly how it's handled for SFTP.

@matthewpi
Copy link
Member

Bumping this as I'm also seeing the same exact issue. When uploading a file through the file manager, every single plugin gets recompiled and reloaded. This is terrible practice as a large server with more than 25+ plugins could easily crash because of this. The expected behavior should be exactly how it's handled for SFTP.

This is not intentional behavior. I looked into the code and only found one potential situation in which an entire directory would have it's permissions updated which I fixed, but there is no guarantee that was the actual problem.

@nackerr
Copy link

nackerr commented Feb 10, 2021

Bumping this as I'm also seeing the same exact issue. When uploading a file through the file manager, every single plugin gets recompiled and reloaded. This is terrible practice as a large server with more than 25+ plugins could easily crash because of this. The expected behavior should be exactly how it's handled for SFTP.

This is not intentional behavior. I looked into the code and only found one potential situation in which an entire directory would have it's permissions updated which I fixed, but there is no guarantee that was the actual problem.

It seems to happen every single time you upload a plug-in. This is tested on a panel with about 200+ rust servers, and another panel with 3.

How would he see the changes live?

@dennisrijsdijk
Copy link
Author

Bumping this as I'm also seeing the same exact issue. When uploading a file through the file manager, every single plugin gets recompiled and reloaded. This is terrible practice as a large server with more than 25+ plugins could easily crash because of this. The expected behavior should be exactly how it's handled for SFTP.

This is not intentional behavior. I looked into the code and only found one potential situation in which an entire directory would have it's permissions updated which I fixed, but there is no guarantee that was the actual problem.

Can you send us a link to the commit, so that we can test it for you?

@DaneEveritt
Copy link
Member

DaneEveritt commented Feb 10, 2021

All of the commits are here: https://github.com/pterodactyl/wings/commits/develop

There have been no commits that would begin fixing whatever is broken here, so you're not going to see anything of use. I'm sorry it is causing you issues, but right now I have plenty of other unrelated things I am in the middle of, so this isn't exactly high up on my priority list at the moment. Bumping the issue doesn't really do anything other than put it back in my unread notifications.

@nackerr
Copy link

nackerr commented Feb 10, 2021

All of the commits are here: https://github.com/pterodactyl/wings/commits/develop

There have been no commits that would begin fixing whatever is broken here, so you're not going to see anything of use. I'm sorry it is causing you issues, but right now I have plenty of other unrelated things I am in the middle of, so this isn't exactly high up on my priority list at the moment. Bumping the issue doesn't really do anything other than put it back in my unread notifications.

Understood, however I do disagree that this isn’t high priority because this could lead to a lot of server crashes due to entire directories being updated at once with large amounts of plugins.

@matthewpi
Copy link
Member

Can you send us a link to the commit, so that we can test it for you?

This is the commit I am referring to pterodactyl/wings@683c766. I doubt it will change anything but it may be worth a shot.

@dennisrijsdijk
Copy link
Author

develop branch works with Panel 1.2.2 right? or does it require a special panel version to test

@matthewpi
Copy link
Member

develop branch works with Panel 1.2.2 right? or does it require a special panel version to test

The develop branch of wings is not guaranteed to work with the latest stable version of the panel, or vise-versa. I am pretty sure I found the actual problem you are facing though.

@dennisrijsdijk
Copy link
Author

The develop branch of wings is not guaranteed to work with the latest stable version of the panel, or vise-versa. I am pretty sure I found the actual problem you are facing though.

Is this something fixable?

@matthewpi
Copy link
Member

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

No branches or pull requests

5 participants