summaryrefslogtreecommitdiffstats
path: root/src/server
Commit message (Collapse)AuthorAgeFilesLines
* [SERVER] Don't shutdown uplink if background replication is FULLSimon Rettberg2019-02-131-1/+1
|
* [SERVER] uplink: Dedicated function for handling link failureSimon Rettberg2019-02-081-31/+50
|
* [SERVER] integrity: Group check requests, use sync_file_range()Simon Rettberg2019-02-041-25/+51
| | | | | | | This requires a much shorter queue and balances hashing between different images if the checker lags behind. On Linux, use sync_file_range() instead of fsync() before reading back to speed up flushing.
* [SERVER] Cosmetic changes (loglvl, comment)Simon Rettberg2019-02-041-2/+2
|
* [SERVER] Export image idle time in json rpcSimon Rettberg2019-01-311-3/+6
| | | | Counter in seconds for how long this image hasn't been used.
* [SERVER] altservers.c: Improve log outputSimon Rettberg2019-01-312-20/+19Star
|
* [SERVER] Don't keep an uplink connection established foreverSimon Rettberg2019-01-314-45/+85
| | | | | | In case we don't use background replication a connection to an uplink server can potentially stay around forever. This in turn would prevent the uplink server from freeing the image as it appears to be in use.
* [SERVER] uplink: Check for _maxPayload when getting client requestSimon Rettberg2019-01-311-0/+4
| | | | | | It didn't make too much sense that we only checked _maxPayload when the reply arrived; simply don't forward a request where we already know we won't handle the reply.
* [SERVER] Lower log-level of non-critical messageSimon Rettberg2019-01-302-2/+3
|
* [SERVER] Only set BGR flag in handshake for BGR_FULLSimon Rettberg2018-11-161-1/+1
| | | | | | | _backgroundReplication was still treated as a boolean flag, so a server with BGR_NONE would reject a server with BGR_HASHBLOCK. While this still forces the BGR_NONE proxy to replicate more than it normally would, it seems reasonable to allow this.
* [SERVER] Fix json format stringSimon Rettberg2018-11-161-1/+1
| | | | Don't drop runId
* [SERVER] rpc: Distinguish between client and server (proxy) connectionsSimon Rettberg2018-08-143-8/+18
|
* [SERVER] Fix last block replicating indefinitely in hasblock modeSimon Rettberg2018-08-141-5/+7
|
* [SERVER] Use atomic vars for uplink byte countersSimon Rettberg2018-08-132-28/+5Star
|
* [SERVER] Use atomic var for (total)bytesSent countersSimon Rettberg2018-08-085-102/+62Star
| | | | | | Gets rid of the lastBytesSent field as well as the stats lock per client. Cleaned and split up the messy net_clientsToJson function while at it.
* [SERVER] Add missing file mode to open() callSimon Rettberg2018-07-261-2/+2
|
* [SERVER] Fix compilation on clang (atomic vars)Simon Rettberg2018-07-101-4/+4
|
* [SERVER] Reload server config on SIGHUPSimon Rettberg2018-07-103-70/+96
| | | | | | | Most config settings can now be changed at runtime using SIGHUP. This currently excludes the basePath, listenPort, and the client and image count limits, as well as vmdkLegacyMode.
* [SERVER] Fix use of wrong constant; increase queue len for hash checkerSimon Rettberg2018-07-101-1/+1
|
* [SERVER] Reduce spam some moreSimon Rettberg2018-07-091-1/+1
|
* [SERVER] Introduce backgroundReplication=hashblockSimon Rettberg2018-07-093-38/+142
| | | | | | | | This is a compromise; if you want to validate replicated data fairly quickly, using this option will make background replication only kick in when there's a "dirty" 16M block, i.e. some blocks within a 16M block are cached locally, but not all. Completing the block makes it possible to validate its CRC32 checksum.
* [SERVER] Reduce debug spamSimon Rettberg2018-07-091-2/+1Star
|
* [SERVER] Don't keep bg replication blocks in fs cacheSimon Rettberg2018-07-051-1/+5
| | | | | | Further improving cache handling, don't keep blocks in cache that have been requested via background replication. It's likely these aren't needed in the near future.
* [SERVER] Always use fsync instead of fdatasyncSimon Rettberg2018-07-051-8/+2Star
| | | | | | | | Now that we support sparse files, using just fdatasync isn't safe anymore. Instead of handling both cases differently just drop fdatasync, the difference has probably been marginal all along anyways.
* [SERVER] Use O_DIRECT for integrity checksSimon Rettberg2018-07-042-30/+67
| | | | | | | | | | | | | | The idea is that for full image checks, we don't want to pollute the fs cache with gigabytes of data that won't be needed again soon. This would certainly hurt performance on servers that dont have hundreds of GBs of RAM. For single block checks during replication this has the advantage that we don't check the block in memory before it hit the disk once, but actually flush the data to disk, then remove it from the page cache, and only then read it again, from disk. TODO: Might be worth making this a config option
* [SERVER] Refactor uplink/cache handling, improve crc checkingSimon Rettberg2018-07-048-289/+350
| | | | | | | | | | | | | The cacheFd is now moved to the uplink data structure and will only be handled by the uplink thread. The integrity checker now supports checking all blocks of an image. This will be triggered automatically whenever a check for a single block failed. Also, if a crc check on startup fails, the image won't be discarded anymore, but rather a full check will be initiated. Furthermore, when calling image_updateCacheMap() on an image that was previously complete, the cache map will now be re-initialized, and a new uplink connection created.
* [SERVER] Use likely/unlikely in uplink disk writing loopSimon Rettberg2018-06-251-4/+4
|
* [SERVER] Try to re-open cacheFd if writing failsSimon Rettberg2018-06-253-7/+58
| | | | | | | In scenarios where the proxy is using an NFS server as storage (for whatever crazy reason) or when the cacheFd goes bad through e.g. a switchroot, try to re-open it instead of just disabling caching forever.
* [SERVER] Make sure image has read fd before readingSimon Rettberg2018-06-133-29/+60
|
* [SERVER] Print info about signal senderSimon Rettberg2018-05-031-5/+46
|
* [SERVER] Don't spam log in vmdkLegacyMode for unknown imagesSimon Rettberg2018-05-021-3/+7
|
* [SERVER] Proper exit code and message when shutting down due to error or signalSimon Rettberg2018-04-271-2/+6
|
* [SERVER] Fix deadlock on shutdown (via image_tryFreeAll)Simon Rettberg2018-04-241-4/+8
| | | | | imageListLock was locked on twice in the call stack, which is bad if you're using non-recursive locks.
* [SERVER] Acquire write lock before initializing arraySimon Rettberg2018-04-161-1/+5
|
* [SERVER] Add bgrMinClients: Thresold to control when BGR startsSimon Rettberg2018-04-123-5/+16
| | | | | Background replication will not kick in if there aren't at least that many clients connected.
* [SERVER] Mark spammy replication messages as DEBUG2 instead of 1Simon Rettberg2018-04-111-3/+3
|
* [SERVER] Option to disable timestamps on stdout/console (default: disabled)Simon Rettberg2018-04-111-1/+3
|
* [SERVER] More error handling and logging when caching received data to diskSimon Rettberg2018-04-101-4/+13
|
* [SERVER] Ignore SIGPIPESimon Rettberg2018-04-101-0/+1
|
* [SERVER] Error handling and logging when saving cache mapSimon Rettberg2018-04-101-24/+37
|
* [SERVER] Delete image files after releasing image to get rid of stale .map filesSimon Rettberg2018-03-191-7/+9
|
* [SERVER] image.c: Add size to RPC data, rename bytesReceived, always add ↵Simon Rettberg2018-03-191-7/+11
| | | | uplink if existent
* [SERVER] Increase read() block size when calculating CRC32Simon Rettberg2018-03-191-1/+1
|
* [SERVER] image_getCompletenessEstimate: Fix reversed logic in timeout checkSimon Rettberg2018-03-191-1/+3
|
* [SERVER] Fix int overflows on 32bit builds in CRC generationSimon Rettberg2018-03-162-7/+7
|
* [SERVER] Make sparse file mode actually workSimon Rettberg2018-03-163-9/+24
|
* [SERVER] Experimental support for sparse files in proxy modeSimon Rettberg2018-03-155-11/+67
| | | | | | | | | | | | Will not preallocate images in this mode. Old images are only deleted if the disk is full, determined by write() calls to the cache file yielding ENOSPC or EDQUOT. In such a case, the least recently used image(s) will be deleted to free up at least 256MiB, and then the write() call will be repeated. This *should* work somewhat reliably unless the cache partition is ridiculously small. Performance might suffer a little, and disk fragmentation might occur much faster than in prealloc mode. Testing is needed.
* [SERVER] Make TSAN happySimon Rettberg2017-12-191-1/+3
|
* [SERVER] jansson < 2.6 compatSimon Rettberg2017-11-101-0/+5
|
* [SERVER] Check RLIMIT_NOFILE on startup and try to increase if requiredSimon Rettberg2017-11-081-0/+39
|