Discussion:
[Puppet Users] A substring operation does not accept a String as a charachter index
Andoreasu
2016-12-16 14:42:05 UTC
Permalink
Hello together,

we change from Puppet 3 to Puppet 4. In some of our Modules, we get Error
message while the node is retrieving the catalog from the master server.

It always said:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER:
Serve
r Error: Evaluation Error: Error while evaluating a Resource Statement,
Evaluati
on Error: A substring operation does not accept a String as a character
index. E
xpected an Integer at /etc/puppetlabs/code/environments/development/modules/
inst
all_oracle12cdriver/manifests/init.pp:6:19 on node testnode01.testdomain.de
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Its hears a little bit likes this, but i dont see a solution...
https://tickets.puppetlabs.com/browse/PUP-6480

A module where this happens for example:

class install_oracle12cdriver{

package { 'oracle12cdriver':
ensure => installed,
provider => 'chocolatey',
require => file['c:/Oracle', 'c:/Oracle/client.rsp'],
source => 'http://choco01/chocorepo/chocolatey/',
}

file { 'c:/Oracle/client.rsp':
source => 'puppet:///modules/install_oracle12cdriver/client.rsp',
source_permissions => ignore,
}

file { 'c:/Oracle':
ensure => 'directory',
source_permissions => ignore,
}
}


Does anyone know what i can do? Its totaly strange to me. In Puppet 3
everything works fine.

Thanks for any help

best regards
--
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/dddc2816-5f35-45cc-b61d-7fe0a033a090%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rob Nelson
2016-12-16 15:20:17 UTC
Permalink
I think it should be File[] (capital F) rather than file[] on line 6
Post by Andoreasu
Hello together,
we change from Puppet 3 to Puppet 4. In some of our Modules, we get Error
message while the node is retrieving the catalog from the master server.
Serve
r Error: Evaluation Error: Error while evaluating a Resource Statement,
Evaluati
on Error: A substring operation does not accept a String as a character
index. E
xpected an Integer at /etc/puppetlabs/code/environments/development/
modules/inst
all_oracle12cdriver/manifests/init.pp:6:19 on node testnode01.testdomain.
de
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Its hears a little bit likes this, but i dont see a solution...
https://tickets.puppetlabs.com/browse/PUP-6480
class install_oracle12cdriver{
ensure => installed,
provider => 'chocolatey',
require => file['c:/Oracle', 'c:/Oracle/client.rsp'],
source => 'http://choco01/chocorepo/chocolatey/',
}
source => 'puppet:///modules/install_oracle12cdriver/client.rsp',
source_permissions => ignore,
}
ensure => 'directory',
source_permissions => ignore,
}
}
Does anyone know what i can do? Its totaly strange to me. In Puppet 3
everything works fine.
Thanks for any help
best regards
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/dddc2816-5f35-45cc-b61d-7fe0a033a090%40googlegroups.com
<https://groups.google.com/d/msgid/puppet-users/dddc2816-5f35-45cc-b61d-7fe0a033a090%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
Rob Nelson
--
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/CAC76iT9sffVSn8%2BAtQqhY3cLvTc1a0kP%2BA0bVo7%3DwxuWpuGx-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Henrik Lindberg
2016-12-16 23:32:50 UTC
Permalink
Post by Andoreasu
Hello together,
we change from Puppet 3 to Puppet 4. In some of our Modules, we get
Error message while the node is retrieving the catalog from the master
server.
|
Error:Couldnotretrieve catalog fromremote server:Error500on SERVER:Serve
r Error:EvaluationError:Errorwhileevaluating a ResourceStatement,Evaluati
on Error:A substring operation does notaccept a Stringasa character index.E
xpected an Integerat
/etc/puppetlabs/code/environments/development/modules/inst
all_oracle12cdriver/manifests/init.pp:6:19on node testnode01.testdomain.de
Warning:Notusingcache on failed catalog
Error:Couldnotretrieve catalog;skipping run
|
Its hears a little bit likes this, but i dont see a solution...
https://tickets.puppetlabs.com/browse/PUP-6480
|
classinstall_oracle12cdriver{
ensure=>installed,
provider =>'chocolatey',
require=>file['c:/Oracle','c:/Oracle/client.rsp'],
File['c:/Oracle','c:/Oracle/client.rsp'] (captial F). What you have
there now means the same as:
"file"['c:/Oracle','c:/Oracle/client.rsp'] which is a failed attempt to
get one or more characters out of the string "file" - i.e. you can do
"file"[2,2] to get the substring "il".

So, you are getting an error since the index to get substring from a
string requires one or two integers and you have a file path there.

Hope that helps.
- henrik
Post by Andoreasu
source =>'http://choco01/chocorepo/chocolatey/',
}
source =>'puppet:///modules/install_oracle12cdriver/client.rsp',
source_permissions =>ignore,
}
ensure=>'directory',
source_permissions =>ignore,
}
}
|
Does anyone know what i can do? Its totaly strange to me. In Puppet 3
everything works fine.
Thanks for any help
best regards
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/dddc2816-5f35-45cc-b61d-7fe0a033a090%40googlegroups.com
<https://groups.google.com/d/msgid/puppet-users/dddc2816-5f35-45cc-b61d-7fe0a033a090%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/
--
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/o31tit%247pj%241%40blaine.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Loading...