Bug #11408

Feature #8268: Basic Puppet agent support on Windows

Windows fact and pluginsync are broken

Added by Mark Plaksin 5 months ago. Updated 3 months ago.

Status:Closed Start date:12/14/2011
Priority:High Due date:
Assignee:Josh Cooper % Done:

0%

Category:windows
Target version:2.7.12
Affected Puppet version:2.7.6 Branch:https://github.com/puppetlabs/puppet/pull/511
Keywords:
Votes: 0

Description

[ Yikes, sorry for the terrible formatting! Here’s try #2 :) ]

Hi,

I’m a *nix admin testing Puppet on Windows for the first time. Everything installed fine but I get “Could not evaluate: can’t convert Fixnum into String” when I run Puppet.

Versions: – Windows 2008 – Puppet 2.7.9 on client and server – Facter 1.6.4

This looks similar to #10586 which is marked as a duplicate of #10614. I don’t know enough to know whether my problem is really related or not.

I’m running Puppet like this: C:\ProgramData\PuppetLabs\puppet\etc>puppet agent —verbose —server puppet.example.com -t —debug —trace —ignores —pluginsync

and I get this stack trace:

info: Retrieving plugin
debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson
debug: Using cached certificate for ca
debug: Using cached certificate for yar
debug: Using cached certificate_revocation_list for ca
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/windows/security.rb:577:in `pack'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/windows/security.rb:577:in `string_to_sid_ptr'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/provider/file/windows.rb:40:in `name2uid'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/owner.rb:13:in `insync?'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/owner.rb:12:in `map!'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/owner.rb:12:in `insync?'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/property.rb:162:in `safe_insync?'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:61:in `perform_changes'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:60:in `each'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:60:in `perform_changes'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:133:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:49:in `apply'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:84:in `eval_resource'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:103:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:476:in `thinmark'
C:/Ruby187/lib/ruby/1.8/benchmark.rb:308:in `realtime'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:475:in `thinmark'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:103:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:380:in `traverse'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:99:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:141:in `apply'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer/downloader.rb:32:in `evaluate'
C:/Ruby187/lib/ruby/1.8/timeout.rb:67:in `timeout'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer/downloader.rb:31:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer/plugin_handler.rb:19:in `download_plugins'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:77:in `prepare'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:137:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
C:/Ruby187/lib/ruby/1.8/sync.rb:230:in `synchronize'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:103:in `with_client'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:37:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `call'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `controlled_run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:35:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:336:in `onetime'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:310:in `run_command'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:410:in `hook'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:401:in `exit_on_fail'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute'
C:/Ruby187/bin/puppet:4
err: /File[C:/ProgramData/PuppetLabs/puppet/var/lib]: Could not evaluate: can't convert Fixnum into String

I have no idea whether this this is in the right ballpark or not but If I add ‘string = string.to_s’ on line 577 of security.rb it gets further but still has trouble:

info: Retrieving plugin
debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson
debug: Using cached certificate for ca
debug: Using cached certificate for yar
debug: Using cached certificate_revocation_list for ca
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/owner.rb:13:in `insync?'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/owner.rb:12:in `map!'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/owner.rb:12:in `insync?'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/property.rb:162:in `safe_insync?'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:61:in `perform_changes'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:60:in `each'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:60:in `perform_changes'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:133:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:49:in `apply'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:84:in `eval_resource'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:103:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:476:in `thinmark'
C:/Ruby187/lib/ruby/1.8/benchmark.rb:308:in `realtime'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:475:in `thinmark'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:103:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:380:in `traverse'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:99:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:141:in `apply'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer/downloader.rb:32:in `evaluate'
C:/Ruby187/lib/ruby/1.8/timeout.rb:67:in `timeout'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer/downloader.rb:31:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer/plugin_handler.rb:19:in `download_plugins'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:77:in `prepare'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:137:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
C:/Ruby187/lib/ruby/1.8/sync.rb:230:in `synchronize'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:103:in `with_client'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:37:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `call'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `controlled_run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:35:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:336:in `onetime'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:310:in `run_command'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:410:in `hook'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:401:in `exit_on_fail'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute'
C:/Ruby187/bin/puppet:4
err: /File[C:/ProgramData/PuppetLabs/puppet/var/lib]: Could not evaluate: Could not find user 2988

“2988” are the last 4 digits of the SID of the user I logged in with (via RDP). I was logged in via RDP as this user when I installed Ruby and Puppet. The cmd window in which I’m running puppet in running as Administrator. (I did become non-administrator when installing at least one gem because of some error about drive H: not being found…unfortunately I can’t find the link that said “If this happens, install as non-Administrator)

Note that running ‘puppet apply’ on this simple file resource works fine:

file { 'c:\Users\happy\Downloads\test.txt':
    ensure => 'file',
    mode => '660',
    owner => 'Administrator',
    group => 'Administrators',
    content => 'Hi there',
}

Here is the output if ‘puppet config print all’ if that helps.

allow_duplicate_certs = false
archive_file_server = puppet
archive_files = false
async_storeconfigs = false
authconfig = C:/ProgramData/PuppetLabs/puppet/etc/namespaceauth.conf
autoflush = false
autosign = C:/ProgramData/PuppetLabs/puppet/etc/autosign.conf
bindaddress = 0.0.0.0
bucketdir = C:/ProgramData/PuppetLabs/puppet/var/bucket
ca = true
ca_days = ""
ca_md = md5
ca_name = Puppet CA: yar
ca_port = 8140
ca_server = puppet
ca_ttl = 5y
cacert = C:/ProgramData/PuppetLabs/puppet/etc/ssl/ca/ca_crt.pem
cacrl = C:/ProgramData/PuppetLabs/puppet/etc/ssl/ca/ca_crl.pem
cadir = C:/ProgramData/PuppetLabs/puppet/etc/ssl/ca
cakey = C:/ProgramData/PuppetLabs/puppet/etc/ssl/ca/ca_key.pem
capass = C:/ProgramData/PuppetLabs/puppet/etc/ssl/ca/private/ca.pass
caprivatedir = C:/ProgramData/PuppetLabs/puppet/etc/ssl/ca/private
capub = C:/ProgramData/PuppetLabs/puppet/etc/ssl/ca/ca_pub.pem
catalog_format = ""
catalog_terminus = compiler
cert_inventory = C:/ProgramData/PuppetLabs/puppet/etc/ssl/ca/inventory.txt
certdir = C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs
certdnsnames = ""
certificate_revocation = true
certname = yar
classfile = C:/ProgramData/PuppetLabs/puppet/var/state/classes.txt
client_datadir = C:/ProgramData/PuppetLabs/puppet/var/client_data
clientbucketdir = C:/ProgramData/PuppetLabs/puppet/var/clientbucket
clientyamldir = C:/ProgramData/PuppetLabs/puppet/var/client_yaml
code = ""
color = false
confdir = C:/ProgramData/PuppetLabs/puppet/etc
config = C:/ProgramData/PuppetLabs/puppet/etc/puppet.conf
config_version = ""
configprint = all
configtimeout = 120
couchdb_url = http://127.0.0.1:5984/puppet
csrdir = C:/ProgramData/PuppetLabs/puppet/etc/ssl/ca/requests
daemonize = false
dbadapter = sqlite3
dbconnections = ""
dblocation = C:/ProgramData/PuppetLabs/puppet/var/state/clientconfigs.sqlite3
dbmigrate = false
dbname = puppet
dbpassword = puppet
dbport = ""
dbserver = localhost
dbsocket = ""
dbuser = puppet
deviceconfig = C:/ProgramData/PuppetLabs/puppet/etc/device.conf
devicedir = C:/ProgramData/PuppetLabs/puppet/var/devices
diff = diff
diff_args = -u
dns_alt_names = ""
document_all = false
downcasefacts = false
dynamicfacts = memorysize,memoryfree,swapsize,swapfree
environment = production
evaltrace = false
external_nodes = none
factdest = C:/ProgramData/PuppetLabs/puppet/var/facts/
factpath = C:/ProgramData/PuppetLabs/puppet/var/lib/facter;C:/ProgramData/PuppetLabs/puppet/var/facts
facts_terminus = facter
factsignore = .svn CVS
factsource = puppet://puppet/facts/
factsync = false
fileserverconfig = C:/ProgramData/PuppetLabs/puppet/etc/fileserver.conf
filetimeout = 15
freeze_main = false
genconfig = false
genmanifest = false
graph = false
graphdir = C:/ProgramData/PuppetLabs/puppet/var/state/graphs
group = puppet
hostcert = C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs/yar.pem
hostcrl = C:/ProgramData/PuppetLabs/puppet/etc/ssl/crl.pem
hostcsr = C:/ProgramData/PuppetLabs/puppet/etc/ssl/csr_yar.pem
hostprivkey = C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys/yar.pem
hostpubkey = C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys/yar.pem
http_compression = false
http_proxy_host = none
http_proxy_port = 3128
httplog = $vardir/logThe Puppet log directory./http.log
ignorecache = false
ignoreimport = false
ignoreschedules = false
inventory_port = 8140
inventory_server = puppet
inventory_terminus = facter
keylength = 1024
lastrunfile = C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml
lastrunreport = C:/ProgramData/PuppetLabs/puppet/var/state/last_run_report.yaml
ldapattrs = all
ldapbase = ""
ldapclassattrs = puppetclass
ldapnodes = false
ldapparentattr = parentnode
ldappassword = ""
ldapport = 389
ldapserver = ldap
ldapssl = false
ldapstackedattrs = puppetvar
ldapstring = (&(objectclass=puppetClient)(cn=%s))
ldaptls = false
ldapuser = ""
lexical = false
libdir = C:/ProgramData/PuppetLabs/puppet/var/lib
listen = false
localcacert = C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs/ca.pem
localconfig = C:/ProgramData/PuppetLabs/puppet/var/state/localconfig
logdir = $vardir/logThe Puppet log directory.
manage_internal_file_permissions = true
manifest = C:/ProgramData/PuppetLabs/puppet/etc/manifests/site.pp
manifestdir = C:/ProgramData/PuppetLabs/puppet/etc/manifests
masterhttplog = $vardir/logThe Puppet log directory./masterhttp.log
masterlog = $vardir/logThe Puppet log directory./puppetmaster.log
masterport = 8140
maximum_uid = 4294967290
mkusers = false
modulepath = C:/ProgramData/PuppetLabs/puppet/etc/modules;/usr/share/puppet/modules
name = config
node_name = cert
node_name_fact = ""
node_name_value = yar
node_terminus = plain
noop = false
onetime = false
passfile = C:/ProgramData/PuppetLabs/puppet/etc/ssl/private/password
path = none
pidfile = C:/ProgramData/PuppetLabs/puppet/var/run/config.pid
plugindest = C:/ProgramData/PuppetLabs/puppet/var/lib
pluginsignore = .svn CVS .git
pluginsource = puppet://puppet/plugins
pluginsync = false
postrun_command = ""
preferred_serialization_format = pson
prerun_command = ""
privatedir = C:/ProgramData/PuppetLabs/puppet/etc/ssl/private
privatekeydir = C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys
publickeydir = C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys
puppetdlockfile = C:/ProgramData/PuppetLabs/puppet/var/state/puppetdlock
puppetdlog = $vardir/logThe Puppet log directory./puppetd.log
puppetport = 8139
queue_source = stomp://localhost:61613/
queue_type = stomp
rails_loglevel = info
railslog = $vardir/logThe Puppet log directory./rails.log
report = true
report_port = 8140
report_server = puppet
reportdir = C:/ProgramData/PuppetLabs/puppet/var/reports
reportfrom = report@YAR.
reports = store
reportserver = puppet
reporturl = http://localhost:3000/reports/upload
req_bits = 2048
requestdir = C:/ProgramData/PuppetLabs/puppet/etc/ssl/certificate_requests
resourcefile = C:/ProgramData/PuppetLabs/puppet/var/state/resources.txt
rest_authconfig = C:/ProgramData/PuppetLabs/puppet/etc/auth.conf
route_file = C:/ProgramData/PuppetLabs/puppet/etc/routes.yaml
rrddir = C:/ProgramData/PuppetLabs/puppet/var/rrd
rrdinterval = 1800
run_mode = user
rundir = C:/ProgramData/PuppetLabs/puppet/var/run
runinterval = 1800
sendmail = ""
serial = C:/ProgramData/PuppetLabs/puppet/etc/ssl/ca/serial
server = puppet
server_datadir = C:/ProgramData/PuppetLabs/puppet/var/server_data
servertype = webrick
show_diff = false
signeddir = C:/ProgramData/PuppetLabs/puppet/etc/ssl/ca/signed
smtpserver = none
splay = false
splaylimit = 1800
ssl_client_header = HTTP_X_CLIENT_DN
ssl_client_verify_header = HTTP_X_CLIENT_VERIFY
ssldir = C:/ProgramData/PuppetLabs/puppet/etc/ssl
statedir = C:/ProgramData/PuppetLabs/puppet/var/state
statefile = C:/ProgramData/PuppetLabs/puppet/var/state/state.yaml
storeconfigs = false
storeconfigs_backend = active_record
strict_hostname_checking = false
summarize = false
syslogfacility = daemon
tagmap = C:/ProgramData/PuppetLabs/puppet/etc/tagmail.conf
tags = ""
templatedir = C:/ProgramData/PuppetLabs/puppet/var/templates
thin_storeconfigs = false
trace = false
use_cached_catalog = false
usecacheonfailure = true
user = puppet
vardir = C:/ProgramData/PuppetLabs/puppet/var
yamldir = C:/ProgramData/PuppetLabs/puppet/var/yaml
zlib = true

Related issues

related to Puppet - Bug #11469: Puppet Windows UAC issues Closed 12/16/2011
duplicates Puppet - Bug #10586: Windows puppet cannot source files remotely if owner and ... Closed 11/06/2011

History

Updated by Mark Plaksin 5 months ago

  • Description updated (diff)

Updated by Tristan Colgate-McFarlane 5 months ago

I receive the same error on win2008 R2 and windows 7. The errors goes away if I include owner and group attributes in the file definition (both set as “Administrators”). The same issue also seems to impact pluginsync where, as far as I know, a owner cannot be applied.

Updated by James Turnbull 5 months ago

  • Description updated (diff)
  • Category changed from agent to windows

Updated by Mark Plaksin 5 months ago

In my case it’s —pluginsync. It’s trying to download our custom facts and hasn’t gotten to processing the catalog yet.

Updated by Mark Plaksin 5 months ago

‘puppet apply’ also works if I try to write to the facts dir like this .pp:

file { 'c:\ProgramData\PuppetLabs\puppet\var\lib\facter\test.rb':
  ensure => 'file',
  mode => '660',
  owner => 'Administrator',
  group => 'Administrators',
  content => 'Hi there',
}

It also works if I don’t specify an owner or a group:

file { 'c:\ProgramData\PuppetLabs\puppet\var\lib\facter\test.rb':
  ensure => 'file',
  mode => '660',
  content => 'Hi there',
}

But it fails as originally described if I try to fetch a file from the Puppet fileserver:

file { 'c:\ProgramData\PuppetLabs\puppet\var\lib\facter\test.rb':
  ensure => 'file',
  source => "puppet://puppet.bor.usg.edu/modules/usrlocal/noodle",
}

Updated by Josh Cooper 5 months ago

  • Status changed from Unreviewed to Investigating
  • Target version set to 2.7.x

Updated by Josh Cooper 5 months ago

  • Status changed from Investigating to Duplicate
  • Parent task set to #8268
  • Affected Puppet version changed from 2.7.9 to 2.7.6

So #10586 is actually not fixed when sourcing files from the puppet master (it is only fixed when sourcing files from a non-NTFS volume). Since the original bug report for #10586 was sourcing files from puppet, this bug is a duplicate of that one. I’ll reopen the other bug.

Btw, you can work around this issue by specifying the owner and group in your manifest:

file { 'c:\ProgramData\PuppetLabs\puppet\var\lib\facter\test.rb':
  ensure => 'file',
  owner  => 'Administrators',
  group  => 'Users',
  source => "puppet://puppet.bor.usg.edu/modules/usrlocal/noodle",
}

Updated by Mark Plaksin 5 months ago

Thanks! Is there an easy way to work around it when puppet is downloading facts via —pluginsync?

Updated by Josh Cooper 5 months ago

  • Subject changed from Windows: "Could not evaluate: can't convert Fixnum into String" to Windows fact and pluginsync are broken
  • Status changed from Duplicate to Re-opened
  • Assignee set to Josh Cooper
  • Priority changed from Normal to High

So this is not a duplicate of #10586. This bug really is fact and plugin sync are broken on windows. The Puppet::Configurer::Downloader always attempts to set owner and group to:

      :owner => Process.uid,
      :group => Process.gid,

For uid, ruby on windows returns the last RID component of the SID. These values need to be set differently on windows

Updated by Josh Cooper 5 months ago

  • Status changed from Re-opened to Accepted

Updated by Josh Cooper 5 months ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Branch set to https://github.com/puppetlabs/puppet/pull/281

When syncing fact and plugins, the owner and group for downloaded files default to the current user and the nobody group, respectively.

Updated by Jeff McCune 5 months ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release

Updated by Mark Plaksin 5 months ago

[ Oops, fixing formatting again!]

Thanks for the speedy work!

I manually applied the patch to downloader.rb and now I get something similar to the 2nd stack trace in my original report. It says “Can’t find user happy”. The stack is below. I’m RDP’d in as ‘happy’. I don’t know if it matters but ‘happy’ really a domain account in the ‘USO’ domain. The cmd.exe from which I’m running puppet is running as Administrator. I’m new to doing this sort of thing on Windows so it’s certainly possible I’m just doing something wrong.

info: Retrieving plugin
debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson
debug: Using cached certificate for ca
debug: Using cached certificate for yar
debug: Using cached certificate_revocation_list for ca
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/owner.rb:13:in `insync?'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/owner.rb:12:in `map!'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/owner.rb:12:in `insync?'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/property.rb:162:in `safe_insync?'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:61:in `perform_changes'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:60:in `each'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:60:in `perform_changes'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:133:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:49:in `apply'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:84:in `eval_resource'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:103:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:476:in `thinmark'
C:/Ruby187/lib/ruby/1.8/benchmark.rb:308:in `realtime'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:475:in `thinmark'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:103:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:380:in `traverse'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:99:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:141:in `apply'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer/downloader.rb:32:in `evaluate'
C:/Ruby187/lib/ruby/1.8/timeout.rb:67:in `timeout'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer/downloader.rb:31:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer/plugin_handler.rb:19:in `download_plugins'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:77:in `prepare'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:137:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
C:/Ruby187/lib/ruby/1.8/sync.rb:230:in `synchronize'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:103:in `with_client'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:37:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `call'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `controlled_run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:35:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:336:in `onetime'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:310:in `run_command'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:410:in `hook'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:401:in `exit_on_fail'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute'
C:/Ruby187/bin/puppet:4
err: /File[C:/ProgramData/PuppetLabs/puppet/var/lib]: Could not evaluate: Could not find user happy

Updated by Jeff McCune 5 months ago

  • Status changed from Merged - Pending Release to Code Insufficient

Re-opening

Seems like there’s a high likelihood we didn’t fix the underlying issue. Josh, this may be a second bug. Just re-opening this to keep the momentum up.

-Jeff

Updated by Tristan Colgate-McFarlane 5 months ago

Hi, I’ve had a play with the patch and it works for me as long as…

  1. UAC is disabled on the box.
  2. I’ve explicitly run puppet in a cmd.exe of a local account on the machine.

I created a local account as a member of Aministrators on the local machine. Did a ‘runas /user:puppet “cmd.exe”’, and executed puppet agent -t in the new cmd. Custom facts have downloaded and executed and all looks well.

I don’t know much about windows admin, so this may not be a realistic deployment scenario. I think it also requires UAC to be off, which is default for servers but not for desktops (so the above process doesn’t work on a desktop windows 7 box, but is OK on a server built 2008r2).

Updated by Mark Plaksin 5 months ago

Reading puppet-dev, I see pull request 280 which sounds related to this. Do I need to test with both 281 and 280 to get the full effect of the fix mentioned in this bug?

Updated by Josh Cooper 5 months ago

I manually applied the patch to downloader.rb and now I get something similar to the 2nd stack trace in my original report. It says “Can’t find user happy”. The stack is below. I’m RDP’d in as ‘happy’. I don’t know if it matters but ‘happy’ really a domain account in the ‘USO’ domain.

Yes, that’s the problem. We use WMI to resolve user names into SIDs, and the issue is that WMI only knows about local accounts. Try the following to confirm:

C:\> wmic path win32_account where (name = 'happy')

You’ll likely get an error about ‘no instances’. We really should be using the LookupAccountName API to resolve the SID. I’ll update this limitation in the window wiki and file a separate bug.

Updated by Josh Cooper 5 months ago

Mark Plaksin wrote:

Do I need to test with both 281 and 280 to get the full effect of the fix mentioned in this bug?

Pull request 280 is only necessary if you have file resources in your manifest that you are sourcing from a remote puppet master, and you haven’t specified what the owner and group should be. Puppet will attempt to copy the Unix uid/gid attributes of the remote file and fail.

Updated by Josh Cooper 5 months ago

I think it also requires UAC to be off, which is default for servers but not for desktops (so the above process doesn’t work on a desktop windows 7 box, but is OK on a server built 2008r2).

We’ve only tested puppet on 2003 and 2008, which is why it hasn’t come up before. Do you get a stack trace when UAC is on?

Updated by Mark Plaksin 5 months ago

Josh Cooper wrote:

Yes, that’s the problem. We use WMI to resolve user names into SIDs, and the issue is that WMI only knows about local accounts. Try the following to confirm:

[…]

You’ll likely get an error about ‘no instances’. We really should be using the LookupAccountName API to resolve the SID. I’ll update this limitation in the window wiki and file a separate bug.

Here’s what I get:

C:\>wmic path win32_account where (name = 'happy')
AccountType  Caption    Description  Disabled  Domain  FullName      InstallDate  LocalAccount  Lockout  Name   Password Changeable  PasswordExpires  PasswordRequired  SID                                             SIDType  Status
512          USO\happy  SSS          FALSE     USO     Mark Plaksin               FALSE         FALSE    happy  TRUE                     TRUE             TRUE           S-1-5-21-4060241145-1665654607-1753785296-2988  1        OK

FWIW, it takes a very long time to return anything. Maybe a whole minute. Facter takes a long time to run too. I’ve started trying to narrow down which facts are slow but haven’t finished doing that yet.

Updated by Jeff McCune 5 months ago

  • Status changed from Code Insufficient to Merged - Pending Release

Updated by Tristan Colgate-McFarlane 5 months ago

With UAC enabled the issue is that the user (even if it has admin rights), can’t write to various locations, atleast on our setup here. Without UAC and admin user has the expected admin rights, and all works well.

Updated by Jeff McCune 5 months ago

Josh, I hadn’t merged pull request #280 when I merged #281 and updated this ticket.

I’m really starting to wish the “branch” field in redmine is multi-valued.

In any event, it merged pending release may not be the correct state giving the UAC issues being discussed.

Updated by Mark Plaksin 5 months ago

Hi,

Today’s my last day in the office until next year so I’ll be slow to respond for a while. I’m interested in helping to get this fixed and wanted to make sure you didn’t think I disappeared :)

