## Problem After satellite restart with patched linstor-server, some DRBD resources ended up in **Unknown** state. Investigation revealed a race condition between `drbdadm adjust` completion and `updateDiscGran()` lsblk check: 1. `drbdadm adjust` completes successfully (21:53:49.791) - brings devices up 2. `updateDiscGran()` immediately tries to check discard granularity (21:53:49.799) 3. `/dev/drbd*` device node doesn't exist yet - kernel hasn't created it 4. `lsblk` fails with exit code 32: "not a block device" 5. `StorageException` interrupts DeviceManager cycle (21:53:50.811) 6. DRBD device remains in incomplete state → **Unknown** ### Timeline from logs ``` 21:53:49.791 - [DeviceManager] Resource 'pvc-aafbd92a' [DRBD] adjusted ✓ 21:53:49.799 - [lsblk_parser] ERROR: /dev/drbd1169 not a block device 21:53:49.804-50.807 - [lsblk_parser] 10+ retry errors (every ~100ms) 21:53:50.811 - [DeviceManager] ERROR: Error executing lsblk 21:53:50.878 - [DeviceManager] End cycle 9 (WITH ERROR!) ``` ## Solution Update `skip-adjust-when-device-inaccessible.diff` patch to add physical device path existence check before calling `lsblk`: - Check `Files.exists(devicePath)` in `updateDiscGran()` before lsblk - If device doesn't exist yet → skip check, set `discGran = UNINITIALIZED_SIZE` - Next DeviceManager cycle (few seconds later) → device node available → lsblk succeeds This complements the existing patch which checks **child layer** devices (LUKS/Storage) for deletion scenarios, while this fix addresses the **DRBD device itself** during adjust operations. ## Testing Manual `drbdadm up` on affected devices confirmed they were in down state and brought them back to UpToDate, proving the issue was incomplete device initialization. ## Related - Upstream linstor-server PR: https://github.com/LINBIT/linstor-server/pull/471#issuecomment-3723392917 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Enhanced robustness for storage operations by adding device accessibility validation. Operations now gracefully skip when device paths are unavailable or invalid, preventing unnecessary failures and improving system resilience during device access issues. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|---|---|---|
| .github | ||
| api | ||
| cmd | ||
| dashboards | ||
| docs | ||
| hack | ||
| img | ||
| internal | ||
| packages | ||
| pkg | ||
| scripts | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| ADOPTERS.md | ||
| AGENTS.md | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| CONTRIBUTOR_LADDER.md | ||
| go.mod | ||
| go.sum | ||
| GOVERNANCE.md | ||
| LICENSE | ||
| MAINTAINERS.md | ||
| Makefile | ||
| README.md | ||
Cozystack
Cozystack is a free PaaS platform and framework for building clouds.
Cozystack is a CNCF Sandbox Level Project that was originally built and sponsored by Ænix.
With Cozystack, you can transform a bunch of servers into an intelligent system with a simple REST API for spawning Kubernetes clusters, Database-as-a-Service, virtual machines, load balancers, HTTP caching services, and other services with ease.
Use Cozystack to build your own cloud or provide a cost-effective development environment.
Use-Cases
-
Using Cozystack to build a public cloud
You can use Cozystack as a backend for a public cloud -
Using Cozystack to build a private cloud
You can use Cozystack as a platform to build a private cloud powered by Infrastructure-as-Code approach -
Using Cozystack as a Kubernetes distribution
You can use Cozystack as a Kubernetes distribution for Bare Metal
Documentation
The documentation is located on the cozystack.io website.
Read the Getting Started section for a quick start.
If you encounter any difficulties, start with the troubleshooting guide and work your way through the process that we've outlined.
Versioning
Versioning adheres to the Semantic Versioning principles.
A full list of the available releases is available in the GitHub repository's Release section.
Contributions
Contributions are highly appreciated and very welcomed!
In case of bugs, please check if the issue has already been opened by checking the GitHub Issues section. If it isn't, you can open a new one. A detailed report will help us replicate it, assess it, and work on a fix.
You can express your intention to on the fix on your own. Commits are used to generate the changelog, and their author will be referenced in it.
If you have Feature Requests please use the Discussion's Feature Request section.
Community
You are welcome to join our Telegram group and come to our weekly community meetings. Add them to your Google Calendar or iCal for convenience.
License
Cozystack is licensed under Apache 2.0.
The code is provided as-is with no warranties.
Commercial Support
A list of companies providing commercial support for this project can be found on official site.
