Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-16 Thread Kurt Wall (JIRA)
Title: Message Title










 

 Kurt Wall commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










Mostly verified in master at SHA=8e70dd65a5d5d57b97ca1ae0ff588a232e06bb21.
A non-system user with a UID matching unless_uid is deleted:



# puppet resource user jenny
user { 'jenny':
  ensure   = 'present',
  gid  = '493',
  home = '/home/jenny',
  password = '!!',
  password_max_age = '-1',
  password_min_age = '-1',
  shell= '/bin/bash',
  uid  = '8675309',
}

# x.pp
resources { 'user':
	purge = true,
	unless_system_user = true,
	unless_uid = 2,
}

#  puppet apply x.pp
Notice: Compiled catalog for centos6-5-base.localdomain in environment production in 0.02 seconds
Notice: /Stage[main]/Main/User[jenny]/ensure: removed
Notice: Finished catalog run in 0.20 seconds
# puppet resource user jenny
user { 'jenny':
  ensure = 'absent',
}



Does not remove a system user (UID  500):



# puppet apply x.pp
Notice: Compiled catalog for centos6-5-base.localdomain in environment production in 0.02 seconds
Notice: Finished catalog run in 0.11 seconds
[root@centos6-5-base puppet]# puppet resource user jenny
user { 'jenny':
  ensure   = 'present',
  gid  = '501',
  home = '/home/jenny',
  password = '!!',
  password_max_age = '9',
  password_min_age = '0',
  shell= '/bin/bash',
  uid  = '450',
}



It does not work with ranges:



# puppet resource user jenny
user { 'jenny':
  ensure   = 'present',
  gid  = '501',
  home = '/home/jenny',
  password = '!!',
  password_max_age = '9',
  password_min_age = '0',
  shell= '/bin/bash',
  uid  = '34000',
}

# x.pp
resources { 'user':
	purge = true,
	unless_system_user = true,
	unless_uid = 33300..3,
}

# puppet apply x.pp
Error: Could not parse for environment production: Syntax error at '.'; expected '}' at /home/puppet/puppet/x.pp:4 on node centos6-5-base.localdomain
Error: Could not parse for environment production: Syntax error at '.'; expected '}' at /home/puppet/puppet/x.pp:4 on node centos6-5-base.localdomain















   

 Add Comment







 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-16 Thread Henrik Lindberg (JIRA)
Title: Message Title










 

 Henrik Lindberg commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










IIRC, the decision was to remove the support for ranges, so if that was what failed the review, then it actually passed. Ping Andy Parker












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-16 Thread Peter Huene (JIRA)
Title: Message Title










 

 Peter Huene commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










Kurt Wall We don't support syntax like that in Puppet 3.x. If we had decided to fix this bug to what it originally was intended to support, you would have to pass a string like '[1000..2000]' which the type would munge as a range. Instead we decided to not support that special syntax, so users will need to use arrays for Puppet 3.x. Given that the range function from stdlib returns an array, users can use it to generate those arrays as well.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-16 Thread Kurt Wall (JIRA)
Title: Message Title










 

 Kurt Wall commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










Peter Huene Henrik Lindberg Thanks for straightening me out. I originally missed Peter's comment, We've come to the general consensus to back out the special range syntax the original PR attempted to support. For 3.x, you will need to use the stdlib range function to make it work.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-15 Thread Ethan Brown (JIRA)
Title: Message Title










 

 Ethan Brown assigned an issue to Peter Huene


















 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 










Change By:

 Ethan Brown




Assignee:

 PeterHuene












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-15 Thread Peter Huene (JIRA)
Title: Message Title










 

 Peter Huene updated an issue


















 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 










Change By:

 Peter Huene




Assignee:

 PeterHuene












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-15 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker assigned an issue to Andy Parker


















 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 










Change By:

 Andy Parker




Assignee:

 AndyParker












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-15 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










Tried it out on centos6 where it properly ignored the system users (uid =500) and excluded other uids that I specified.
Merged into master in 0941f6












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-14 Thread Peter Huene (JIRA)
Title: Message Title










 

 Peter Huene commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










