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
Dane Everitt
7321fe1421
Make DNS settings for containers configurable, closes #1965
2020-04-25 12:18:18 -07:00
Dane Everitt
6395b8b56c
Support for .pteroignore files when generating backups
2020-04-19 19:52:19 -07:00
Dane Everitt
df6d98bbda
Add support for ignoring directories/files; fix compression of archives
2020-04-18 23:26:23 -07:00
Dane Everitt
8eaf590f78
Include full path to file in callback
2020-04-18 18:59:10 -07:00
Dane Everitt
3bca54655b
Adjust callback to support continuing or stopping at current depth
2020-04-18 18:51:19 -07:00
Dane Everitt
9dcf06d106
Merge branch 'develop' of https://github.com/pterodactyl/wings into develop
2020-04-18 15:31:37 -07:00
Dane Everitt
71d38ff62e
Cleanup logic for getting a directory size; support cancelation during goroutine
2020-04-18 15:31:34 -07:00
Michael Parker
a60e261a49
fixes tmp dir building
...
adds a / to the tmp directory
2020-04-18 15:23:56 -04:00
Dane Everitt
4279fa510e
Cleanup data storage locations for daemon
2020-04-17 14:27:06 -07:00
Dane Everitt
4ff7bd2777
Abstract out more of the backup functionality
2020-04-17 13:46:36 -07:00
Dane Everitt
11035b561a
Break out the backup functions of the daemon in prep for S3 support
2020-04-13 22:01:07 -07:00
Dane Everitt
2bf293823f
Fix state handing logic
2020-04-12 17:43:16 -07:00
Dane Everitt
b73f78a832
Fix configuration parsing
2020-04-12 17:39:19 -07:00
Dane Everitt
083bea5504
Add support for modifying daemon configuration on-the-fly
2020-04-11 16:17:46 -07:00
Dane Everitt
03045c94be
Better race condition prevention
2020-04-10 18:22:18 -07:00
Dane Everitt
17d204a631
Little bit of code refactoring
2020-04-10 18:07:57 -07:00
Dane Everitt
af241f3de4
Code cleanup
2020-04-10 18:03:35 -07:00
Dane Everitt
c57708d1e0
Merge pull request #20 from matthewpi/issues/1899
...
Improved server loading
2020-04-10 17:37:45 -07:00
Matthew Penner
1f4aca8210
Fix issue with config file saving, fix issue with state file saving, fix issue when merging a uuid into a server without one
2020-04-10 17:55:36 -06:00
Dane Everitt
2220eb049c
Avoid race condition when listing a directory
2020-04-10 16:43:05 -07:00
Matthew Penner
4ea1b90560
Merge branch 'develop' into issues/1899
2020-04-10 17:27:39 -06:00
Dane Everitt
d3cbf96c57
Avoid race condition while calculating directory size of server
2020-04-10 16:14:04 -07:00
Matthew Penner
acf425b705
Add a lock to the states file
2020-04-10 16:37:10 -06:00
Matthew Penner
1e12b7b37c
Remove server configurations files and add shared state file
2020-04-10 16:33:30 -06:00
Matthew Penner
28c8f3f400
Add the ability to fetch all servers, fix cpu usage leak again..
2020-04-10 15:39:07 -06:00
Matthew Penner
e719c67e0b
Removes SyncServersOnBoot configuration option and requires that servers are synced when the daemon boots
2020-04-10 12:16:04 -06:00
Matthew Penner
9e30d63818
Add debug logs when a non-500 error occurs, force sync the configuration during installation of a new server
2020-04-10 12:00:04 -06:00
Dane Everitt
33875105b6
Fix topic handling for websocket with namespace
2020-04-06 21:22:43 -07:00
Dane Everitt
222091b68c
Fire an event to the websocket when a backup is completed
2020-04-06 21:03:50 -07:00
Dane Everitt
45d441ac32
Check permissions when performing websocket actions
2020-04-06 21:03:39 -07:00
Dane Everitt
03311ecf03
Move over backup and create transfer logic
2020-04-05 19:07:16 -07:00
Dane Everitt
cf2ef1a173
Port most of the HTTP code over to gin
2020-04-05 18:00:33 -07:00
Dane Everitt
223b9e05a1
Merge pull request #16 from matthewpi/feature/server-transfers
...
Server Transfers (pterodactyl/panel#18 )
2020-04-05 11:06:34 -07:00
Dane Everitt
4ad57af990
Support one-time downloads of server backups
2020-04-04 19:55:23 -07:00
Matthew Penner
0ca9c8a114
Delete the server's archive when the server is deleted
2020-04-04 18:31:18 -06:00
Matthew Penner
5693d0431e
Merge branch 'develop' into feature/server-transfers
2020-04-04 17:17:09 -06:00
Dane Everitt
4ce2b73490
Add first implementation of local backups for a server
2020-04-04 16:07:25 -07:00
Matthew Penner
6af3cb2c9b
Get transfers 'fully' working, need to add fail request though
2020-04-04 16:15:49 -06:00
Matthew Penner
c096d8802f
Add configurable ArchiveDirectory
2020-04-04 00:17:32 -06:00
Matthew Penner
3dba11ac6f
Add ability to create archives of servers, add GET and POST /api/servers/:server/archive routes to get and request an archive of a server
2020-04-03 23:17:26 -06:00
Dane Everitt
019d028011
Add support for reinstalling a server
2020-04-03 13:43:13 -07:00
Dane Everitt
ddca34f9e8
Add support for defining specific threads for containers
2020-03-29 12:31:17 -07:00
Matthew Penner
8107532080
Revert style changes due to gofmt
2020-02-02 14:43:13 -07:00
Matthew Penner
07b1876954
Chown directories, not just files
2020-02-02 14:41:15 -07:00
Dane Everitt
ab54d2c416
Avoid triggering crash detection on container destroy
2020-01-19 14:00:59 -08:00
Dane Everitt
59299d3cda
Add code to notify panel when install is completed
2020-01-19 13:30:54 -08:00
Dane Everitt
7533e38543
Add support for running installation process when creating a server
2020-01-19 13:05:49 -08:00
Dane Everitt
99a11f81c3
Improve event emitter/subscription abilities
2020-01-18 14:04:26 -08:00
Dane Everitt
c6fcd8cabb
Send installation data over socket when running
2020-01-18 13:05:44 -08:00
Dane Everitt
5c3823de9a
Only dump pull status in debug
2019-12-28 15:14:56 -08:00
Dane Everitt
5350a2d5a5
Don't block the HTTP request while waiting on the installation
2019-12-28 15:12:12 -08:00
Dane Everitt
6ef2773c01
Very, very basic server installation process
2019-12-28 14:57:19 -08:00