Skip to content

fix(replication): let RemoteDefaultExports suppress remote default exports (#55) - #93

Merged
dmann000 merged 1 commit into
mainfrom
fix/replica-link-default-exports
Aug 4, 2026
Merged

fix(replication): let RemoteDefaultExports suppress remote default exports (#55)#93
dmann000 merged 1 commit into
mainfrom
fix/replica-link-default-exports

Conversation

@dmann000

@dmann000 dmann000 commented Aug 4, 2026

Copy link
Copy Markdown
Owner

What

New-PfbFileSystemReplicaLink -RemoteDefaultExports was a [switch], so it could only ever send remote_default_exports=true. Omitting it sent nothing, letting the array apply its own default (create the exports). There was no way to send false.

Consequence, hit on every share during an active field migration: each replicated file system came up with default NFS/SMB exports on the remote array that had to be deleted by hand.

Fix

  • -RemoteDefaultExports becomes [Nullable[bool]], matching the module's existing tri-state idiom (e.g. New-PfbFileSystem -SnapshotDirectoryEnabled, -Writable).
  • The query param is sent only when the caller bound it, guarding on presence ($PSBoundParameters.ContainsKey) not truthiness, so $false reaches the wire:
    • omitted → array default (unchanged behavior)
    • $trueremote_default_exports=true
    • $falseremote_default_exports=false (previously impossible)

Tests

Adds Tests/New-PfbFileSystemReplicaLink.Tests.ps1 — the cmdlet had no test file. Asserts the wire value for all three states, the required selectors, and that the parameter is a nullable bool rather than a switch. Green on Pester 6.0.1 (6/6).

Breaking change

The bare -RemoteDefaultExports switch form now requires a value: use -RemoteDefaultExports $true. Worth a CHANGELOG "breaking" note when the release is cut.

Scope

This is the replica-link half of #55, which is verified and safe. The create-side half (suppressing the array_server default exports on New-PfbFileSystem) is intentionally not included here: neither default_exports nor remote_default_exports is modeled in the committed capability map, and the raw spec is not committed, so the exact create-side wire shape (empty array vs bool vs query key) can't be confirmed from repo artifacts. The field user is compiling written API notes with the exact observation; that half stays tracked in #55 to land once the wire format is confirmed, rather than guessed.

Refs #55.

…ports (#55)

New-PfbFileSystemReplicaLink exposed -RemoteDefaultExports as a [switch],
so it could only ever request remote_default_exports=true. When omitted the
array applied its own default (create the exports), and there was no way to
send false. Result: every replicated file system came up with default
NFS/SMB exports that had to be deleted by hand on the remote array.

Change the parameter to [Nullable[bool]] (matching the module's existing
tri-state idiom, e.g. New-PfbFileSystem -SnapshotDirectoryEnabled) and send
remote_default_exports only when the caller bound it, guarding on presence
not truthiness so false reaches the wire:
  - omitted -> array default (unchanged behavior)
  - $true   -> remote_default_exports=true
  - $false  -> remote_default_exports=false (previously impossible)

Adds Tests/New-PfbFileSystemReplicaLink.Tests.ps1 (the cmdlet had none),
asserting the wire value for all three states plus the parameter type.

Breaking change: the bare -RemoteDefaultExports switch form now requires a
value (-RemoteDefaultExports $true).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dmann000 dmann000 mentioned this pull request Aug 4, 2026
@dmann000
dmann000 merged commit e5abcea into main Aug 4, 2026
8 checks passed
@dmann000
dmann000 deleted the fix/replica-link-default-exports branch August 4, 2026 15:52
dmann000 added a commit that referenced this pull request Aug 4, 2026
Bumps ModuleVersion 2.2.0 -> 2.3.0, adds the 2.3.0 CHANGELOG entry, and
refreshes the manifest ReleaseNotes highlight.

This is the release-gating PR and should merge LAST, after the three
reviewed-ready PRs it documents: #91 (array-connection remote_names / #64),
#92 (HTTP status in errors), and #93 (RemoteDefaultExports suppression / #55).

Includes two disclosed breaking changes (see CHANGELOG "Changed"): the
Update-PfbArrayConnection -Name/-RemoteName alias collision, and
New-PfbFileSystemReplicaLink -RemoteDefaultExports becoming [Nullable[bool]].

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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