Commit Graph

294 Commits

Author SHA1 Message Date
Dane Everitt
642e6e6a96
Different implementation of multi-check for done
Co-Authored-By: Matthew Penner <me@matthewp.io>
2020-08-04 21:29:43 -07:00
Matthew Penner
9bd10f1043 Changes to ProcessConfiguration 2020-08-04 21:41:09 -06:00
Matthew Penner
eb975e0cbd Add option to strip ansi colors and split the done line in egg startup configuration 2020-08-04 17:39:54 -06:00
Matthew Penner
234fbfa8ec Fix servers getting marked as Stopping when they should be Offline 2020-08-04 17:19:13 -06:00
Dane Everitt
a9c81f37b2
Code cleanup for server mounts; mount more timezone data; closes pterodactyl/panel#2073 2020-08-01 20:24:43 -07:00
Dane Everitt
834bcf251e
Avoid race conditions due to stream not being completely detached correctly 2020-08-01 15:34:14 -07:00
Dane Everitt
78c5fd219a
Remove use of semaphore while restarting; covered by changed power actions handling 2020-08-01 15:22:39 -07:00
Dane Everitt
177aa8e436
Refactor power handling logic to be more robust and able to handle spam clicking and duplicate power actions 2020-08-01 15:20:39 -07:00
Dane Everitt
ecb2cb05ce
Rewrite the file/dir chowing to be less intense on the system and use walker function 2020-07-31 22:06:00 -07:00
Dane Everitt
03ef52c0db
More use of workerpools for loading servers from the API 2020-07-31 21:40:43 -07:00
Dane Everitt
f889a193bf
Use NumCPU and not GOMAXPROCS 2020-07-31 21:31:53 -07:00
Dane Everitt
5366d0f652
Use a workerpool for configuration file updates
Co-Authored-By: Jakob <schrej@users.noreply.github.com>
2020-07-31 21:25:57 -07:00
Dane Everitt
38efb68e8a
Merge branch 'develop' of https://github.com/pterodactyl/wings into develop 2020-07-31 21:02:27 -07:00
Dane Everitt
cf33a2464a
Code cleanup for event listening and publishing
Co-Authored-By: Jakob <schrej@users.noreply.github.com>
2020-07-31 21:02:25 -07:00
Dane Everitt
cecc72110c
Merge pull request #46 from pterodactyl/feature/docker-repo-auth
Add Docker registry authentication
2020-07-31 20:27:35 -07:00
Dane Everitt
da26b4c5c7
Merge pull request #41 from pterodactyl/fix/race-1
Fix a possible race condition when Unsubscribing from the EventBus
2020-07-31 20:11:21 -07:00
Dane Everitt
5889d0585b
Merge pull request #45 from pterodactyl/fix/disk-usage
Force disk usage calculation when loading servers
2020-07-31 20:06:58 -07:00
Dane Everitt
8af26ac864
Merge pull request #43 from pterodactyl/impl/2194
Add the ability to define additional allowed origins
2020-07-31 20:04:10 -07:00
Matthew Penner
5b999db7f3 Add Docker registry authentication 2020-07-31 18:28:40 -06:00
Matthew Penner
afa6fb200e Force disk usage calculation when loading servers 2020-07-31 17:01:02 -06:00
Matthew Penner
b811d2474e Add the ability to define additional allowed origins 2020-07-31 16:19:09 -06:00
Matthew Penner
e85b1cecb7 Fix 500 errors on file routes when accessing a file that doesn't exist 2020-07-31 16:01:32 -06:00
Matthew Penner
5036077152 Hopefully fix a possible race condition when Unsubscribing from the EventBus while an event is being Published 2020-07-29 23:18:11 -06:00
Dane Everitt
373dbd355e
Better handling of subscribers to avoid a slice panic 2020-07-29 21:56:22 -07:00
Dane Everitt
7f9ec4402a
Add emitters for install started/stopped 2020-07-29 21:39:27 -07:00
Dane Everitt
db0dc17937
Fix exception when writing install logs 2020-07-29 20:54:15 -07:00
Dane Everitt
cb850fd81a
Update all of the old UUID refs to new 2020-07-19 17:53:41 -07:00
Dane Everitt
5079c67aee
Code cleanup and avoid server race 2020-07-19 17:50:39 -07:00
Dane Everitt
e28c05ae56
Address some race conditions 2020-07-19 17:46:39 -07:00
Dane Everitt
21e58b57a1
Whoops, sync correctly 2020-07-19 17:26:53 -07:00
Dane Everitt
16467fa7ff
Code cleanup 2020-07-19 17:09:38 -07:00
Dane Everitt
0cbaad5c72
Completely re-work the server configuration to be separated out better 2020-07-19 16:27:55 -07:00
Dane Everitt
a00288aa64
Require a lock on the restart process to avoid double restarts causing unexpected behavior 2020-07-18 16:46:41 -07:00
Dane Everitt
8315ff8ae1
Misc mutex locking things to avoid data races 2020-07-18 16:03:25 -07:00
Dane Everitt
0b9d923d15
Allow the deletion of a file or directory that is a symlink pointing outside the data dir 2020-07-18 12:19:54 -07:00
Dane Everitt
f0eeaae747
Remove debugging 2020-07-18 11:58:55 -07:00
Dane Everitt
085a02726b
Handle path resolution errors better in the file walker 2020-07-18 11:57:50 -07:00
Dane Everitt
4f1b0c67d6
Address security vulnerabilities allowing certain internal processes to potentiallty escape server data directory 2020-07-18 11:40:38 -07:00
Dane Everitt
6e1844a8c9
Skip over when not exist 2020-07-18 10:54:37 -07:00
Dane Everitt
7c3da84248
chown the cleaned location, not the original path 2020-07-18 10:49:28 -07:00
Dane Everitt
1b5684e6f8
Make sure errors are handled 2020-07-18 10:47:15 -07:00
Dane Everitt
21303dc517
Address race conditions when booting a server process 2020-07-18 10:10:34 -07:00
Dane Everitt
daf682b991
Handle errors and cancel process when encountered 2020-07-16 22:18:47 -07:00
Dane Everitt
a72d6f3768
Make the walk processor act the same as Go's walker 2020-07-16 22:01:50 -07:00
Dane Everitt
d262c12b43
Less confusing waitgroup positioning 2020-07-16 21:53:05 -07:00
Dane Everitt
f3c8220bd9
Change filewalker implementation to use a pool 2020-07-16 21:51:31 -07:00
Dane Everitt
7e1b7e7f36
Prevent race conditions when generating archives 2020-07-16 19:56:53 -07:00
Dane Everitt
b2d34cf8e7
Don't cause a race condition 2020-07-15 21:35:40 -07:00
Dane Everitt
a635cdd6b2
Support unarching in a better fashion with zip-slip protections and size checking 2020-07-15 21:16:08 -07:00
Dane Everitt
ae46add8ef
Remove unnecessary logic 2020-07-15 19:24:13 -07:00
Matthew Penner
f4c10e5a23 Add some missing error handling, fix a few typos 2020-07-15 13:11:12 -06:00
Matthew Penner
b64f1897fb Add endpoint for decompressing archives 2020-07-15 12:28:45 -06:00
Matthew Penner
a98e376593 Calculate disk usage even if server has 'unlimited' disk space 2020-07-12 12:28:38 -06:00
Dane Everitt
eefc11bd0d
Remove accidental debug line 2020-07-12 10:26:26 -07:00
Dane Everitt
b3eba78743
Merge pull request #21 from pterodactyl/feature/server-mounts
Add configurable server mounts
2020-07-11 17:19:51 -07:00
Dane Everitt
233cefd129
Fix renaming to correctly create the base files if missing 2020-07-11 16:19:51 -07:00
Dane Everitt
c1e591c99b
Support generating a compressed archive for a server via the API 2020-07-11 13:13:49 -07:00
Matthew Penner
93228933bf
Merge branch 'develop' into feature/server-mounts 2020-07-11 12:32:34 -06:00
Matthew Penner
f7948939eb Log if a mount isn't allowed 2020-07-04 16:20:58 -06:00
Matthew Penner
f3419495cd Get the logger to log the cleaned mount paths as well 2020-07-04 15:38:50 -06:00
Matthew Penner
9f95efa3ae Clean the source and target paths when adding a mount 2020-07-04 15:37:52 -06:00
Matthew Penner
3a6050446f Add AllowedMounts configuration option, block any custom mounts if they are not in the AllowedMounts list 2020-07-04 15:32:53 -06:00
Matthew Penner
63e7bde39c
Merge branch 'develop' into feature/server-mounts 2020-07-04 15:17:59 -06:00
Matthew Penner
d339996b4e Tweaks to environment_docker.go, change container hostnames to use the server's uuid, add Domainname option 2020-07-04 15:14:22 -06:00
Dane Everitt
65809b5731
Don't crash when passing in an environment variable that isn't a string value 2020-07-02 20:32:17 -07:00
Dane Everitt
ea2630946a
Sync server state with Panel before performing installation to ensure information is up to date 2020-06-30 20:56:55 -07:00
Dane Everitt
79a582a5f2
Generate a nicer install log with more detailed information 2020-06-30 20:45:36 -07:00
Dane Everitt
1f6789cba3
Acquire exclusive lock when installing a server
Also allows aborting a server install mid-process when the server is deleted before the process finishes.
2020-06-22 21:38:16 -07:00
Dane Everitt
073247e4e1
Use 15 minute context timeout for pulling, not 10 seconds... closes #2130 2020-06-22 20:56:55 -07:00
Dane Everitt
a3d83d23bd
Don't try to send space available when loading from a configuration
Server is not always installed when this function is called, this will cause errors in those cases.
2020-06-22 20:52:23 -07:00
Dane Everitt
db31722cfc
Don't cause a double stacktrace on certain errors 2020-06-22 20:51:41 -07:00
Dane Everitt
7d4a8d7f7e
Update everything expect transfers & sftp to not use zap 2020-06-13 10:40:26 -07:00
Dane Everitt
198a22f446
Replace even more zap occurences 2020-06-13 10:26:35 -07:00
Dane Everitt
0ae286d617
Correctly handle empty values from the API requests; mergo by default thinks these "empty" values should be skipped 2020-05-31 12:42:10 -07:00
Dane Everitt
62e5547c6d
Merge pull request #32 from pterodactyl/issue/1796
Send disk usage when server is offline
2020-05-31 10:54:21 -07:00
Dane Everitt
f8bffd8391
Start the process of migrating from zap to a cleaner CLI output for logs 2020-05-28 22:07:53 -07:00
Dane Everitt
4b366ae19e
Don't cause a crash loop when part of the pre-server-boot process fails 2020-05-28 19:53:12 -07:00
Dane Everitt
54510057bb
Don't block server boot if there is an error pulling an image
Obviously this requires the image to exist locally, but should avoid widespread issues when Quay inevitably goes down again.

