Jira (PUP-2735) unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters

2016-04-13 Thread Sean Griffin (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Sean Griffin updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-2735 
 
 
 
  unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters  
 
 
 
 
 
 
 
 
 

Change By:
 
 Sean Griffin 
 
 
 

QA Risk Assessment:
 
 Low 
 
 
 

QA Status:
 
 Reviewed 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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-2735) unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters

2015-01-19 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-2735 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters  
 
 
 
 
 
 
 
 
 
 
Any luck with running your example with --parser=future on the master? or comments on my last comment above? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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-2735) unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters

2015-01-15 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg updated an issue 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 Puppet /  PUP-2735 
 
 
 
  unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Scrum Team:
 
 Language 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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-2735) unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters

2014-06-30 Thread Andreas Papst (JIRA)
Title: Message Title










 

 Andreas Papst commented on an issue


















  Re: unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters 










Hi Henrik,
adding the option you mentioned (puppet agent -t --parser future) doesn't change anything. But this seems not to be a big surprise, due to template command is extrapolated at the puppet master but not at the agent side.
Recall: Default for parameter $foobar = 0
 node.yaml: — classes:


test


= /tmp/test: foobar foobar == '0'  node.yaml: — classes:


test test::foobar:


= /tmp/test: foobar foobar == '0'  node.yaml: — classes:


test test::foobar: 0


= /tmp/test: foobar foobar == 0  node.yaml: — classes:


test test::foobar: '0'


= /tmp/test: foobar foobar == '0'  node.yaml: — classes:


test test::foobar: true


= /tmp/test: foobar foobar == true  node.yaml: — classes:


test test::foobar: false


= /tmp/test: empty  node.yaml: — classes:


test test::foobar: 1


= /tmp/test: foobar 
Hope this is something useful to you Andreas
puppet -V 3.6.2 cat /etc/debian_version 7.3 dpkg -l | grep puppet ii facter 2.0.2-1puppetlabs1 amd64 Ruby module for collecting simple facts about a host operating system ii hiera 1.3.4-1puppetlabs1 all A simple pluggable Hierarchical Database. ii puppet 3.6.2-1puppetlabs1 all Centralized configuration management - agent startup and compatibility scripts ii 

Jira (PUP-2735) unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters

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










 

 Henrik Lindberg commented on an issue


















  Re: unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters 










That is inconclusive, you need to run with either puppet apply --parser future, or have the setting parser = future in your settings for the master. Setting --parser future on the agent does not have any effect since it is not doing parsing/evaluation.
In Puppet 3x manifests, unquoted and quoted numbers (e.g. 123 and '123') are equivalent. In 3x there is no way to enter a literal numeric value in a .pp manifest. You can force it to produce a numeric value by evaluating an _expression_; e.g. $foobar = 1-1 to produce a numeric 0 (yeah, I know it is ridiculous). Alternatively, enter a string in your hiera yaml instead of a number by quoting it (i.e. '0' instead of 0).












   

 Add Comment

























 Puppet /  PUP-2735



  unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters 







 I'm not sure, if this should be considered as an error. At least it should be stressed in the documentation:   0 (a digit) used as default value of a class parameter is converted into a string or character when the variable is interpreted in a template by Ruby.  On the other hand, 0 entered as a value in an hiera-yaml file is interpreted as an integer va...















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




Jira (PUP-2735) unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters

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










 

 Henrik Lindberg commented on an issue


















  Re: unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters 










This works as intended. Puppet 3x does not have a numeric type - all numbers are strings. When numeric data is passed it is (typically not transformed, but it may be in some situations). This is a source of great pain. In Puppet 4.0, there is a difference between numeric values and strings - this can be tested using the --parser future option. 
I would very much appreciate if you could try your scenario with --parser future turned on and report how that works.












   

 Add Comment

























 Puppet /  PUP-2735



  unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters 







 I'm not sure, if this should be considered as an error. At least it should be stressed in the documentation:   0 (a digit) used as default value of a class parameter is converted into a string or character when the variable is interpreted in a template by Ruby.  On the other hand, 0 entered as a value in an hiera-yaml file is interpreted as an integer va...















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




 




  

Jira (PUP-2735) unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters

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










 

 Henrik Lindberg updated an issue


















 Puppet /  PUP-2735



  unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters 










Change By:

 Henrik Lindberg




Assignee:

 AndreasPapst












   

 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-2735) unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters

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










 

 Henrik Lindberg updated an issue


















 Puppet /  PUP-2735



  unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters 










Change By:

 Henrik Lindberg




Component/s:

 DSL












   

 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-2735) unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters

2014-06-06 Thread Andreas Papst (JIRA)
Title: Message Title










 

 Andreas Papst created an issue


















 Puppet /  PUP-2735



  unexpected different behaviour of 0 (integer vs. string) as a value in Hiera and as a default value for class parameters 










Issue Type:

  Bug




Affects Versions:


 3.6.1




Assignee:


 Unassigned




Created:


 06/Jun/14 4:34 AM




Environment:


$ facter | grep oper operatingsystem = Debian operatingsystemmajrelease = 7 operatingsystemrelease = 7.5
$ puppet -V 3.6.1
$ dpkg -l | grep puppet ii facter 2.0.1-1puppetlabs1 amd64 Ruby module for collecting simple facts about a host operating system ii hiera 1.3.3-1puppetlabs1 all A simple pluggable Hierarchical Database. ii puppet 3.6.1-1puppetlabs1 all Centralized configuration management - agent startup and compatibility scripts ii puppet-common 3.6.1-1puppetlabs1 all Centralized configuration management ii puppet-lint 0.1.13-2 all check puppet manifests for style guide conformity ii puppetdb 2.0.0-1puppetlabs1 all PuppetDB Centralized Storage. ii puppetdb-terminus 2.0.0-1puppetlabs1 all Connect Puppet to PuppetDB by setting up a terminus for PuppetDB. ii puppetlabs-release 1.0-7 all Package to install Puppet Labs gpg key and apt repo ii puppetmaster 3.6.1-1puppetlabs1 all Centralized configuration management - master startup and compatibility scripts ii puppetmaster-common 3.6.1-1puppetlabs1 all Puppet master common scripts ii puppetmaster-passenger 3.6.1-1puppetlabs1 all Centralised configuration management - master setup to run under mod passenger ii ruby-rgen 0.6.5-1puppetlabs1 all A framework supporting Model Driven Software Development (MDSD) ii vim-puppet 3.6.1-1puppetlabs1 all syntax highlighting for puppet manifests in vim




Priority:

  Normal




Reporter:

 Andreas Papst