Windows Package With Title Containing Square Brackets

166 views
Skip to first unread message

Dan Gibbons

unread,
May 28, 2014, 10:05:57 AM5/28/14
to puppet...@googlegroups.com
Hi,

We're trying to install a package but the title has got square brackets which seems to make Puppet blow up, for example:

  package { "Windows Server AppFabric v1.1 CU4 [KB 2800726]":
    ensure          => installed,
    source          => $fullInstallerPath,
    install_options => $install_options,
  }  

Trying to run this results in error "invalid tag".  We've tried escaping the brackets but that doesn't work either.

Even running puppet resource form the command prompt gives an error:

C:\Program Files (x86)\Puppet Labs\Puppet\bin>puppet resource package
Error: Could not run: Invalid tag "microsoft sql server 2005 compact edition "

The actual title in control panel for is "microsoft sql server 2005 compact edition [ENU]".  It would seem resource titles with square brackets cause issues.

Is this is a bug in Puppet?  Can anyone suggest a work around as this kind of renders Puppet not very useful for us without being able to install products.

Thanks

Dan

Rob Reynolds

unread,
May 29, 2014, 9:40:20 AM5/29/14
to puppet...@googlegroups.com
Hi Dan,
 Which version of Puppet are you using on Windows? We recently fixed some encoding issues that would seem to have been limited by similar issues.

Let's try
puppet resource package --debug --trace --verbose



--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/423b82dc-68bf-49cf-9e1e-2dd0973f84d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Rob Reynolds
Developer, Puppet Labs

Join us at PuppetConf 2014September 23-24 in San Francisco
Register by May 30th to take advantage of the Early Adopter discount save $349!

Dan Gibbons

unread,
May 29, 2014, 11:08:48 AM5/29/14
to puppet...@googlegroups.com
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>'

Thanks

Dan

Rob Reynolds

unread,
Jun 2, 2014, 1:47:15 PM6/2/14
to puppet...@googlegroups.com
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.




For more options, visit https://groups.google.com/d/optout.



--
Rob Reynolds
Developer, Puppet Labs

Join us at PuppetConf 2014September 20-24 in San Francisco
Register by June 5th to take advantage of the Early Adopter discount save $349!

Josh Cooper

unread,
Jun 2, 2014, 5:54:05 PM6/2/14
to puppet...@googlegroups.com
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


--
Josh Cooper
Reply all
Reply to author
Forward
0 new messages