On today's PR triage hangout, we've come to the general consensus to back out the special range syntax the original PR attempted to support. For 3.x, you will need to use the stdlib range function to make it work. For 4.x, the future parser will have support for ranges in the Puppet language and this parameter would be a good candidate for using it. I should get the changes merged in today.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-14 Thread Kylo Ginsberg (JIRA)
Title: Message Title










 

 Kylo Ginsberg updated an issue


















 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 










Change By:

 Kylo Ginsberg




Sprint:

 Week2014-4-30to2014-5-7,Week2014-5-7to2014-5-14 ,Week2014-5-14to2014-5-21












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-14 Thread Kylo Ginsberg (JIRA)
Title: Message Title










 

 Kylo Ginsberg updated an issue


















 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 










Change By:

 Kylo Ginsberg




Sprint:

 Week2014-4-30to2014-5-7,Week2014-5-7to2014-5-14,Week2014-5-14to2014-5-21












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-14 Thread Kylo Ginsberg (JIRA)
Title: Message Title










 

 Kylo Ginsberg updated an issue


















 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 










Change By:

 Kylo Ginsberg




Sprint:

 Week2014-4-30to2014-5-7,Week2014-5-7to2014-5-14,Week2014-5- 14 21 to2014-5- 21 28












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-14 Thread Kylo Ginsberg (JIRA)
Title: Message Title










 

 Kylo Ginsberg updated an issue


















 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 










Change By:

 Kylo Ginsberg




Sprint:

 Week2014-4-30to2014-5-7,Week2014-5-7to2014-5-14,Week2014-5-14to2014-5-21












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-14 Thread Peter Huene (JIRA)
Title: Message Title










 

 Peter Huene updated an issue


















 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 










Change By:

 Peter Huene




Sprint:

 Week2014-4-30to2014-5-7,Week2014-5-7to2014-5-14,Week2014-5- 21 14 to2014-5- 28 21












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-09 Thread Kenn Hussey (JIRA)
Title: Message Title










 

 Kenn Hussey updated an issue


















 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 










Change By:

 Kenn Hussey




Sprint:

 Week2014-4-30to2014-5-7 ,Week2014-5-7to2014-5-14












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-07 Thread Peter Huene (JIRA)
Title: Message Title










 

 Peter Huene updated an issue


















 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 










Change By:

 Peter Huene




Priority:

 Critical Major












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-07 Thread Peter Huene (JIRA)
Title: Message Title










 

 Peter Huene commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










I'm not sure if we should be asking users to install a gem to get a previously documented and, albeit it incorrectly, implemented feature to work in a point release. For 4.x, we should obviously support ranges from the parser, but in 3.x I think the least impact on users is to fix the implementation to support what was originally intended (i.e. '[x..y]') as a special syntax for the parameter.
Also, I disagree this bug is critical. A bug inherently means something is broken, so we'd have to treat all bugs as critical with that definition. A bug is critical if it is a security vulnerability or crash. This bug is neither and has an usable workaround that is forwards-compatible, even if it isn't the best in terms of performance.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 


   

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-07 Thread Peter Huene (JIRA)
Title: Message Title










 

 Peter Huene commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










Also, looking at the original PR that implemented this parameter, it seems that Jeff McCune's feedback on the PR was never addressed, so it should never have been merged in the first place. But since it went out in a release, we might as well fix it in 3.x and remove/deprecate/rework it in 4.x.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-06 Thread Felix Frank (JIRA)
Title: Message Title










 

 Felix Frank commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










-ish.
I'd still like to see you move this functionality to a a new type in a module, and perhaps even deprecate unless_uid from the core then.
Nevertheless, if you want the type to support ranges, this would still be a good place to sort out how those should be done first.
If I understand Henrik Lindberg correctly, we can interpret the Integer[x,y] syntax using existing functionality, yes? If so, that would indeed seem ideal to me.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
You received this message because you are subscribed 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-06 Thread Felix Frank (JIRA)
Title: Message Title










 

 Felix Frank commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










