dayglojesus / managedmac

Comprehensive Puppet module for OS X.
http://dayglojesus.github.io/managedmac/
Apache License 2.0
62 stars 21 forks source link

screensharing: groups, no method error: `to_i' for :absent:Symbol #94

Open helge000 opened 8 years ago

helge000 commented 8 years ago

I am running the configuration with the following parameters:


---
managedmac::screensharing::enable: true
managedmac::screensharing::users:
  - admin
managedmac::screensharing::groups:
puppet module list | grep sfu-managedmac                                                                                                                                                                                                                       
└── sfu-managedmac (v0.7.2)

This gets me the following no method error:

# puppet agent -t --trace
[..]
Info: Applying configuration version '1454670020'
Error: undefined method `to_i' for :absent:Symbol
/private/var/lib/puppet/lib/puppet/type/macgroup.rb:68:in `block in insync?'
/private/var/lib/puppet/lib/puppet/type/macgroup.rb:67:in `map'
/private/var/lib/puppet/lib/puppet/type/macgroup.rb:67:in `insync?'
/Library/Ruby/Site/puppet/property.rb:314:in `safe_insync?'
/Library/Ruby/Site/puppet/transaction/resource_harness.rb:117:in `sync_if_needed'
/Library/Ruby/Site/puppet/transaction/resource_harness.rb:89:in `block in perform_changes'
/Library/Ruby/Site/puppet/transaction/resource_harness.rb:88:in `each'
/Library/Ruby/Site/puppet/transaction/resource_harness.rb:88:in `perform_changes'
/Library/Ruby/Site/puppet/transaction/resource_harness.rb:20:in `evaluate'
/Library/Ruby/Site/puppet/transaction.rb:204:in `apply'
/Library/Ruby/Site/puppet/transaction.rb:217:in `eval_resource'
/Library/Ruby/Site/puppet/transaction.rb:147:in `call'
/Library/Ruby/Site/puppet/transaction.rb:147:in `block (2 levels) in evaluate'
/Library/Ruby/Site/puppet/util.rb:335:in `block in thinmark'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/Library/Ruby/Site/puppet/util.rb:334:in `thinmark'
/Library/Ruby/Site/puppet/transaction.rb:147:in `block in evaluate'
/Library/Ruby/Site/puppet/graph/relationship_graph.rb:118:in `traverse'
/Library/Ruby/Site/puppet/transaction.rb:138:in `evaluate'
/Library/Ruby/Site/puppet/resource/catalog.rb:169:in `block in apply'
/Library/Ruby/Site/puppet/util/log.rb:149:in `with_destination'
/Library/Ruby/Site/puppet/transaction/report.rb:112:in `as_logging_destination'
/Library/Ruby/Site/puppet/resource/catalog.rb:168:in `apply'
/Library/Ruby/Site/puppet/configurer.rb:120:in `block in apply_catalog'
/Library/Ruby/Site/puppet/util.rb:161:in `block in benchmark'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/Library/Ruby/Site/puppet/util.rb:160:in `benchmark'
/Library/Ruby/Site/puppet/configurer.rb:119:in `apply_catalog'
/Library/Ruby/Site/puppet/configurer.rb:227:in `run_internal'
/Library/Ruby/Site/puppet/configurer.rb:134:in `block in run'
/Library/Ruby/Site/puppet/context.rb:64:in `override'
/Library/Ruby/Site/puppet.rb:244:in `override'
/Library/Ruby/Site/puppet/configurer.rb:133:in `run'
/Library/Ruby/Site/puppet/agent.rb:47:in `block (4 levels) in run'
/Library/Ruby/Site/puppet/agent/locker.rb:20:in `lock'
/Library/Ruby/Site/puppet/agent.rb:47:in `block (3 levels) in run'
/Library/Ruby/Site/puppet/agent.rb:117:in `with_client'
/Library/Ruby/Site/puppet/agent.rb:44:in `block (2 levels) in run'
/Library/Ruby/Site/puppet/agent.rb:82:in `run_in_fork'
/Library/Ruby/Site/puppet/agent.rb:43:in `block in run'
/Library/Ruby/Site/puppet/application.rb:179:in `call'
/Library/Ruby/Site/puppet/application.rb:179:in `controlled_run'
/Library/Ruby/Site/puppet/agent.rb:41:in `run'
/Library/Ruby/Site/puppet/application/agent.rb:361:in `onetime'
/Library/Ruby/Site/puppet/application/agent.rb:327:in `run_command'
/Library/Ruby/Site/puppet/application.rb:381:in `block (2 levels) in run'
/Library/Ruby/Site/puppet/application.rb:507:in `plugin_hook'
/Library/Ruby/Site/puppet/application.rb:381:in `block in run'
/Library/Ruby/Site/puppet/util.rb:496:in `exit_on_fail'
/Library/Ruby/Site/puppet/application.rb:381:in `run'
/Library/Ruby/Site/puppet/util/command_line.rb:146:in `run'
/Library/Ruby/Site/puppet/util/command_line.rb:92:in `execute'
/usr/bin/puppet:8:in `<main>'
Error: /Stage[main]/Managedmac::Screensharing/Macgroup[com.apple.access_screensharing]/gid: change from absent to 398 failed: undefined method `to_i' for :absent:Symbol
Notice: /Stage[main]/Managedmac::Screensharing/Macgroup[com.apple.access_screensharing]/nestedgroups: defined 'nestedgroups' as 'ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000050'
Error: /Stage[main]/Managedmac::Screensharing/Macgroup[com.apple.access_screensharing]: Could not evaluate: Execution of '/usr/sbin/dseditgroup -q -o edit -i 398 com.apple.access_screensharing' returned 64: GID already exists
/Library/Ruby/Site/puppet/util/execution.rb:219:in `execute'
/Library/Ruby/Site/puppet/provider/command.rb:23:in `execute'
/Library/Ruby/Site/puppet/provider.rb:237:in `block in has_command'
/Library/Ruby/Site/puppet/provider.rb:463:in `block in create_class_and_instance_method'
/private/var/lib/puppet/lib/puppet/provider/macgroup/default.rb:157:in `manage_group'
/private/var/lib/puppet/lib/puppet/provider/macgroup/default.rb:172:in `flush'
/Library/Ruby/Site/puppet/type.rb:990:in `flush'
/Library/Ruby/Site/puppet/transaction/resource_harness.rb:24:in `evaluate'
/Library/Ruby/Site/puppet/transaction.rb:204:in `apply'
/Library/Ruby/Site/puppet/transaction.rb:217:in `eval_resource'
/Library/Ruby/Site/puppet/transaction.rb:147:in `call'
/Library/Ruby/Site/puppet/transaction.rb:147:in `block (2 levels) in evaluate'
/Library/Ruby/Site/puppet/util.rb:335:in `block in thinmark'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/Library/Ruby/Site/puppet/util.rb:334:in `thinmark'
/Library/Ruby/Site/puppet/transaction.rb:147:in `block in evaluate'
/Library/Ruby/Site/puppet/graph/relationship_graph.rb:118:in `traverse'
/Library/Ruby/Site/puppet/transaction.rb:138:in `evaluate'
/Library/Ruby/Site/puppet/resource/catalog.rb:169:in `block in apply'
/Library/Ruby/Site/puppet/util/log.rb:149:in `with_destination'
/Library/Ruby/Site/puppet/transaction/report.rb:112:in `as_logging_destination'
/Library/Ruby/Site/puppet/resource/catalog.rb:168:in `apply'
/Library/Ruby/Site/puppet/configurer.rb:120:in `block in apply_catalog'
/Library/Ruby/Site/puppet/util.rb:161:in `block in benchmark'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/Library/Ruby/Site/puppet/util.rb:160:in `benchmark'
/Library/Ruby/Site/puppet/configurer.rb:119:in `apply_catalog'
/Library/Ruby/Site/puppet/configurer.rb:227:in `run_internal'
/Library/Ruby/Site/puppet/configurer.rb:134:in `block in run'
/Library/Ruby/Site/puppet/context.rb:64:in `override'
/Library/Ruby/Site/puppet.rb:244:in `override'
/Library/Ruby/Site/puppet/configurer.rb:133:in `run'
/Library/Ruby/Site/puppet/agent.rb:47:in `block (4 levels) in run'
/Library/Ruby/Site/puppet/agent/locker.rb:20:in `lock'
/Library/Ruby/Site/puppet/agent.rb:47:in `block (3 levels) in run'
/Library/Ruby/Site/puppet/agent.rb:117:in `with_client'
/Library/Ruby/Site/puppet/agent.rb:44:in `block (2 levels) in run'
/Library/Ruby/Site/puppet/agent.rb:82:in `run_in_fork'
/Library/Ruby/Site/puppet/agent.rb:43:in `block in run'
/Library/Ruby/Site/puppet/application.rb:179:in `call'
/Library/Ruby/Site/puppet/application.rb:179:in `controlled_run'
/Library/Ruby/Site/puppet/agent.rb:41:in `run'
/Library/Ruby/Site/puppet/application/agent.rb:361:in `onetime'
/Library/Ruby/Site/puppet/application/agent.rb:327:in `run_command'
/Library/Ruby/Site/puppet/application.rb:381:in `block (2 levels) in run'
/Library/Ruby/Site/puppet/application.rb:507:in `plugin_hook'
/Library/Ruby/Site/puppet/application.rb:381:in `block in run'
/Library/Ruby/Site/puppet/util.rb:496:in `exit_on_fail'
/Library/Ruby/Site/puppet/application.rb:381:in `run'
/Library/Ruby/Site/puppet/util/command_line.rb:146:in `run'
/Library/Ruby/Site/puppet/util/command_line.rb:92:in `execute'
/usr/bin/puppet:8:in `<main>'
Notice: /Stage[main]/Managedmac::Screensharing/Service[com.apple.screensharing]: Dependency Macgroup[com.apple.access_screensharing] has failures: true
Warning: /Stage[main]/Managedmac::Screensharing/Service[com.apple.screensharing]: Skipping because of failed dependencies
Notice: Finished catalog run in 9.87 seconds
dayglojesus commented 8 years ago

Puppet 4?

helge000 commented 8 years ago

Certainly not:

root# puppet -V
3.8.3
dayglojesus commented 8 years ago

Does it still error if you remove the managedmac::screensharing::groups: line?

dayglojesus commented 8 years ago

Did you manage to resolve this issue?

helge000 commented 8 years ago

@dayglojesus, sorry for not replying and thanks for reminding. Removing the groups line does not make any diffrence

dayglojesus commented 8 years ago

Issue the following commandant paste the output?

sudo puppet resource macgroup com.apple.access_screensharing