8.4.0 and 8.5.0 : package doesn't idempotently handle uninstall; executionpolicy issues.
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Bug
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- powershell
- Bereich
- devops, operating-systems
Rechercherichtung
Beginnen Sie damit, beide Berichte über die Ressourcen powershellexecutionpolicy und windowscapability auf den angegebenen Windows- und PowerShell-Versionen zu reproduzieren. Untersuchen Sie DSC_WindowsCapability Test-TargetResource und die Paketbehandlung für eine fehlende Capability. Überprüfen Sie anschließend, dass eine fehlende OpenSSH.Server-Capability weiterhin erfolgreich bleibt und dass die Konfiguration der Ausführungsrichtlinie wie angefordert abgeschlossen wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Details of the scenario you tried and the problem that is occurring
In 8.5.0, powershellexecutionpolicy doesn't seem to work at all.
I found this, because in 8.4.0, there's an idempotency bug in which package when told to ensure something is Absent, will crash if it's absent. That may or may not be present in 8.5.0 as well, but my code didn't get that far in 8.5.0, I had to go back to 8.2.0.
Verbose logs showing the problem
For the package issue:
PowerShell DSC resource DSC_WindowsCapability failed to execute
Test-TargetResource functionality with error message: Specified Windows Capability
'OpenSSH.Server~~~~0.0.1.0' not found.
Sure, not found... but I'm asking it to, ya know, not be there, so we're good?
And ftr:
> Get-WindowsCapability -Online | where {$_.Name -like '*SSH*'}
Name : OpenSSH.Client~~~~0.0.1.0
State : NotPresent
Name : OpenSSH.Server~~~~0.0.1.0
State : NotPresent
Suggested solution to the issue
- package should be idempotent
- powershellexecutionpolicy should work
The DSC configuration that is used to reproduce the issue (as detailed as possible)
I'm using DSC primarily from Chef. I had originally thought this was a chef bug and filed one, but then I realized it was specific to ComputerManagementDsc 8.4.0 / 8.5.0 - going back to 8.2.0 solved the problem. Below is the relevant chef code, but feel free to give me things to run for testing and I will be happy to do so.
This fails in 8.5.0 for me
dsc_resource 'set execution policy' do
resource :powershellexecutionpolicy
module_name 'ComputerManagementDsc'
property :executionpolicyscope, 'LocalMachine'
property :executionpolicy, 'RemoteSigned'
end
This fails in 8.4.0 and I expect fails in 8.5.0 but I can't test:
dsc_resource 'uninstall ssh-server' do
resource :windowscapability
module_name 'ComputerManagementDsc'
property :name, 'OpenSSH.Server~~~~0.0.1.0'
property :ensure, 'Absent'
notifies :stop, 'service[ssh]', :before
end
The operating system the target node is running
OsName : Microsoft Windows 10 Pro
OsOperatingSystemSKU : 48
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage : en-US
OsMuiLanguages : {en-US}
Version and build of PowerShell the target node is running
Name Value
---- -----
PSVersion 5.1.19041.1237
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1237
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Version of the DSC module that was used ('dev' if using current dev branch)
8.4.0 / 8.5.0
- Vorherrschende Sprache
- PowerShell
- Sterne
- 339
- Forks
- 80
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus dsccommunity/ComputerManagementDsc
-
chore
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
chore
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 68/100
-
chore: Add Agentic AI development assets for GitHub CopilotEvtl. vergeben @PlagueHO hat das vor 128 Tagen übernommen. Offenchore
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 64/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 55/100
-
Computer: AD object deletion before domain join issueEvtl. vergeben @Daymarvi hat das vor 131 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
Alle Issues in dsccommunity/ComputerManagementDsc
Ähnliche Issues
-
affects_2.23 bug needs_triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
ansible/ansible#87808 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
ucsb-cs156/proj-frontiers#836 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
ci: ignore CVE-2026-115924 in Python Dependency AuditEvtl. vergeben @snapotter-hq hat das heute übernommen. Offenarea: ai bug priority: critical
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
snapotter-hq/SnapOtter#4109 ·
Maintainer antworten meist innerhalb von 1 Tag
-
security-scan-failure
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
semantica-agi/semantica#2135 ·
Maintainer antworten meist innerhalb von 1 Tag