Meta: This is marked as critical, but it seems rather normal to me, in terms of severity. Objections?












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-06 Thread Daniele Sluijters (JIRA)
Title: Message Title










 

 Daniele Sluijters commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










It's marked as critical because it doesn't work, the implementation is broken and the docs are broken, there are only workarounds. So I don't think that a severity of normal quite covers it.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-06 Thread Henrik Lindberg (JIRA)
Title: Message Title










 

 Henrik Lindberg commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










Felix Frank yes, the functionality is in place, but users must add the 'rgen' gem since the implementation i in the future part. Does not require using the future parser for everything else though. If this is in a module, it should be fine to require users to also have rgen installed since it is opt in and does not disturb anything else. Usage inside the function is also very simple:



the_type = Puppet::Pops::Types::TypeParser.new.parse(type_in_string_form)



The result is an Puppet::Pops::Types::PIntegerType which has methods to:


get the range as a [from, to] array


support iteration (unless one of the values is Infinity)


get the size (smallest possible size is 1, an empty range can not be expressed


Infinity is a special value in Ruby and it can be used in arithmetic.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-06 Thread Henrik Lindberg (JIRA)
Title: Message Title










 

 Henrik Lindberg commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










See this blog post: http://puppet-on-the-edge.blogspot.se/2014/05/puppet-internals-integer-type-ruby-api.html for more details about using the Integer type from Ruby.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-05 Thread Felix Frank (JIRA)
Title: Message Title










 

 Felix Frank commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










Hmm, so we'd re-implement the parsing of such values in this parameter's hooks, so that we can later throw it out again when Puppet has inherent support for it?
That seems rather wasteful to me, wouldn't it be preferable to forgo range support altogether until Puppet 4 makes them Just Work?












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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.

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-05 Thread Henrik Lindberg (JIRA)
Title: Message Title










 

 Henrik Lindberg commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










The only thing required to make it work for 3x is to have RGen gem installed (required for future parser and 4.0), the fact that the parsing of the type specs is done with the type system is somewhat secondary.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-05-05 Thread Chris Portman (JIRA)
Title: Message Title










 

 Chris Portman commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










Wouldn't this whole piece of functionality be subject to the outcomes of the conversation around 

PUP-2086
?












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-04-30 Thread Peter Huene (JIRA)
Title: Message Title










 

 Peter Huene commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










I'm in agreement with Felix that we should be representing the ranges as strings rather than requiring an array.
I think we should support integers (= 1), strings (= '2'), ranges (= '1..10' or the weird syntax we currently, but brokenly, support of '[1..2]'), and array of any of the aforementioned types (= [1, '2', '1..2']). Munging should return an array of integers and/or ranges. This will still allow the use of the stdlib range function, but we should encourage usage of a range string since it will be more efficient for large ranges.
Thoughts?












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 








Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-04-06 Thread Felix Frank (JIRA)
Title: Message Title










 

 Felix Frank commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










I'm unhappy with the idea of using range() for this purpose. Any specified range will end up in the catalog, as a list of integers (or strings even? shudder)
Should we not instead aim for a string representation for ranges (be it '[x..y]' as originally advised or 'x1-y1,x2-y2,...') that can be passed to the agent for interpretation?












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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, 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-03-30 Thread Chris Portman (JIRA)
Title: Message Title










 

 Chris Portman commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










Ive updated the PR with tests that match the new behaviour.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-03-28 Thread Daniele Sluijters (JIRA)
Title: Message Title










 

 Daniele Sluijters commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










The range I have right now is range(2, 3) which seems to be working fine. That's a range of UID's in our case that developers can use to create out of band users to run their applications as.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-03-28 Thread Daniele Sluijters (JIRA)
Title: Message Title










 

 Daniele Sluijters commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










I was curious about one thing though Andy Parker, how come the tests pass? I would've expected this to blow up in tests because it just doesn't work but that doesn't seem to have happend. Or doesn't it include tests that actually go through parser?












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-03-28 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










Daniele Sluijters, I was wonder the same thing about the tests. They don't go through the parser, which is how the original author convinced themselves that Range was a type that is available (we left it because there is a way to achieve it, but not through the language).












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-03-27 Thread Chris Portman (JIRA)
Title: Message Title










 

 Chris Portman commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










I had an opportunity to test the PR overnight, and made a few updates to the commit. The above examples appear to work. The code does however create ranges from strings like '1..10' and then makes an array out of them. I'm not sure if this is the best way? But it seemed the most appropriate way to allow values that combine integers AND range like expressions such as '1, 5..10'
Any way, it works 












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-03-27 Thread Daniele Sluijters (JIRA)
Title: Message Title










 

 Daniele Sluijters commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










I'm currently working around it in my own code by simply going = range(start, end') which achieves the same thing, an array of all the uids.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-03-27 Thread Chris Portman (JIRA)
Title: Message Title










 

 Chris Portman commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










Nice, simple. Perhaps that should just be 'the way'. How big are the ranges you specify? Im wondering what the impact would be for ranges in the 1000's.
Im pretty keen to also implement this for groups as well. If this gets right, should just be a copy/paste (almost).












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-03-27 Thread Andy Parker (JIRA)
Title: Message Title










 

 Andy Parker commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










When the original change went in there were a lot of questions around the range functionality. We left it like it was because we thought we could just get some feedback on it. Looks like that happened, although it would have been better if we had noticed that it simply didn't work first  Sorry.
Daniele Sluijters, Chris Portman, what do you think about just removing the range functionality (1..2) and instead just pointing people to the range function?












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-03-27 Thread Chris Portman (JIRA)
Title: Message Title










 

 Chris Portman commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










Hi Andy Parker,
I think it would greatly reduce the code complexity. And the code that I submitted basically just munges an array from the '1..4' syntax that looks like [ 1,2,3,4 ] anyway as opposed to an actual range object.
It would also be more consistent with the rest of the DSL (I think) in that I'm not aware of anywhere else you can use the '1..10' type syntax (expecting a range as a result)
Thanks, Chris 












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
You received this message because you are subscribed to the Google 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-03-27 Thread Chris Portman (JIRA)
Title: Message Title










 

 Chris Portman commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










Andy Parker I updated the PR to only use values like:
 1  '1'  '1,2,3'  [ 1, '2' ]
And the documentation for the parameter includes a Hint, directing users to the range function from stdlib.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-03-27 Thread Chris Portman (JIRA)
Title: Message Title










 

 Chris Portman commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










I wonder if it would also be useful to have a complimentary only_uid parameter. My use case will be to nominate a specific range of UIDs that I want completely under puppet control. Probably a range of about 1000 UIDs. Just thinking that it would be more efficient to specify a 1000 element array than array(s) containing All_UIDs - 1000












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 

Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-03-26 Thread Chris Portman (JIRA)
Title: Message Title










 

 Chris Portman commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










I submitted PR https://github.com/puppetlabs/puppet/pull/2479 in an attempt to fix this. I dont have a 3.5.0 RC install to test with though, so im homping someone will be able to assist here.












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-03-26 Thread Chris Portman (JIRA)
Title: Message Title










 

 Chris Portman commented on an issue


















  Re: unless_uid on user is completely broken wrt ranges 










the PR should enable:
unless_uid = 1, unless_uid = '1,2', unless_uid = '3..5', unless_uid = '1,2,3..5', unless_uid = [1, '2', '3..5'],












   

 Add Comment

























 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 







 A PR was merged in PUP-1447 that adds an unless_uid option. However, the implementation is completely broken:   This works:  {noformat}  resources { 'user':  purge = true,  unless_system_user = true,  unless_uid = 2,  }  {noformat}   Broken:  {noformat}  resources { 'user':  purge = true,  ...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2031) unless_uid on user is completely broken wrt ranges

2014-03-25 Thread Daniele Sluijters (JIRA)
Title: Message Title










 

 Daniele Sluijters updated an issue


















 Puppet /  PUP-2031



  unless_uid on user is completely broken wrt ranges 










Change By:

 Daniele Sluijters




Summary:

 unless_uidonuseriscompletelybroken wrtranges












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.