puppetlabs / puppetlabs-patching_as_code

Automated Patching through desired state code
Apache License 2.0
10 stars 15 forks source link

Duplicate KB articles causes patch to fail #39

Closed TheFuzzyTech closed 3 years ago

TheFuzzyTech commented 3 years ago

Describe the Bug

A clear and concise description of what the bug is. When duplicate values show in missing_update_kbs an error is produced and patching fails. Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Patching_as_code::Kb[KB4052623] is already declared at (file: /etc/puppetlabs/code/environments/production/modules/patching_as_code/manifests/windows/patchday.pp, line: 10); cannot redeclare (file: /etc/puppetlabs/code/environments/production/modules/patching_as_code/manifests/windows/patchday.pp, line: 10) (file: /etc/puppetlabs/code/environments/production/modules/patching_as_code/manifests/windows/patchday.pp, line: 10, column: 5) on node node.domain.com

Expected Behavior

A clear and concise description of what you expected to happen. Updates should install

Steps to Reproduce

Steps to reproduce the behavior: Run the puppet agent

Environment

Additional Context

In my situation it looks like two windows defender updates are required (different versions) but have the same KB. ["KB4052623", "KB4052623", "KB5007289", "KB2267602", "KB4023057", "KB5007186"] ["Update for Windows Defender Antivirus antimalware platform - KB4052623 (Version 4.18.2001.10)", "Update for Microsoft Defender Antivirus antimalware platform - KB4052623 (Version 4.18.2110.6)", "2021-11 Cumulative Update Preview for .NET Framework 3.5 and 4.8 for Windows 10 Version 20H2 for x64 (KB5007289)", "Security Intelligence Update for Microsoft Defender Antivirus - KB2267602 (Version 1.353.1971.0)", "Intel(R) Corporation - System - 10.29.0.6367", "Intel(R) Corporation - System - 1.0.1964.0", "Intel(R) Corporation - MEDIA - 10.29.0.6367", "Intel(R) Corporation - System - 10.29.0.6367", "2021-09 Update for Windows 10 Version 20H2 for x64-based Systems (KB4023057)", "2021-11 Cumulative Update for Windows 10 Version 20H2 for x64-based Systems (KB5007186)", "Dell, Inc. - Firmware - 0.1.12.0", "Intel - SoftwareComponent - 2130.1.16.1"]

kreeuwijk commented 3 years ago

Thanks for reporting this! It's fixed in v0.7.11, which is now published on the Forge.