Prevent creating duplicate disk during sdc-migrate
Rename the nocloud createVolume function to createPcFs
to better reflect what it actually does.
Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
Store hash of metadata used to create nocloud volume
The hash is used to prevent unecessarily regenerating the filesystem.
Also refactor the involved functions to avoid many nested callbacks.
Reuse ip.netmaskToBits instead of duplicating netmask conversion
The local netmaskToCidr in nocloud.js was redundant with
netmaskToBits already exported from ip.js. Remove the duplicate
and use the shared utility.
Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
OS-8716 piadm : curl: (6) Could not resolve host: <timestamp>
Reviewed by: Dan McDonald <danmcd at edgecast.io>
Approved by: Dan McDonald <danmcd at edgecast.io>
Reviewed by: Nahum Shalman <nshalman at edgecast.io>
Approved by: Nahum Shalman <nshalman at edgecast.io>
Add named constants and improve protocol validation
- Add CONSOLE_HANDSHAKE_TIMEOUT (5000ms) and CONSOLE_LOG_TRUNCATE_LEN (100)
named constants to replace magic numbers
- Use stricter protocol validation: data.toString().trim() === 'OK'
instead of indexOf('OK') === 0 for more robust handshake checking
The stricter validation prevents false positives if the response contains
"OK" as a substring of a different message.
Addresses PR review feedback from https://github.com/TritonDataCenter/smartos-live/pull/1159
Co-Authored-By: Claude Opus 4.5 <noreply at anthropic.com>
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>