Updated by Josh Cooper 5 months ago

Yes, that’s the problem. We use WMI to resolve user names into SIDs, and the issue is that WMI only knows about local accounts.

My comment above almost sounded like I was responding to Jeff, but I was trying to say that the problem is running puppet under a non-local account.

FWIW, it takes a very long time to return anything. Maybe a whole minute.

Is this just 2008 or 2003 too? Are these VMs or dedicated hardware? Is this just puppet/facter or other applications? We run both as VMs, and 2008 is ridiculously slow. It takes over 20 minutes to run the spec tests.

Facter takes a long time to run too. I’ve started trying to narrow down which facts are slow but haven’t finished doing that yet.

Try running facter with —timing. It will show you how long it takes to resolve each fact. See also #8128.

Updated by Josh Cooper 5 months ago

In any event, it merged pending release may not be the correct state giving the UAC issues being discussed.

I think merged pending release is correct. The UAC thing likely will prevent puppet from being able to do anything, e.g. install packages. I’ve filed this as #11469

Updated by Josh Cooper 5 months ago

  • Target version changed from 2.7.x to 2.7.10

This fix was actually merged into 2.7.x in https://github.com/puppetlabs/puppet/commit/a08370db73c2a9f8de4531d22565f94a3910ecfd

    (#11408) Fix fact and plugin sync on Windows

    Previously, fact and pluginsync were broken on Windows, because it was
    defaulting the owner and group to Process.uid/gid, and then failing to
    translate them into Windows SIDs.
    
    This commit changes the default file owner to the current user name,
    and the default file group to Nobody, which is the group that Windows
    typically applies to newly created files.

Updated by Michael Stahnke 4 months ago

  • Status changed from Merged - Pending Release to Closed

released in 2.7.10rc1

Updated by Jeff McCune 3 months ago

  • Status changed from Closed to Needs More Information
  • Target version changed from 2.7.10 to 2.7.x

Reopening Again

Josh, I’m seeing this with 2.7.x. Have you seen this before or do you think this is still an issue?

This is running Puppet on Windows against a PE 2.0.2 master on CentOS 6.

C:\Program Files (x86)\Puppet Labs\Puppet\bin>puppet agent --test --pluginsync  
info: Retrieving plugin
err: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/lib]: \
  Failed to generate additional resources using 'eval_generate: \
  Could not intern_multiple from pson: Paths must be fully qualified
