Closed Randy2009 closed 7 years ago
I take it you ran the module install on your Puppetserver and the module is installed in for the test environment? Can you share this file? /etc/puppetlabs/code/environments/test/modules/base/manifests/mssql.pp
Having a similar issue:
My hiera looks like this: profile::local_security::cfg: 'Log on as a service': ensure: 'present' policy_value: 'Administrators, IIS APPPOOL\NET v4.5, IIS APPPOOL\NET v4.5 Classic, IIS APPPOOL\DefaultAppPool, NT SERVICE\ALL SERVICES'
My manifest looks like: class profile::local_security {
$cfg = hiera('profile::local_security::cfg')
validate_hash($cfg)
create_resources(local_security_policy,$cfg) }
Error is: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/local_security_policy: undefined method `path' for nil:NilClass at /etc/puppetlabs/code/environments/rolecijagts/site/profile/manifests/local_security.pp:30:5 on node
Hello,
For some reason, it just works again. We did a change in you're module, it fixed it. We undo the changes and the problem didn't happen again.
The file base/manifests/mssql.pp:16:5 is the call to local_security_policy:
local_security_policy { 'Lock pages in memory':
ensure => present,
policy_value => "$sqlserviceaccount",
policy_value => $sqlserviceaccount
}
@Randy2009 can you share that change?
If you push a PR I'll review it. My biggest problem is a lack of a test bed for these changes that encompasses all of the server editions
Sent from my iPhone
On Nov 8, 2016, at 11:39, Luis Mayorga notifications@github.com wrote:
@Randy2009 can you share that change?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
I am using Windows 2008R2
and not sure if the implementation is different on Windows 2012R2. Will dig deeper...
So after some additional troubleshooting, it looks like this module doesn't work with environments. If I install this module locally on the server and create a manifest file, everything works properly. If the module is defined in the production Puppetfile, everything works properly as well. I only have issues when the module is defined ONLY in the puppet environment I'm working on and it doesn't exist in the production Puppetfile.
I'm experiencing this same issue. Windows Server 2012R2 with Puppet version 4.8.1. I am using environments.
I opened #24 to fix this issue. It will fallback to a previous technique for loading the files. It works for me on 2012R2.
@ripclawffb If you use r10k you can try using the following in your Puppetfile
:
mod 'ayohrling/local_security_policy',
git: 'https://github.com/jrwesolo/local_security_policy',
commit: '3ea5d3bcd44e631eaaf5ba0c2307373e4a342606'
This is the same code that #24 is looking to get merged in.
0.6.1 cut and pushed to forge
On Mon, Jan 2, 2017 at 3:35 PM, Jordan Wesolowski notifications@github.com wrote:
@ripclawffb https://github.com/ripclawffb If you use r10k you can try using the following in your Puppetfile:
mod 'ayohrling/local_security_policy', git: 'https://github.com/jrwesolo/local_security_policy', commit: '3ea5d3bcd44e631eaaf5ba0c2307373e4a342606'
This is the same code that #24 https://github.com/ayohrling/local_security_policy/pull/24 is looking to get merged in.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ayohrling/local_security_policy/issues/21#issuecomment-270017620, or mute the thread https://github.com/notifications/unsubscribe-auth/AFA67DoLpHOcoHB0ThGkUXMjNzfvk1Fsks5rOV-ogaJpZM4KP6R_ .
-- Adam R. Yohrling
Hi, i tried to use the module, but won't get it to work. This is the trace file,
Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/local_security_policy: undefined method'
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
path' for nil:NilClass at /etc/puppetlabs/code/environments/test/modules/base/manifests/mssql.pp:16:5 on node test01.test.lab C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/indirector/rest.rb:208:in
is_http_200?' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/indirector/rest.rb:106:infind' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/indirector/indirection.rb:194:in
find' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:377:inblock in retrieve_new_catalog' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:386:in
block in thinmark' C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/2.1.0/benchmark.rb:294:inrealtime' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:385:in
thinmark' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:376:inretrieve_new_catalog' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:78:in
retrieve_catalog' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:147:inprepare_and_retrieve_catalog' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:281:in
run_internal' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:186:inblock in run' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/context.rb:65:in
override' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet.rb:240:inoverride' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:185:in
run' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:45:inblock (4 levels) in run' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent/locker.rb:21:in
lock' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:45:inblock (3 levels) in run' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:98:in
with_client' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:42:inblock (2 levels) in run' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:65:in
run_in_fork' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:41:inblock in run' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:179:in
call' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:179:incontrolled_run' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:39:in
run' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/application/agent.rb:353:inonetime' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/application/agent.rb:331:in
run_command' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:344:inblock in run' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:540:in
exit_on_fail' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:344:inrun' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line.rb:128:in
run' C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line.rb:72:inexecute' C:/Program Files/Puppet Labs/Puppet/puppet/bin/puppet:5:in
Any clue what is going wrong?