8.4.0 and 8.5.0 : package doesn't idempotently handle uninstall; executionpolicy issues.
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- powershell
調査の方向性
まず、指定された Windows および PowerShell のバージョンで、powershellexecutionpolicy リソースと windowscapability リソースを使用して両方のレポートを再現します。DSC_WindowsCapability Test-TargetResource と、Capability が存在しない場合のパッケージ処理を調査し、その後、存在しない OpenSSH.Server Capability が成功のままであること、および実行ポリシーの構成が要求どおりに完了することを確認します。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- PowerShell
- スター
- 339
- フォーク
- 80
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dsccommunity/ComputerManagementDsc のほかの issue
-
chore
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
chore
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
-
chore: Add Agentic AI development assets for GitHub Copilot対応中かも @PlagueHO が 115 日前に担当しました。 オープンchore
難易度 4/5 3〜5日 初心者へのやさしさ 64/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
-
Computer: AD object deletion before domain join issue対応中かも @Daymarvi が 118 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
dsccommunity/ComputerManagementDsc の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
prometheus-community/ansible#906 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rustyrazorblade/easy-db-lab#1017 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
nix-community/NixOS-WSL#1116 ·
-
`automountServiceAccountToken` is in the wrong section of `plugin-site-issue` deployment templateオープンbug plugin-site-issues
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
jenkins-infra/helm-charts#2074 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 72/100
SatelliteQE/broker#607 ·
メンテナーはふだん 1 日以内に返信