On Mon, Jun 2, 2014 at 10:47 AM, Rob Reynolds <r...@puppetlabs.com> wrote:

> This looks like a bug that was not resolved with our work on PUP-1211[1].
>
> Would you mind filing a ticket[2] with this behavior so we can prioritize
> it? Thank you.
>
> [1] https://tickets.puppetlabs.com/browse/PUP-1211
> [2] https://tickets.puppetlabs.com/browse/PUP
>
>
> On Thu, May 29, 2014 at 10:08 AM, Dan Gibbons <dangibbons....@gmail.com>
> wrote:
>
>> Hi Rob,
>>
>> Thanks for getting back to me.
>>
>> Agent version 3.4.3, here's the output:
>>
>> C:\Program Files (x86)\Puppet Labs\Puppet\bin>puppet resource package
>> --debug --
>> trace --verbose
>> Debug: Puppet::Type::Package::ProviderAix: file /usr/bin/lslpp does not
>> exist
>> Debug: Puppet::Type::Package::ProviderDpkg: file /usr/bin/dpkg does not
>> exist
>> Debug: Puppet::Type::Package::ProviderApt: file /usr/bin/apt-get does not
>> exist
>> Debug: Puppet::Type::Package::ProviderAptitude: file /usr/bin/aptitude
>> does not
>> exist
>> Debug: Puppet::Type::Package::ProviderRpm: file rpm does not exist
>> Debug: Puppet::Type::Package::ProviderAptrpm: file apt-get does not exist
>> Debug: Puppet::Type::Package::ProviderSun: file /usr/bin/pkginfo does not
>> exist
>> Debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not
>> exist
>> Debug: Puppet::Type::Package::ProviderOpenbsd: file pkg_info does not
>> exist
>> Debug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_info
>> does not
>> exist
>> Debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swinstall does
>> not ex
>> ist
>> Debug: Puppet::Type::Package::ProviderNim: file /usr/sbin/nimclient does
>> not exi
>> st
>> Debug: Puppet::Type::Package::ProviderOpkg: file opkg does not exist
>> Debug: Puppet::Type::Package::ProviderPacman: file /usr/bin/pacman does
>> not exis
>> t
>> Debug: Puppet::Type::Package::ProviderPkg: file /usr/bin/pkg does not
>> exist
>> Debug: Puppet::Type::Package::ProviderPkgin: file pkgin does not exist
>> Debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge does
>> not exi
>> st
>> Debug: Puppet::Type::Package::ProviderPorts: file
>> /usr/local/sbin/portupgrade do
>> es not exist
>> Debug: Puppet::Type::Package::ProviderPortupgrade: file
>> /usr/local/sbin/portupgr
>> ade does not exist
>> Debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not
>> exist
>> Debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not
>> exist
>> Debug: Puppet::Type::Package::ProviderUp2date: file /usr/sbin/up2date-nox
>> does n
>> ot exist
>> Debug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not exist
>> Debug: Puppet::Type::Package::ProviderYum: file yum does not exist
>> Debug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper does
>> not exis
>> t
>> Debug: Puppet::Type::Package::ProviderAix: file /usr/bin/lslpp does not
>> exist
>> Debug: Puppet::Type::Package::ProviderDpkg: file /usr/bin/dpkg does not
>> exist
>> Debug: Puppet::Type::Package::ProviderApt: file /usr/bin/apt-get does not
>> exist
>> Debug: Puppet::Type::Package::ProviderAptitude: file /usr/bin/aptitude
>> does not
>> exist
>> Debug: Puppet::Type::Package::ProviderRpm: file rpm does not exist
>> Debug: Puppet::Type::Package::ProviderAptrpm: file apt-get does not exist
>> Debug: Puppet::Type::Package::ProviderSun: file /usr/bin/pkginfo does not
>> exist
>> Debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not
>> exist
>> Debug: Puppet::Type::Package::ProviderOpenbsd: file pkg_info does not
>> exist
>> Debug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_info
>> does not
>> exist
>> Debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swinstall does
>> not ex
>> ist
>> Debug: Puppet::Type::Package::ProviderNim: file /usr/sbin/nimclient does
>> not exi
>> st
>> Debug: Puppet::Type::Package::ProviderOpkg: file opkg does not exist
>> Debug: Puppet::Type::Package::ProviderPacman: file /usr/bin/pacman does
>> not exis
>> t
>> Debug: Puppet::Type::Package::ProviderPkg: file /usr/bin/pkg does not
>> exist
>> Debug: Puppet::Type::Package::ProviderPkgin: file pkgin does not exist
>> Debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge does
>> not exi
>> st
>> Debug: Puppet::Type::Package::ProviderPorts: file
>> /usr/local/sbin/portupgrade do
>> es not exist
>> Debug: Puppet::Type::Package::ProviderPortupgrade: file
>> /usr/local/sbin/portupgr
>> ade does not exist
>> Debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not
>> exist
>> Debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not
>> exist
>> Debug: Puppet::Type::Package::ProviderUp2date: file /usr/sbin/up2date-nox
>> does n
>> ot exist
>> Debug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not exist
>> Debug: Puppet::Type::Package::ProviderYum: file yum does not exist
>> Debug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper does
>> not exis
>> t
>> Debug: Package Microsoft SQL Server 2012 T-SQL Language Service  found in
>> both w
>> indows and windows; skipping the windows version
>> Error: Could not run: Invalid tag "microsoft sql server 2005 compact
>> edition "
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/util/tagging.rb:12:i
>> n `block in tag'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/util/tagging.rb:11:i
>> n `each'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/util/tagging.rb:11:i
>> n `tag'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/resource.rb:227:in `
>> initialize'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/type.rb:1183:in `new
>> '
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/type.rb:1183:in `has
>> h2resource'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/type.rb:2171:in `ini
>> tialize'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/type.rb:1145:in `new
>> '
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/type.rb:1145:in `blo
>> ck (2 levels) in instances'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/type.rb:1135:in `col
>> lect'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/type.rb:1135:in `blo
>> ck in instances'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/type.rb:1128:in `col
>> lect'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/type.rb:1128:in `ins
>> tances'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/indirector/resource/
>> ral.rb:25:in `search'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/indirector/indirecti
>> on.rb:267:in `search'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/application/resource
>> .rb:226:in `find_or_save_resources'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/application/resource
>> .rb:143:in `main'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/application.rb:372:i
>> n `run_command'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/application.rb:364:i
>> n `block (2 levels) in run'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/application.rb:470:i
>> n `plugin_hook'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/application.rb:364:i
>> n `block in run'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/util.rb:478:in `exit
>> _on_fail'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/application.rb:364:i
>> n `run'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/util/command_line.rb
>> :137:in `run'
>> C:/Program Files (x86)/Puppet
>> Labs/Puppet/puppet/lib/puppet/util/command_line.rb
>> :91:in `execute'
>> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/bin/puppet:4:in `<main>'
>>
>>
According to the puppet language docs[1], resource names should be able to
contain any character, but something is clearly wrong with square brackets
in resource names, but only when they appear at the end of the string:

