(MODULES-11902) Force reinstall puppet_agent module in acceptance bootstrap - #507
Open
SugatD wants to merge 1 commit into
Open
(MODULES-11902) Force reinstall puppet_agent module in acceptance bootstrap#507SugatD wants to merge 1 commit into
SugatD wants to merge 1 commit into
Conversation
SugatD
force-pushed
the
MODULES-11902-puppet-agent-force-install
branch
from
July 21, 2026 10:21
b83ffd6 to
573599a
Compare
SugatD
marked this pull request as draft
July 21, 2026 13:07
4 tasks
SugatD
marked this pull request as ready for review
August 11, 2026 05:11
The Windows acceptance matrix was failing at the before(:suite) hook with "Unknown variable: '::osfamily'" because the base VM image ships with a pre-baked puppetlabs-puppet_agent (and other) module predating Puppet 8's removal of top-scope fact variables. Getting the suite running again then surfaced several further issues once each prior one was fixed: - Loosen metadata.json's puppet/stdlib version requirements so the module installs against Puppet 8 and stdlib 10.x. - Force-reinstall puppetlabs-puppet_agent, -mount_iso, -stdlib, and puppet/archive in the acceptance bootstrap, since the pre-baked copies on the image are incompatible with Puppet 8. - Route SQL Server installs through a password-based scheduled task instead of a plain WinRM apply_manifest. SQL Server's setup chainer uses Windows DPAPI to serialize secure config values (e.g. sa_pwd), which requires a loaded user profile that a WinRM session doesn't have, so setup failed with "There was an error generating the XML document." A scheduled task performs a real logon and works around this. Registering the task with both a trigger and an explicit Start-ScheduledTask call raced the two start attempts and could mask a genuine install failure behind a bogus success (Task Scheduler's LastTaskResult 0x800710E0 "operator refused" overflowing Int32 on exit) - dropped the redundant trigger. - Apply the same scheduled-task workaround in sqlserver_instance_spec.rb and sqlserver_config_spec.rb, which create their own instances beyond the one from before(:suite) and hit the identical DPAPI limitation. - Fix a db_name/@db_name typo in sqlserver_user_spec.rb, a PowerShell quoting bug in validate_sql_install where $s was being stripped by the local shell before reaching the target, and a missing SQL 2019+ version gate on Integration Services/Master Data Services assertions in z_last_sqlserver_features_spec.rb.
SugatD
force-pushed
the
MODULES-11902-puppet-agent-force-install
branch
from
August 11, 2026 05:22
3e9914f to
45d296e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Windows acceptance test matrix (nightly, all OS versions) has been failing at the
before(:suite)hook with:Root cause: the base VM image ships with a pre-baked
puppetlabs-puppet_agentmodule (<=4.0.0) that still uses the deprecated top-scope fact syntax ($::osfamily), which Puppet 8 no longer supports (removed the top-scope-variable compatibility shim for facts). The guard added in #494 (MODULES-11615) only installspuppet_agentwhen no version is present, so this stale, incompatible copy was never replaced.Fix
Force-reinstall
puppetlabs-puppet_agentunconditionally inspec/spec_helper_acceptance_local.rb, so a Puppet-8-compatible release is always used regardless of what's pre-baked on the image.Note on base branch
This is temporarily rebased on top of
MODULES-11902(PR #506) rather thanmain, because the Windows acceptance matrix here won't run until theSpecjob passes, andSpecneeds thepuppetlabs/stdlibupper-bound fix from #506 to get pastdependency-checker. Once #506 merges, this branch will be rebased ontomainand the diff will shrink to just thespec_helper_acceptance_local.rbchange.Checklist
Related: https://perforce.atlassian.net/browse/MODULES-11902