Matthew Penner
e79694d6d2
config: add ability to enable/disable server crash detection
...
fixes https://github.com/pterodactyl/panel/issues/3617
Co-authored-by: Alex <admin@softwarenoob.com>
2021-09-13 15:04:28 -06:00
Dane Everitt
09e1ba6f34
Use the request context for cancelation, not a background context
...
This also fixes an improperly written server deletion listener to look at the correct context cancelation.
Theoretically this should help address the issues in pterodactyl/panel#3596 but I'm not really sure how that happens, and theres no steps for reproduction.
2021-09-12 11:14:00 -07:00
Dane Everitt
ee91224eb6
add context timeouts to avoid hanging wings boot process if docker has a hiccup; closes pterodactyl/panel#3358
2021-09-11 14:13:19 -07:00
Matthew Penner
5cd43dd4c9
archive: keep timestamps when extracting
2021-09-01 09:54:41 -06:00
Dane Everitt
3b5e042ccc
Simplify logic when creating a new installer; no longer requires an entire server object be passed.
2021-08-29 14:08:01 -07:00
Dane Everitt
5764894a5e
Cleanup server sync logic to work in a single consistent format ( #101 )
...
* Cleanup server sync logic to work in a single consistent format
Previously we had a mess of a function trying to update server details from a patch request. This change just centralizes everything to a single Sync() call when a server needs to update itself.
We can also eventually update the panel (in V2) to not hit the patch endpoint, rather it can just be a generic endpoint that is hit after a server is updated on the Panel that tells Wings to re-sync the data to get the environment changes on the fly.
The changes I made to the patch function currently act like that, with a slightly fragile 2 second wait to let the panel persist the changes since I don't want this to be a breaking change on that end.
* Remove legacy server patch endpoint; replace with simpler sync endpoint
2021-08-29 13:37:18 -07:00
Dane Everitt
c279d28c5d
Correctly set the egg values to avoid allowing blocked files to be edited; closes pterodactyl/panel#3536
2021-08-15 17:53:54 -07:00
Dane Everitt
f7c8571f46
Fix race condition when setting app name in console output
2021-08-15 16:46:55 -07:00
Matthew Penner
25f3cb60cb
server: actually use StartOnCompletion and CrashDetectionEnabled
2021-08-03 16:26:25 -06:00
Dane Everitt
a33ac304ca
Perhaps don't break _everything_ on people.
2021-08-02 20:02:27 -07:00
Matthew Penner
3c54c1f840
break everything
...
- upgrade dependencies
- run gofmt and goimports to organize code
- fix typos
- other small tweaks
2021-08-02 15:07:00 -06:00
Matthew Penner
31ff3f8b56
server(fs): keep file mode when extracting archive
2021-07-15 15:37:38 -06:00
Matthew Penner
29b2d6826a
archive: fix socket files aborting backups
2021-07-12 10:17:56 -06:00
Matthew Penner
73570c7144
installer: support 'start_on_completion' ( #96 )
2021-07-04 15:08:05 -07:00
kaziu687
c0a487c47e
Fix environment variables with the same prefix being skipped unintentionally ( #98 )
...
If you have two env variables (for example ONE_VARIABLE and ONE_VARIABLE_NAME) ONE_VARIABLE_NAME has prefix ONE_VARIABLE and will be skipped.
Co-authored-by: Jakob <dev@schrej.net>
2021-07-04 15:07:46 -07:00
Dane Everitt
8336f6ff29
Apply container limits to install containers, defaulting to minimums if the server's resources are set too low
2021-06-20 17:21:51 -07:00
Dane Everitt
f74a74cd5e
Merge pull request #93 from JulienTant/develop
...
Add decompress tests
2021-06-05 08:46:14 -07:00
Dane Everitt
49dd1f7bde
Better support for retrying failed requests with the API
...
Also implements more logic error returns from the Get/Post functions in the client, rather than making the developer call r.Error() on responses.
2021-05-02 15:41:02 -07:00
Dane Everitt
ddfd6d9cce
Modify backup process to utilize contexts and exponential backoffs
...
If a request to upload a file part to S3 fails for any 5xx reason it will begin using an exponential backoff to keep re-trying the upload until we've reached a minute of trying to access the endpoint.
This should resolve temporary resolution issues with URLs and certain S3 compatiable systems such as B2 that sometimes return a 5xx error and just need a retry to be successful.
Also supports using the server context to ensure backups are terminated when a server is deleted, and removes the http call without a timeout, replacing it with a 2 hour timeout to account for connections as slow as 10Mbps on a huge file upload.
2021-05-02 12:28:36 -07:00
Julien Tant
35b2c420ec
add decompress tests
2021-04-25 16:44:54 -07:00
Dane Everitt
daaef5044e
Correctly determine name for archive files when decompressing; closes pterodactyl/panel#3296
2021-04-25 15:36:00 -07:00
Dane Everitt
0676a82a21
Add better error handling for filesystem
2021-04-17 13:29:18 -07:00
Dane Everitt
4b244e96fb
Fix .rar file decompression; closes pterodactyl/panel#3267
2021-04-17 13:13:37 -07:00
Dane Everitt
f57c24002e
More API response fixing
2021-04-04 10:20:27 -07:00
Dane Everitt
2e0496c1f9
Add note about handling of UTF-8 sequences in properties files.
2021-04-03 14:02:37 -07:00
Dane Everitt
76b7967fef
Merge pull request #88 from Antony1060/develop
...
Added app name
2021-04-03 11:13:29 -07:00
Dane Everitt
1b1eaa3171
Avoid expensive copies of the config for every line output
2021-04-03 11:11:36 -07:00
Dane Everitt
b448310a33
Correctly return servers installed on wings and their resource usage
2021-04-03 11:08:26 -07:00
antony1060
0c17e240f4
Added app name
2021-03-24 10:26:03 +01:00
Matthew Penner
471886dd34
internally mark if a server is restoring to restrict actions
2021-03-12 16:19:35 -07:00
Matthew Penner
0e3778ac47
transfers: use backup archiver
2021-03-07 11:04:15 -07:00
Dane Everitt
fb2dc39a47
Remove some forgotten debug
2021-03-03 21:00:58 -08:00
Dane Everitt
0919fb2da6
Improve error handling and reporting for server installation & process boot
2021-03-03 20:56:18 -08:00
Dane Everitt
2eb721bbe7
Merge branch 'dane/api-cleanup' into develop
2021-02-23 21:25:10 -08:00
Matthew Penner
5c56ddf5d6
fs: only mkdir and chown if not exists
2021-02-10 13:58:47 -07:00
Matthew Penner
683c766d0f
fs: fix potential panic when chowning a file
2021-02-05 13:30:02 -07:00
Dane Everitt
1da415c177
Revert "Don't tempt people with this public interface"
...
This reverts commit e3b0b91912
.
2021-02-01 21:43:10 -08:00
Dane Everitt
e3b0b91912
Don't tempt people with this public interface
2021-02-01 21:33:03 -08:00
Dane Everitt
bfff094216
Get wings booting properly
2021-02-01 21:32:34 -08:00
Dane Everitt
98c68142cd
Remove all of the remaining API logic and port it all to the remote.Client type
2021-02-01 21:28:46 -08:00
Dane Everitt
62cbe5e135
Migrate SFTP endpoints
2021-02-01 20:59:17 -08:00
Dane Everitt
6775c17324
Nuke more API code and begin consolidation process
2021-02-01 20:50:23 -08:00
Dane Everitt
1393937904
Fix race condition and flawed logic mis-querying panel for servers; closes pterodactyl/panel#3059
2021-02-01 20:26:15 -08:00
Matthew Penner
de9b413bc2
Call cancel function for context to not leak resources
2021-02-01 20:09:24 -07:00
Dane Everitt
ba6cec9615
Merge branch 'dane/backup-restore' into develop
2021-01-30 18:51:35 -08:00
Dane Everitt
4bd18f7dd8
Send restoration status information to the console
2021-01-30 18:49:07 -08:00
Dane Everitt
adc0732af3
Better error handling and logging for restorations
2021-01-30 18:43:35 -08:00
Dane Everitt
df721f45f8
Reset the whole build block to avoid merge issues with 0 values
2021-01-27 21:41:13 -08:00
Dane Everitt
4411493006
Merge branch 'develop' into dane/backup-restore
2021-01-25 20:32:32 -08:00
Dane Everitt
31757a68a9
Fix race condition
2021-01-25 20:29:34 -08:00