OS-8722 Propagate org.smartos:virtio image tag to bhyve zone attribute
Read the org.smartos:virtio tag from image manifests in validateImage(),
propagate it through validateImages() to the payload, and write it as a
zone attribute in buildZonecfgUpdate(). This allows boot.c (in
illumos-joyent) to select legacy or modern virtio mode based on the
image tag.
Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
OS-8721 SmartOS builds in Jenkins should guarantee different buildstamps per stage
Reviewed by: Travis Paul <tpaul at edgecast.io>
Approved by: Travis Paul <tpaul at edgecast.io>
OS-8711 Support cloud-init NoCloud datasource for Bhyve guests
Portions contributed by: Claude Opus 4.5 & 4.6 <noreply at anthropic.com>
Reviewed by: Dan McDonald <danmcd at edgecast.io>
Reviewed by: Carlos Neira <cneira at edgecast.io>
Approved by: Dan McDonald <danmcd at edgecast.io>
Refactor nocloud disk topology out of VM.js
Move the nocloud disk construction and validation logic from VM.js
into the nocloud modules.
Remove the DISK_SIZE_MIB and BLOCK_SIZE re-exports from the
nocloud module as they no longer need to be re-exported from
lofs-fat16.js.
Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
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>