- bug-1872 (worker): "Failed to find any disk statistics in /proc/diskstats" ERROR every 15 s on an NVMe-only host. The whole-disk filter guessed from the name and skipped anything ending in a digit or containing 'p' -- every nvmeXnY, mmcblkN, even sdp -- so io was never reported. diskstats.h now counts a device only when /sys/block/<name>/device exists (real disks; not partitions, loop, dm, md, zram), and a host with no disk warns once. - bug-1873 (worker): "Failed to get worker pid" WARN on job start. MainPID reads 0 until systemd has forked the new transient unit; xcecd.c already retries, so the miss is DEBUG and the final failure names the unit. - bug-1874 (scheduler): deprecation WARN for the legacy xce_sched_fcfs on every start, though builtin_fcfs is the picker. Registration still wraps a job_elect_fn plugin but no longer warns; selecting one warns once. - bug-1875 (apiserver): "Not running as root -- PAM authentication will not work" with the default provider config_file; now only for provider pam. - bug-1876 (controller): standbys logged "cluster_init_phase2 ... failed (rc=-22)" WARN every 3 s while waiting for the primary's config push, a state the function itself calls normal. It returns -EAGAIN for that wait; callers log it at INFO, other failures still WARN. - bug-1877 (controller): "WAL/snapshot stored unencrypted" warned without looking. persist_path_encrypted() checks fscrypt (statx) and dm-crypt (sysfs dm/uuid CRYPT-, through LVM slaves); the warning stays when the storage is not shown to be encrypted (e.g. a plain /tmp). Tests: worker diskstats_test (2 of 4 RED on the old filter with pc13v's /proc/diskstats), controller test_phase2_cold_boot and test_persist_encryption, scheduler picker tests, apiserver TestRootWarning. Full ASAN build: all 113 suites pass (controller 319/0, harness 141/0). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| include | ||
| scripts | ||
| src | ||
| testsuite | ||
| CLAUDE.md | ||
| meson.build | ||
| README.md | ||
Cross-Platform Xcecd Process
This is a cross-platform process manager implementation in C that supports both Linux and Windows platforms. The xcecd provides the following features:
- Sending status to the remote controller module at port 6789 and receive job requests
- Maintains a configurable thread pool for request processing
- Periodically collects and updates system resource status
- Manages child processes spawned from received commands
- Caches job status information
- Uses Unix Domain Sockets for communication between the main process and worker processes
Building
Prerequisites
- C compiler with C11 support
- Windows: Visual Studio
- Linux: GCC and development tools
Build Instructions
On Linux
make
On Windows
nmake
Configuration
The xcecd can be configured through the following parameters in main.c:
thread_pool_size: Number of threads in the thread pool (default: 4)resource_update_interval: Interval for updating system resource status in seconds (default: 1)job_status_update_interval: Interval for updating job status in seconds (default: 1)port: Port number to listen on (default: 7869)acct_file_path: Path to the accounting file (default:/tmp/xcecd.acct)log_file_path: Path to the log file (default:/tmp/xcecd.log)domain_sock_path: Path to the Unix Domain Socket file (default:/tmp/xcecd.sock)remote_host: Remote server address (default:lchen02)remote_port: Remote server port (default: 6789)update_interval: Interval for sending status updates to the remote server (default: 1 second)
Usage
Starting the Xcecd
On Windows:
xcecd.exe
On Linux:
./xcecd
Features
-
Cross-Platform Support
- Works on both Windows and Linux
- Abstracts platform-specific implementations
-
Thread Pool
- Configurable number of worker threads
- Efficient request handling
-
System Monitoring
- CPU usage monitoring
- Memory usage monitoring
- Disk space monitoring
-
Process Management
- Spawns child processes for received commands
- Tracks process status
- Manages process lifecycle
-
Network Communication
- TCP socket-based communication
- Simple text-based protocol
-
Unix Domain Socket Communication
- Uses Unix Domain Sockets for communication between the main process and worker processes
Architecture
The xcecd is composed of several key components:
- Main Process: Coordinates all components and manages the lifecycle
- Thread Pool: Handles concurrent request processing
- System Monitor: Collects and updates system resource information
- Process Manager: Manages child processes and their status
- Network Handler: Handles network communication and request receiving
- Resource Sync: Synchronizes and aggregates resource collection thread, system monitor, and job information
Contributing
Feel free to submit issues and enhancement requests!