closes pterodactyl/panel#2076
2020-05-28 19:26:41 -07:00
Matthew Penner
74097cc4ad Fix sending status event to all subscribers, send disk usage when server is offline 2020-05-22 11:01:27 -06:00
Matthew Penner
4483bfa2aa Make mounts not get overridden when a server is updated 2020-05-21 15:13:27 -06:00
Matthew Penner
662eb17241 Pass server mounts into docker 2020-05-21 14:53:00 -06:00
Dane Everitt
276bd2be33
Don't quote environment variables; it is not needed in docker for this; closes pterodactyl/panel#2030 2020-05-17 17:06:01 -07:00
Dane Everitt
3fe884670d
Fix handling of files with special characters and spaces
closes pterodactyl/panel#2040
closes pterodactyl/panel#2038
2020-05-17 15:07:11 -07:00
Dane Everitt
804f3d5ca9
Always clean up the installer containers, even if there is an error during the process; closes pterodactyl/panel#2015 2020-05-09 19:57:29 -07:00
Dane Everitt
0bd28a4480
Cleanup S3 support; send actual backup details in response 2020-05-09 19:24:30 -07:00
Kawaii Neko Lolis
cfca0d7f07 Added network option to docker configuration 2020-05-10 03:29:56 +02:00
Dane Everitt
d178a0d96b
Don't fail deletion if container doesn't exist; closes pterodactyl/panel#2001 2020-05-09 17:16:41 -07:00
Dane Everitt
483b652087
Report memory stats using the same logic that docker uses for stats output; avoid extreme differences in output 2020-05-08 22:06:26 -07:00
Dane Everitt
ffd7357a1c
Calculate memory swap using the same memory overhead values as the hard cap; pterodactyl/panel#2000 2020-05-08 20:57:00 -07:00
Dane Everitt
b36f0de337
Remove dead code 2020-05-08 20:23:35 -07:00
Dane Everitt
b2cf222a3a
@DaneEveritt Guard against a nil-pointer if the container is not found; references pterodactyl/panel#2000 2020-05-08 20:19:44 -07:00
Dane Everitt
ced8a5bcbd
Formatting update 2020-05-08 20:16:16 -07:00
Dane Everitt
7bba1d4fd6
I guess this error could happen? Just return a crash state and let wings figure it out; closes #2003 (I hope?) 2020-05-07 21:08:06 -07:00
Dane Everitt
2e055cf630
Unsubscribe any open event listeners when deleting a server 2020-05-03 21:30:16 -07:00
Dane Everitt
ac011214f7
Ensure the temp directory exists before trying to make a directory in it 2020-05-03 21:04:16 -07:00
Dane Everitt
b2797ed292
Abstract out shared backup functionality 2020-05-02 15:02:02 -07:00
Dane Everitt
507d0100cf
Hilariously rough code to get a backup pushed into S3 2020-04-26 17:20:26 -07:00
Dane Everitt
91d12ab9a7
More abstract support for backups & misc code cleanup in that area 2020-04-26 16:43:18 -07:00
Dane Everitt
1e2da95d26
Support data coming from the panel better 2020-04-26 16:21:58 -07:00
Dane Everitt
b2f6863399
Set memory overheads higher than the limit so that hard crashes are less likely 2020-04-25 18:20:20 -07:00