Skip to content

Add maintenance mode cmdlets to the PowerShell module - #6166

Open
npink42 wants to merge 61 commits into
masterfrom
PS-ServiceControl-Maintenance-Mode
Open

npink42 wants to merge 61 commits into
masterfrom
PS-ServiceControl-Maintenance-Mode

Conversation

@npink42

@npink42 npink42 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Draft pr. I will add detail if testing works out.

rbev and others added 5 commits October 27, 2026 15:45
Adds Enable- and Disable-ServiceControlMaintenanceMode and the audit equivalents, with sc-maintenance-on/off and audit-maintenance-on/off aliases. Each cmdlet stops the service, updates the maintenance mode setting, and starts the service.
…6154)

* fix: Keep the endpoints on messages re-imported by --import-failed-errors

* fix: Update retention period settings for event logs in sweep tests

* fix: Improve error handling and resource management in failed error imports
@npink42
npink42 marked this pull request as draft November 20, 2026 13:13
Start- stops the service, enables maintenance mode, and starts the service. Stop- stops the service and clears maintenance mode, leaving the service stopped, as ServiceControl Management does. Aliases become sc-maintenance-start/stop and audit-maintenance-start/stop.
Each cmdlet now lives in the ServiceControlInstances or AuditInstances folder and carries its own parameter, admin check, and instance lookup.
@soujay soujay modified the milestone: NextMajor Nov 20, 2026
@npink42
npink42 marked this pull request as ready for review November 22, 2026 04:10
rbev and others added 15 commits November 23, 2026 09:33
Co-authored-by: dependencyupdates[bot] <218638057+dependencyupdates[bot]@users.noreply.github.com>
Remove pre-release startup warnings
Update container readmes to reflect new storage types
Disallow maintenence mode for external RavenDB instances
Co-authored-by: Warwick Schroeder <warwick.schroeder@gmail.com>
Rename PersistenceType to StorageType
It now writes the EF Core persisters' settings:

- The database connection string.
- The Error instance's persister settings, taken from its persistence manifest as the Audit instance already did.
- The maintenance port and full text search settings, only when the persistence manifest declares them. The RavenDB manifests now declare EnableFullTextSearchOnBodies.
- The message body storage settings, validated per storage type. A file system body path is checked with the other instance paths and created with modify access for the service account.

The Error EF Core manifests default MessageBody/StorageType to FileSystem since installation is assumed to be on-prem.
Removing an instance with the "remove database" option deleted the paths each instance type hard-coded for RavenDB. The removal now uses the paths listed in the persistence manifest's SettingsWithPathsToCleanup:

- The EF Core manifests list the file system message body path. It is removed only when message bodies are stored on the file system.
- Nothing is removed for an external RavenDB database.

The SCMU remove dialog hides the data option when there is nothing local to remove, labels it for database files or message body files, and names the external database or body storage that the user must delete manually. The Remove cmdlets' -RemoveDB help explains the same.
johnsimons and others added 30 commits November 24, 2026 14:09
Replace major-version tags (e.g. @v7) with pinned exact versions (e.g. @v7.0.1) for all third-party actions across workflow files, ensuring reproducible builds.
Updating dependencies to latest versions
…ulse.core-2.x

Update dependency Particular.ServicePulse.Core to 2.14.0
Update dependency RavenDB.Embedded to 6.2.21
Stop completed tests' full-text populations and automatic updates while retaining their schemas and data. Defer primary persistence index deactivation until the host is disposed, using an independent connection. Leave normal schema cleanup and PostgreSQL unchanged.

Verify schema isolation, retained data, repeated cleanup, quoted identifiers, normal drops, and host shutdown ordering. All four SQL Server suites pass locally with cleanup suppressed: 1,311 passed and two expected skips. The primary suite also passes with normal cleanup. PostgreSQL, RavenDB, and InMemory persistence test projects build without warnings.
* Add ASB transport support to the test tool

* Add framework to test project
Edit and retry sent the ServiceControl.ReceiveProperties.* headers as
ordinary headers, so the edited message lost its dispatch properties.
On a session-enabled Azure Service Bus queue the broker rejected the
message for a missing SessionId. With send-via, the rejected message
went to the transfer dead-letter queue of the ServiceControl input
queue, while the original failure was already marked as resolved.

The edit handler now moves these headers into dispatch properties,
as ReturnToSender does for retries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: dependencyupdates[bot] <218638057+dependencyupdates[bot]@users.noreply.github.com>
Co-authored-by: dependencyupdates[bot] <218638057+dependencyupdates[bot]@users.noreply.github.com>
Co-authored-by: dependencyupdates[bot] <218638057+dependencyupdates[bot]@users.noreply.github.com>
…rties

Dispatch receive properties of an edited message
…eases-claim

Release the retry claim in SQL when a retry fails to send
* Protect file system body storage from malformed message ids

* Align messageId parsing in error with how Audit does it
…sent-index

Index the audit endpoint filter by time sent on SQL Server
The audit rule used a prefix pattern (`AuthorizationAuditLog.AuditCategory*`), which also matched the audit instance's own loggers under the `ServiceControl.Audit` namespace (e.g. `AuditPersister`). Those loggers were being routed to the audit target instead of the operational log.

Switch to exact-name matching per audit category and split the authorization and message-action audit categories into separate rules, so only genuine audit events are final-routed to the audit target while audit instance diagnostics keep flowing to the operational log with the full layout.
* Handle obsoletes for v7

* Update pragma

* Update obsolete messages
)

* Add automated version of smoke testing script to aspire test tool

* Alphabetise references
… lookup (#6197)

Replaces the DnsClient-based CNAME lookup used to match namespace aliases with a direct ARM query that checks each namespace's disaster recovery aliases. This finds the primary namespace when the configured name is a Geo-Recovery alias, including after a failover, and surfaces a clear error when the required disasterRecoveryConfigs/read permission is missing. Drops the now-unused DnsClient dependency.
Keep audit instance logs out of the authorization audit trail
Adds Enable- and Disable-ServiceControlMaintenanceMode and the audit equivalents, with sc-maintenance-on/off and audit-maintenance-on/off aliases. Each cmdlet stops the service, updates the maintenance mode setting, and starts the service.
Start- stops the service, enables maintenance mode, and starts the service. Stop- stops the service and clears maintenance mode, leaving the service stopped, as ServiceControl Management does. Aliases become sc-maintenance-start/stop and audit-maintenance-start/stop.
Each cmdlet now lives in the ServiceControlInstances or AuditInstances folder and carries its own parameter, admin check, and instance lookup.
…cular/ServiceControl into PS-ServiceControl-Maintenance-Mode
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.

9 participants