Skip to content

fix(activate): restart discovery-client when it ignores a re-created … - #39

Merged
roiyz-lb merged 1 commit into
mainfrom
fix/cold-node-activation
Oct 5, 2026
Merged

roiyz-lb merged 1 commit into
mainfrom
fix/cold-node-activation

Conversation

@roiyz-lb

@roiyz-lb roiyz-lb commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

…config (cold node)

On the last deactivation the plugin disconnects the subsystem and removes its discovery-client config. On the next activation it rewrites the config and waits for discovery-client to connect, which after such a full teardown the daemon reliably did not do (LightOS 3.20.1, validated 2026-10-04: no reconnect for 9+ minutes, every qm start failing after the 60 s wait, while systemctl restart discovery-client made the next start succeed).

activate_volume now nudges the daemon once if no connection shows up within $DSC_NUDGE_AFTER (10 s) of writing the config and keeps waiting up to $DSC_CONNECT_WAIT (45 s), warning in the task log why. Harmless for running guests: NVMe connections are kernel-owned and survive a daemon restart (even kill -9, verified live).

t/activate_volume_cold_node.t covers no-nudge-when-connected, exactly one nudge then success, and the unchanged failure when nothing helps.

Claude-Session: https://claude.ai/code/session_016GZ6hHkdagCwHQXx8beKDk

Description

What does this change do and why?

Type of change

  • Bug fix
  • New feature
  • Documentation
  • CI / tooling

Testing

  • perl -c LightbitsPlugin.pm passes
  • shellcheck scripts/install.sh scripts/uninstall.sh passes
  • Tested on a real Proxmox VE node (describe below, or explain why not applicable)

Test notes:

DCO

By submitting this pull request I certify that my contribution is made under the terms of the Developer Certificate of Origin and that each commit includes a Signed-off-by line (git commit -s).

…config (cold node)

On the last deactivation the plugin disconnects the subsystem and removes
its discovery-client config. On the next activation it rewrites the config
and waits for discovery-client to connect, which after such a full teardown
the daemon reliably did not do (LightOS 3.20.1, validated 2026-10-04: no
reconnect for 9+ minutes, every `qm start` failing after the 60 s wait,
while `systemctl restart discovery-client` made the next start succeed).

activate_volume now nudges the daemon once if no connection shows up within
$DSC_NUDGE_AFTER (10 s) of writing the config and keeps waiting up to
$DSC_CONNECT_WAIT (45 s), warning in the task log why. Harmless for running
guests: NVMe connections are kernel-owned and survive a daemon restart (even
kill -9, verified live).

t/activate_volume_cold_node.t covers no-nudge-when-connected, exactly one
nudge then success, and the unchanged failure when nothing helps.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GZ6hHkdagCwHQXx8beKDk
@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: LightBitsLabs/pve-lightbits/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 96bbd260-8887-4574-845a-69c1689d26b1
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@roiyz-lb
roiyz-lb merged commit e1e62e9 into main Oct 5, 2026
2 checks passed
@roiyz-lb
roiyz-lb deleted the fix/cold-node-activation branch October 5, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant