Jira (PUP-5818) regular expression character class/sets interpreted incorrectly for node

2016-02-21 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly for node  
 
 
 
 
 
 
 
 
 
 
When we fixed 

PUP-3167
 we concluded that the change would not be backwards compatible and no fix was therefore done for the 3.x series. If you are bit badly by this, you may want to consider applying the PR /patch from 

PUP-3167
 in your own puppet. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly for node

2016-02-21 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly for node  
 
 
 
 
 
 
 
 
 
 
While not a strict duplicate of 

PUP-3167
, the fix made there will also cure this problem. The fix was released in Puppet 4.0.0. 
In older versions you have to use regular expressions that the name mangler does not turn into actual names of nodes. Sometimes this is as simple as changing to [1-2] instead of [12], sometimes zero effect regexp parts have to be inserted into the regexp for the sole purpose of making the mangled name different. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly for node

2016-02-21 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly for node  
 
 
 
 
 
 
 
 
 
 
I think I know what is going on here and that the problem is fixed in newer versions of puppet. 
I cannot reproduce this on 4.x 
The issue is that older puppets performs name manging on the regular _expression_ and assigns the node to a name that is essentially the regular _expression_ with some punctuation replaced by underscores. Thus the regexp /lb[12]/ becomes "lb12" whereas the /lb[1.2]/ becomes "lb1_2". The insanity continues as it then checks with the node's "names" (which it constructs from things like certname, hostname, domain etc. depending on what is available. (When I run this I get an array ['lb12', 'Henrik2']). Each of those names are matched agains a) the identity/name of the node _expression_ - and surprise, it finds as "lb12" the badly transformed regexp. It accepts this as a match and it never gets to the regexp match (which would indeed fail). 
Will locate the ticket for this. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly for node

2016-02-20 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-5818 
 
 
 
  regular _expression_ character class/sets interpreted incorrectly for node  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Summary:
 
 regular _expression_ character class/sets interpreted incorrectly  for node 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-20 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg assigned an issue to Unassigned 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-5818 
 
 
 
  regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Assignee:
 
 Henrik Lindberg 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-09 Thread Christopher Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Christopher Price commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
Henrik Lindberg AFAIK JRuby strives for compatibility with the upstream Ruby version that it is emulating, and I'd be a little surprised if there were differences in the regex behavior, but it's not impossible. 
One point that may be relevant is that Puppet Server's current JRuby strives for compatibility with MRI Ruby 1.9.3, so if Ruby itself made any semantic changes related to regexes between 1.9.x and 2.x, those might not be reflected in Puppet Server until we upgrade to a JRuby that provides MRI 2.x compatibility. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-09 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-5818 
 
 
 
  regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Sprint:
 
 Language Triage 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-09 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
Ping Christopher Price - is there a different regexp package in use in JRuby than in MRI ? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-09 Thread Daniel Lupescu (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Daniel Lupescu commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
Hello, 
1) Yes, I ran the tests in a .pp file - and as I mentioned in the previous update, the issue was first encountered in a Puppet Server environment - so running in command line mode is not the cause. 
2) Puppet match expressions are not affected. The below snippet behaves as expected - lb12.test.local does not match lb[12].test.local 
 
 
 
 
 
 
node /^lb\d+$/ { 
 
 
 
 
if 'lb12.test.local' =~ /lb[12].test.local/ { 
 
 
 
 
notify { "match": } 
 
 
 
 
} 
 
 
 
 
}
 
 
 
 
 
 
 
3) so far only node definitions using regular expressions seem to be affected. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 

Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-09 Thread Daniel Lupescu (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Daniel Lupescu assigned an issue to Henrik Lindberg 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-5818 
 
 
 
  regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 

Change By:
 
 Daniel Lupescu 
 
 
 

Assignee:
 
 Daniel Lupescu Henrik Lindberg 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-09 Thread Christopher Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Christopher Price commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
Henrik Lindberg nope, no special handling of nodes on Puppet Server. The Java regexp vs. Ruby regexp is entirely possible, though. 
I found this: https://github.com/jruby/jruby/wiki/DifferencesBetweenMriAndJruby#regular-expressions 
But not sure how recent that is. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-09 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
it says "matches Onigurama's behavior" - which to me sounds like "you cannot believe it is not butter" unless they actually do link Onigurama's regexp library and use exactly the same version w.r.t bugfixes. 
Christopher Price can you do a quick manual check with the regular _expression_ we are discussing just to be sure nothing is wrong in general in the JRuby version before I dig into the mystery (I have not found anything obvious yet in node). 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-09 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
Thanks Christopher Price can you check the char group _expression_ as well - i.e. [1-2] instead of [12] 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-09 Thread Christopher Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Christopher Price commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
╭─cprice@cosmicshame ~ ‹system› (office-workstation ✘)✹ 
 
 
 
 
╰─➤  rbenv shell 1.9.3-p5511:32:38 PM 
 
 
 
 
╭─cprice@cosmicshame ~ ‹1.9.3-p551› (office-workstation ✘)✹ 
 
 
 
 
╰─➤  irb   1:32:51 PM 
 
 
 
 
irb(main):001:0> 'lb12.test.local' =~ /lb[12].test.local/ 
 
 
 
 
=> nil 
 
 
 
 
irb(main):002:0> 'lb1.test.local' =~ /lb[12].test.local/ 
 
 
 
 
=> 0 
 
 
 
 
irb(main):003:0>  
 
 
 
 
   

Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-09 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
Christopher Price Ruby MRI made changes to regular expressions in 1.9. (Although I think they got back ported to 1.8.7). I am asking because the Java Regexp is quite different. Could it be that JRuby is using an older "MRI regexp" (i.e. we should then see the problem on MRI 1.8.7 perhaps). 
Also, since this seems to be related to node expressions - is there any special handling of nodes when running on Puppet Server (I am not aware of any, but thought it best to ask to eliminate that as a potential source of this problem). 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-09 Thread Christopher Price (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Christopher Price commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
╭─cprice@cosmicshame ~ ‹system› (office-workstation ✘)✹ 
 
 
 
 
╰─➤  rbenv shell 1.9.3-p5511:37:47 PM 
 
 
 
 
╭─cprice@cosmicshame ~ ‹1.9.3-p551› (office-workstation ✘)✹ 
 
 
 
 
╰─➤  irb   4:45:59 PM 
 
 
 
 
irb(main):001:0> 'lb12.test.local' =~ /lb[1-2].test.local/ 
 
 
 
 
=> nil 
 
 
 
 
irb(main):002:0> 'lb1.test.local' =~ /lb[1-2].test.local/ 
 
 
 
 
=> 0 
 
 
 
 
irb(main):003:0>  
 
 
 
 
 

Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-09 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
Thank again Christopher Price. Looks like that is working. 
That makes it a node selection specific problem. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-08 Thread Daniel Lupescu (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Daniel Lupescu commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
The issue was first encountered in an environment using Puppet Server 3.7.3 running on CentOS 6.6 with Ruby v1.8.7. (not using future parser) The Puppet agent was running in an identical environment. I could also reproduce it on Ubuntu 14.04, which has Ruby v1.9.3 and using puppet version 3.4.3 
On both those OSes, the issue is reproducible using puppet apply and the snippet in a .pp file - with or without using the future parser. 
Using irb the regexp match works as expected: 
$ irb irb(main):001:0> "lb12.test.local" =~ /lb[12].test.local/ => nil irb(main):002:0> "lb1.test.local" =~ /lb[12].test.local/ => 0 irb(main):003:0> "lb3.test.local" =~ /lb[12].test.local/ => nil 
Let me know if you need any more information. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-08 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
Thank you Daniel Lupescu that helps us rule out many things that are not causing this: 
 

It does not appear to be platform specific
 

It is not tied to Ruby 1.8.7
 

We do support Ruby 1.9.3
 
 
I want to make sure we are not being fooled by command line substitution - did you run your tests as suggested? I.e. by having the test in a .pp file instead of entering the code on the command line. (We have been bitten by that many times where there are special characters like $ involved as shells like to eat those and cause all sorts of fun stuff to happen). 
I want to establish: 
 

If it is a command line thing or not
 

If it works in a puppet match _expression_ (would be surprising if not, given that you ran irb (which I assume is using the same Ruby version as puppet)..
 

If the problem is specific to the node _expression_'s use of regular _expression_
 
 
Can you check those things ? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
  

Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-06 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
Daniel Lupescu Please don't set "in progress" status; that means that engineering is working on a fix. Just assign the ticket to me when you have responded. (We will be going back and forth in "Needs Infomation" state until the ticket is either "Accepted", or "Closed". After accepted comes "Ready for Engineering" => "In Progress"). If ticket is accepted, you will also see it ending up in Laguage Triage sprint - we will then assess importance and schedule when it will be addressed (i.e. assigning a fix release). 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-06 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
Can you try to put the test snippet in a .pp file (and running it without -e) as there could potentially be interference from the shell that causes the problem. 
Also, test with 3.x parser=future vs. 3.x parser=current and see if there is a difference. You can also see if this is a regular _expression_ thing by trying just a match i .pp logic i.e. 
 
 
 
 
 
 
notice("lb12" =~  /^lb[12]$/)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-06 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
Can you also provide more information about your environment: 
 

OS
 

Version of MRI Ruby, or if you are running on Puppet Server
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-06 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-5818 
 
 
 
  regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 
 
 
 
 
 
 
 Using Puppet v3.7.3, when using character sets or character classes in a regular _expression_ for a node definition, the _expression_ is parsed incorrectly in some cases:v3.7.3: {code} puppet apply --certname lb12 -e 'node /^lb[12]$/ { notify { "match": } }' Notice: Compiled catalog for lb12 in environment production in 0.02 secondsNotice: matchNotice: /Stage[main]/Main/Node[lb12]/Notify[match]/message: defined 'message' as 'match'Notice: Finished catalog run in 0.86 seconds {code}   Expected result is for the regular _expression_ not to match.Using a range works as expected though: {code} puppet apply --certname lb12 -e 'node /^lb[1-2]$/ { notify { "match": } }' {code} Does not seem to affect Puppet 4 - tested with v4.0.0 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-06 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg assigned an issue to Daniel Lupescu 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-5818 
 
 
 
  regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Assignee:
 
 Henrik Lindberg Daniel Lupescu 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-04 Thread Daniel Lupescu (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Daniel Lupescu created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-5818 
 
 
 
  regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Affects Versions:
 

 PUP 3.7.3 
 
 
 

Assignee:
 
 Kylo Ginsberg 
 
 
 

Components:
 

 Client, Server 
 
 
 

Created:
 

 2016/02/04 3:41 AM 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Daniel Lupescu 
 
 
 
 
 
 
 
 
 
 
Using Puppet v3.7.3, when using character sets or character classes in a regular _expression_ for a node definition, the _expression_ is parsed incorrectly in some cases: 
v3.7.3: puppet apply --certname lb12 -e 'node /^lb[12]$/ { notify  { "match": } 
 }'  Notice: Compiled catalog for lb12 in environment production in 0.02 seconds Notice: match Notice: /Stage[main]/Main/Node[lb12]/Notify[match]/message: defined 'message' as 'match' Notice: Finished catalog run in 0.86 seconds 
Expected result is for the regular _expression_ not to match. 
Using a range works as expected though: puppet apply --certname lb12 -e 'node /^lb[1-2]$/ { notify  { "match": } 
 }' 
Does not seem to affect Puppet 4 - tested with v4.0.0 
 
 
 
  

Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-04 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg assigned an issue to Daniel Lupescu 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-5818 
 
 
 
  regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Assignee:
 
 Kylo Ginsberg Daniel Lupescu 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-04 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-5818 
 
 
 
  regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Component/s:
 
 Server 
 
 
 

Component/s:
 
 Client 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-04 Thread Daniel Lupescu (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Daniel Lupescu assigned an issue to Henrik Lindberg 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-5818 
 
 
 
  regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 

Change By:
 
 Daniel Lupescu 
 
 
 

Assignee:
 
 Daniel Lupescu Henrik Lindberg 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-04 Thread Daniel Lupescu (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Daniel Lupescu commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
It seems that I was not sufficiently clear with the issue: 
puppet apply --certname lb12 -e 'node /^lb[12]$/ { notify  { "match": } 
^- should only match lb1 or lb2, but it also matches lb12, incorrectly. 
[12] and [1-2] are equivalent character classes, but the problem only manifests itself in the first case. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-04 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-5818 
 
 
 
  regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Scrum Team:
 
 Language 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-5818) regular expression character class/sets interpreted incorrectly

2016-02-04 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-5818 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: regular _expression_ character class/sets interpreted incorrectly  
 
 
 
 
 
 
 
 
 
 
Handling of regular _expression_ based node matches were changed in puppet 4.0.0. The changes are not backwards compatible and cannot be backported to 3.x. 
The label shown for regular expressions may be a complete lie as i removes all special characters. The output you got could come from any of the two regular expressions. What happens if you change the output to "match regexp1", and "match regexp2" ? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.