TRITON-2520: Servers should not change UUID on reboot
Portions generated by: Claude <noreply at anthropic.com>
Reviewed by: Dan McDonald <danmcd at edgecast.io>
Reviewed by: Toomas Soome <tsoome at edgecast.io>
Approved by: Toomas Soome <tsoome at edgecast.io>
TRITON-2520: Fix syntax error and indentation in get_or_store_uuid
- Add missing space before ]] in conditional test
- Fix indentation to use spaces consistently
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply at anthropic.com>
OS-8701 (missing cleanup)
Reviewed by: Travis Paul <tpaul at edgecast.io>
Reviewed by: Toomas Soome <tsoome at edgecast.io>
Approved by: Toomas Soome <tsoome at edgecast.io>
OS-8701 smartos-live (and node-0.10 of node-fs-ext) need to freeze "nan" version
Reviewed by: Carlos Neira <cneira at edgecast.io>
Reviewed by: Travis Paul <tpaul at edgecast.io>
Reviewed by: Toomas Soome <tsoome at edgecast.io>
Approved by: Carlos Neira <cneira at edgecast.io>
OS-8698 smartos-live ucodecheck needs to address AMD fallback ucode
Reviewed by: Carlos Neira <carlos.neira at edgecast.io>
Reviewed by: Travis Paul <tpaul at edgecast.io>
Approved by: Travis Paul <tpaul at edgecast.io>
OS-8697 piadm's fatal() helper should echo all args (#1160)
Reviewed by: Carlos Neira <carlos.neira at edgecast.io>
Reviewed by: Dan McDonald <danmcd at edgecast.io>
Approved by: Dan McDonald <danmcd at edgecast.io>
Fix resource leaks and add handshake timeout in console proxy
Critical fixes for console connection handler:
1. Replace deprecated net.Stream() with new net.Socket()
2. Add cleanup() function with idempotent guard to prevent double-cleanup
3. Add 5-second timeout for zone console handshake
4. Ensure socket.destroy() called on all error paths:
- Client close
- Console socket error
- Client error
- Handshake timeout
- Handshake failure
5. Rename 'console' variable to 'consoleSocket' to avoid shadowing global
6. Truncate handshake error messages to prevent log spam
These fixes prevent file descriptor leaks and hanging connections that
could exhaust system resources under error conditions.
[3 lines not shown]
Add zoneadmd console handshake for non-KVM brands
The zoneadmd console_sock requires a protocol handshake before data flows.
Send 'IDENT C 0\n' and wait for 'OK' response before proxying data.
This matches the zlogin -C handshake protocol.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply at anthropic.com>
Use zoneadmd console socket instead of /dev/zcons device
The correct console socket for zlogin -C is managed by zoneadmd at
/var/run/zones/<zonename>.console_sock, not the /dev/zcons device.
All brands now use unix sockets:
- KVM: /zones/<uuid>/root/tmp/vm.console (serial console)
- Others: /var/run/zones/<zonename>.console_sock (zoneadmd console)
This allows simple net.Stream() connection for all brands.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply at anthropic.com>
Use socat to proxy zone console devices
fs.createReadStream doesn't work properly with character devices like
/dev/zcons/*/zoneconsole. Use socat instead to handle the device I/O
properly.
For non-KVM brands, spawn socat process per connection to proxy between
TCP socket and zone console device with proper raw/echo settings.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply at anthropic.com>