fix(banded ssid): treat "PPSK not on this band" as a quiet skip
The sibling-rotation path's "Embedded PPSK not found" error was being surfaced to the operator as a failure, but it's not — it just means the PPSK isn't mirrored on that band (GUEST was configured on one band only, which is a perfectly valid setup). Logging this as a sibling failure also poisoned the cron run status to "partial". Now: "not found"-style errors from updateEmbeddedPpsk on a sibling become info-level log entries and the loop continues. Other errors (API failures, permissions, etc.) still surface as warnings/failures. v1.10.1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "dashboard/unifi",
|
||||
"description": "UniFi network management, WiFi stats, and captive portal authentication for the Dashboard platform",
|
||||
"version": "1.10.0",
|
||||
"version": "1.10.1",
|
||||
"type": "library",
|
||||
"license": "MIT",
|
||||
"autoload": {
|
||||
|
||||
@@ -104,6 +104,18 @@ class RotatePasswords extends Command
|
||||
]);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
// "Not found" in a sibling just means the
|
||||
// PPSK isn't mirrored on that band — totally
|
||||
// normal if GUEST was only configured on one
|
||||
// band. Skip quietly; don't poison the
|
||||
// run status.
|
||||
if (str_contains($e->getMessage(), 'not found')) {
|
||||
\Illuminate\Support\Facades\Log::info('unifi.ppsk_sibling_skipped', [
|
||||
'sibling_wlan' => $siblingWlanId,
|
||||
'ppsk_name' => $ppsk->name,
|
||||
]);
|
||||
continue;
|
||||
}
|
||||
$this->error("Sibling rotate failed for wlan {$siblingWlanId}: {$e->getMessage()}");
|
||||
$failedPpsks[] = ['name' => $ppsk->name . ' (sibling wlan ' . $siblingWlanId . ')', 'error' => $e->getMessage()];
|
||||
}
|
||||
|
||||
@@ -314,7 +314,11 @@ class WifiController extends Controller
|
||||
]);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
\Illuminate\Support\Facades\Log::warning('unifi.ppsk_sibling_update_failed', [
|
||||
// PPSK absent on this band is fine — just
|
||||
// means it isn't mirrored. Anything else
|
||||
// gets warning-logged.
|
||||
$level = str_contains($e->getMessage(), 'not found') ? 'info' : 'warning';
|
||||
\Illuminate\Support\Facades\Log::log($level, 'unifi.ppsk_sibling_update', [
|
||||
'sibling_wlan' => $siblingWlanId,
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user