0 ~/work/puppet (master)  $ bundle exec puppet apply -e "notify { 'Hello
[world]': }" --trace
Error: Invalid tag hello  at line 1 on node arcturus.wifi.puppetlabs.net
...
/Users/josh/work/puppet/lib/puppet/util/errors.rb:104:in `fail'
/Users/josh/work/puppet/lib/puppet/util/tagging.rb:19:in `block in tag'
/Users/josh/work/puppet/lib/puppet/util/tagging.rb:11:in `each'
/Users/josh/work/puppet/lib/puppet/util/tagging.rb:11:in `tag'
/Users/josh/work/puppet/lib/puppet/resource.rb:223:in `initialize'
/Users/josh/work/puppet/lib/puppet/parser/resource.rb:118:in `initialize'
/Users/josh/work/puppet/lib/puppet/pops/evaluator/runtime3_support.rb:282:in
`new'
...

0 ~/work/puppet (master)  $ bundle exec puppet apply -e "notify { 'Hello
[world] again': }"
Notice: Compiled catalog for arcturus.wifi.puppetlabs.net in environment
production in 0.02 seconds
Notice: Hello [world] again
Notice: /Stage[main]/Main/Notify[Hello [world] again]/message: defined
'message' as 'Hello [world] again'
Notice: Finished catalog run in 0.02 seconds

I get the same results using future parser also. Definitely looks like a
language issue.

In the meantime, you should be able to specify the package name using its
MSI PackageCode[2]

Josh

[1]
http://docs.puppetlabs.com/puppet/latest/reference/lang_reserved.html#resources
[2] https://projects.puppetlabs.com/issues/11868#note-1

-- 
Josh Cooper
Developer, Puppet Labs

*Join us at PuppetConf 2014 <http://www.puppetconf.com/>, September
20-24 in San Francisco*
*Register by June 5th to take advantage of the Early Adopter discount
<http://links.puppetlabs.com/puppetconf-early-adopter> **—**save $349!*

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2Bu97uk8Q_gHD-CqcmHPFtM4xEQHieY3hSw%2B_Y29Gt5nQQiGCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to