err: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/lib]: \
  Could not evaluate: Could not intern from pson: \
  Paths must be fully qualified Could not retrieve file metadata for puppet://puppet/plugins: \
  Could not intern from pson: Paths must be fully qualified

Here’s the trace:

info: Retrieving plugin
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/file_serving/base.rb:54:in `path='
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/file_serving/base.rb:29:in `initialize'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/file_serving/metadata.rb:121:in `initialize'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/file_serving/metadata.rb:153:in `new'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/file_serving/metadata.rb:153:in `from_pson'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/network/formats.rb:157:in `data_to_instance'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/network/formats.rb:139:in `intern_multiple'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/network/formats.rb:138:in `collect'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/network/formats.rb:138:in `intern_multiple'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/network/format_handler.rb:12:in `send'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/network/format_handler.rb:12:in `protect'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/network/format_handler.rb:26:in `intern_multiple'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/network/format_handler.rb:112:in `convert_from_multiple'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/indirector/rest.rb:50:in `deserialize'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/indirector/rest.rb:139:in `search'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/indirector/indirection.rb:256:in `search'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/type/file.rb:613:in `perform_recursion'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/type/file.rb:580:in `recurse_remote'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/type/file.rb:579:in `collect'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/type/file.rb:579:in `recurse_remote'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/type/file.rb:509:in `recurse'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/type/file.rb:399:in `eval_generate'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/transaction.rb:152:in `eval_generate'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/transaction.rb:384:in `traverse'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/transaction.rb:99:in `evaluate'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/resource/catalog.rb:141:in `apply'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer/downloader.rb:32:in `evaluate'
C:/Program Files (x86)/Puppet Labs/Puppet/sys/ruby/lib/ruby/1.8/timeout.rb:67:in `timeout'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer/downloader.rb:31:in `evaluate'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer/plugin_handler.rb:19:in `download_plugins'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:77:in `prepare'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:138:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:46:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent/locker.rb:11:in `lock'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:46:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/sys/ruby/lib/ruby/1.8/sync.rb:230:in `synchronize'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:46:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:110:in `with_client'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:44:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:172:in `call'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:172:in `controlled_run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:42:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application/agent.rb:345:in `onetime'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application/agent.rb:319:in `run_command'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:309:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:416:in `hook'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:309:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:407:in `exit_on_fail'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:309:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line.rb:69:in `execute'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/bin/puppet:4
err: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/lib]: Failed to generate additional resources using 'eval_generate: Could not intern_multiple from pson: Paths must be fully qualified
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/parameter.rb:165:in `fail'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/type/file/source.rb:163:in `metadata'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/type/file/source.rb:155:in `each'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/type/file/source.rb:155:in `metadata'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/type/file/source.rb:112:in `copy_source_values'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/type/file.rb:655:in `retrieve'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/type.rb:721:in `retrieve_resource'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:32:in `perform_changes'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:133:in `evaluate'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/transaction.rb:49:in `apply'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/transaction.rb:84:in `eval_resource'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/transaction.rb:104:in `evaluate'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:454:in `thinmark'
C:/Program Files (x86)/Puppet Labs/Puppet/sys/ruby/lib/ruby/1.8/benchmark.rb:308:in `realtime'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:453:in `thinmark'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/transaction.rb:104:in `evaluate'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/transaction.rb:386:in `traverse'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/transaction.rb:99:in `evaluate'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/resource/catalog.rb:141:in `apply'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer/downloader.rb:32:in `evaluate'
C:/Program Files (x86)/Puppet Labs/Puppet/sys/ruby/lib/ruby/1.8/timeout.rb:67:in `timeout'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer/downloader.rb:31:in `evaluate'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer/plugin_handler.rb:19:in `download_plugins'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:77:in `prepare'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:138:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:46:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent/locker.rb:11:in `lock'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:46:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/sys/ruby/lib/ruby/1.8/sync.rb:230:in `synchronize'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:46:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:110:in `with_client'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:44:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:172:in `call'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:172:in `controlled_run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:42:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application/agent.rb:345:in `onetime'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application/agent.rb:319:in `run_command'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:309:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:416:in `hook'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:309:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:407:in `exit_on_fail'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:309:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line.rb:69:in `execute'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/bin/puppet:4
err: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/lib]: Could not evaluate: Could not intern from pson: Paths must be fully qualified Could not retrieve file metadata for puppet://puppet/plugins: Could not intern from pson: Paths must be fully qualified
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/indirector/rest.rb:56:in `deserialize'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/indirector/rest.rb:120:in `find'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/indirector/indirection.rb:196:in `find'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:246:in `retrieve_new_catalog'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:454:in `thinmark'
C:/Program Files (x86)/Puppet Labs/Puppet/sys/ruby/lib/ruby/1.8/benchmark.rb:308:in `realtime'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:453:in `thinmark'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:245:in `retrieve_new_catalog'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:86:in `retrieve_catalog'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:112:in `retrieve_and_apply_catalog'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:152:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:46:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent/locker.rb:11:in `lock'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:46:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/sys/ruby/lib/ruby/1.8/sync.rb:230:in `synchronize'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:46:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:110:in `with_client'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:44:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:172:in `call'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:172:in `controlled_run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:42:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application/agent.rb:345:in `onetime'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application/agent.rb:319:in `run_command'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:309:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:416:in `hook'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:309:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:407:in `exit_on_fail'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:309:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line.rb:69:in `execute'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/bin/puppet:4
err: Could not retrieve catalog from remote server: Error 400 on SERVER: validate_re(): "" does not match "^true$|^false$" at /opt/puppet/share/puppet/modules/pe_mcollective/manifests/init.pp:42 on node winvm-09b0d396
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/state/last_run_summary.yaml]/content: 

