Issue #14378 has been updated by Dominic Cleal. Status changed from Needs More Information to In Topic Branch Pending Review Assignee set to Dominic Cleal Target version changed from 3.x to 3.0.x Affected Puppet version changed from development to 3.0.0rc3 Branch set to https://github.com/puppetlabs/puppet/pull/835
I was thinking of the reverse - skip anything that contained square brackets or quote characters, which should catch any case where escaping would be needed. Pull request 835 submitted. ---------------------------------------- Bug #14378: Expressions in Augeas context cause optimisation matching error https://projects.puppetlabs.com/issues/14378#change-64296 Author: Dominic Cleal Status: In Topic Branch Pending Review Priority: Normal Assignee: Dominic Cleal Category: augeas Target version: 3.0.x Affected Puppet version: 3.0.0rc3 Keywords: augeas error Branch: https://github.com/puppetlabs/puppet/pull/835 When an augeas resource has a context given that contains a complex path expression, this causes the optimisation added in #7285 to break as it doesn't escape quotes. An example that I hit it on: augeas { 'sudowheel': context => "/files/etc/sudoers/spec[user = '%wheel' and host_group/host = 'ALL']", changes => [ "set user %wheel", "set host_group/host ALL", "set host_group/command ALL", "set host_group/command/runas_user root", ], } Generates: err: /Stage[main]//Augeas[sudowheel]: Could not evaluate: unknown error - Matching path expression '/augeas/load/*['/etc/sudoers/spec[user = '%wheel' and host_group/host = 'ALL']/' !~ glob(incl) + regexp('/.*')]' failed Either the optimisation should be disabled with anything reasonably complex (probably best), or it'd have to escape any problematic characters (would need to check the pathx parser to see what it understands). -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
