Closed
Bug 1504971
Opened 7 years ago
Closed 7 years ago
refactor rundsc.ps1 so that all processing happens inside a function
Categories
(Infrastructure & Operations :: RelOps: OpenCloudConfig, task)
Infrastructure & Operations
RelOps: OpenCloudConfig
Unspecified
Windows
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: grenade, Assigned: grenade)
Details
Attachments
(1 file)
occ's rundsc.ps1 contains a fair amount of logic and decision trees that are not correctly logged in papertrail.
refactor the script so that all processing occurs inside of a function that includes appropriately verbose logging for the logic being processed.
all functions should take the form below so that we also collect processing time metrics for everything the script does:
function Verb-SomeFunction {
param (
...
)
begin {
Write-Log -message ('{0} :: begin - {1:o}' -f $($MyInvocation.MyCommand.Name), (Get-Date).ToUniversalTime()) -severity 'DEBUG'
}
process {
...
}
end {
Write-Log -message ('{0} :: end - {1:o}' -f $($MyInvocation.MyCommand.Name), (Get-Date).ToUniversalTime()) -severity 'DEBUG'
}
}
| Assignee | ||
Comment 1•7 years ago
|
||
added functions for:
- Set-ServiceState
- Set-DomainName
- Set-DynamicDnsRegistration
- Run-MaintainSystem
- Run-RemoteDesiredStateConfig
- Set-ComputerName
wrapped everything else in:
- Run-OpenCloudConfig
this last mega function still needs a lot of refactoring into smaller methods.
Assignee: nobody → rthijssen
Status: NEW → ASSIGNED
Attachment #9022948 -
Flags: review?(mcornmesser)
Updated•7 years ago
|
Attachment #9022948 -
Flags: review?(mcornmesser) → review+
| Assignee | ||
Comment 2•7 years ago
|
||
merged with the sha pinning changes:
https://github.com/mozilla-releng/OpenCloudConfig/commit/9d74a89cadd596ffc7f5f0762d838ff4dd6651dc
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•