On 16/12/16 15:42, Andoreasu wrote:
> 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: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
>
> A module where this happens for example:
>
> |
> classinstall_oracle12cdriver{
>
> package{'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
> 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
> <mailto:
puppet-users...@googlegroups.com>.
> <
https://groups.google.com/d/msgid/puppet-users/dddc2816-5f35-45cc-b61d-7fe0a033a090%40googlegroups.com?utm_medium=email&utm_source=footer>.
Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/