Updated by Josh Cooper 3 months ago

The error starts on the master:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: validate_re(): "" does not match "^true$|^false$" 
at /opt/puppet/share/puppet/modules/pe_mcollective/manifests/init.pp:42 on node winvm-09b0d396

I think you are running into #11696, due to the mcollective plugin. Can you remove the pe plugins and verify if the problems persists?

Updated by Jeff McCune 3 months ago

Josh Cooper wrote:

The error starts on the master:

[…]

I think you are running into #11696, due to the mcollective plugin. Can you remove the pe plugins and verify if the problems persists?

No, that’s a separate known error. The failure is during pluginsync which happens before the catalog is retrieved.

Updated by Jeff McCune 3 months ago

Update

I tried installing 2.7.x (2.7.10-224-g47af089, my ticket/2.7.x/1168_downcase_certname_value branch in PR 500) into C:\puppetlabs to avoid the spaces and parentheses in the path name and am still seeing this:

info: Retrieving plugin
err: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/lib]: Failed to generate additional resources using 'eval_generate: Could not intern_multiple from pson: Paths must be fully qualified
err: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/lib]: Could not evaluate: Could not intern from pson: Paths must be fully qualified Could not retrieve file metadata for puppet://puppet/plugins: Could not intern from pson: Paths must be fully qualified
err: Could not retrieve catalog from remote server: Error 400 on SERVER: validate_re(): "" does not match "^true$|^false$" at /opt/puppet/share/puppet/modules/pe_mcollective/manifests/init.pp:42 on node winvm-09b0d396
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
notice: /File[C:/Documents and Settings/All Users/Application Data/PuppetLabs/puppet/var/state/last_run_summary.yaml]/content: 

Updated by Josh Cooper 3 months ago

  • Status changed from Needs More Information to Accepted

I’m able to reproduce. We’re being too restrictive about validating the metadata path in Puppet::FileServing::Base. When recursing remote files, e.g. pluginsync, the path is the remote Unix style path.

Updated by Josh Cooper 3 months ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Branch changed from https://github.com/puppetlabs/puppet/pull/281 to https://github.com/puppetlabs/puppet/pull/511

This fixes plugin sync on Windows agents from remote POSIX puppet masters. While fixing this the existing pluginsync acceptance test revealed a related issue in how the default owner and group are assigned to newly downloaded files. Fixed that and added an acceptance test to verify default mode behavior, e.g. readable directories get execute bit, files do not.

Updated by Jeff McCune 3 months ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Target version changed from 2.7.x to 2.7.12

Updated by Matthaus Litteken 3 months ago

  • Status changed from Merged - Pending Release to Closed

Released in 2.7.12rc1

Also available in: Atom PDF