John Hawkes-Reed
2012-Jan-04 11:51 UTC
[Puppet Users] Mildly disconcerting problem with a 2.6.7 client and 2.7.9 master
Hello. In testing a potential upgrade from 2.6.7 -> 2.7.9 I ran across the following ''interesting'' behaviour: The relevant section of manifest (postfixconf::generic) looks like this: file { "/etc/aliases": mode => 444, source => [ "puppet:///modules/postfixconf/$hostname-aliases","puppet:///modules/postfixconf/aliases" ], owner => root, group => root, ensure => file, before => Exec["newaliases"], } ... And the result of a ''puppet agent --test --debug --noop ... is this: notice: /Stage[main]/Postfixconf::Generic/File[/etc/aliases]/ensure: current_value absent, should be directory (noop) info: /Stage[main]/Postfixconf::Generic/File[/etc/aliases]: Scheduling refresh of Exec[newaliases] notice: /Stage[main]/Postfixconf::Generic/Exec[newaliases]: Would have triggered ''refresh'' from 1 events The server is currently running as a simple webrick instance, prior to testing with our existing Nginx/Unicorn setup. Both machines are running Lenny. I imagine it might make more sense to attempt upgrade via 2.6.13 and have that running for a while? I am also probably missing something blindingly obvious... -- John Hawkes-Reed Systems Administrator. Future Publishing. x 2526 -- Future Publishing Limited (registered company number 2008885) is a wholly owned subsidiary of Future plc (registered company number 3757874), both of which are incorporated in England and Wales and share the same registered address at Beauford Court, 30 Monmouth Street, Bath BA1 2BW. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please reply to this email and then delete it. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Future. The recipient should check this email and any attachments for the presence of viruses. Future accepts no liability for any damage caused by any virus transmitted by this email. Future may regularly and randomly monitor outgoing and incoming emails and other telecommunications on its email and telecommunications systems. By replying to this email you give your consent to such monitoring. ***** Save resources: think before you print. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Brice Figureau
2012-Jan-04 16:31 UTC
Re: [Puppet Users] Mildly disconcerting problem with a 2.6.7 client and 2.7.9 master
Hi, On Wed, 2012-01-04 at 11:51 +0000, John Hawkes-Reed wrote:> Hello. > > In testing a potential upgrade from 2.6.7 -> 2.7.9 I ran across the following ''interesting'' behaviour: > > The relevant section of manifest (postfixconf::generic) looks like this: > > file { "/etc/aliases": > mode => 444, > source => [ "puppet:///modules/postfixconf/$hostname-aliases","puppet:///modules/postfixconf/aliases" ],change the first string to: "puppet:///modules/postfixconf/${hostname}-aliases"> owner => root, > group => root, > ensure => file, > before => Exec["newaliases"], > } > > ... And the result of a ''puppet agent --test --debug --noop ... is this: > > notice: /Stage[main]/Postfixconf::Generic/File[/etc/aliases]/ensure: current_value absent, should be directory (noop) > info: /Stage[main]/Postfixconf::Generic/File[/etc/aliases]: Scheduling refresh of Exec[newaliases] > notice: /Stage[main]/Postfixconf::Generic/Exec[newaliases]: Would have triggered ''refresh'' from 1 eventsThe problem is that in 2.7.x ''-'' is a valid character in variable names. So your "postfixconf/$hostname-aliases" string was interpolated to "postfixconf/" which is a directory. This is tracked in bugs: https://projects.puppetlabs.com/issues/10146 https://projects.puppetlabs.com/issues/5268 -- Brice Figureau Follow the latest Puppet Community evolutions on www.planetpuppet.org! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
John Hawkes-Reed
2012-Jan-04 16:40 UTC
Re: [Puppet Users] Mildly disconcerting problem with a 2.6.7 client and 2.7.9 master
On 4 Jan 2012, at 16:31, Brice Figureau wrote:> Hi, > > On Wed, 2012-01-04 at 11:51 +0000, John Hawkes-Reed wrote: >> Hello. >> >> In testing a potential upgrade from 2.6.7 -> 2.7.9 I ran across the following ''interesting'' behaviour: >> >> The relevant section of manifest (postfixconf::generic) looks like this: >> >> file { "/etc/aliases": >> mode => 444, >> source => [ "puppet:///modules/postfixconf/$hostname-aliases","puppet:///modules/postfixconf/aliases" ], > > change the first string to: > "puppet:///modules/postfixconf/${hostname}-aliases" > >> owner => root, >> group => root, >> ensure => file, >> before => Exec["newaliases"], >> } >> >> ... And the result of a ''puppet agent --test --debug --noop ... is this: >> >> notice: /Stage[main]/Postfixconf::Generic/File[/etc/aliases]/ensure: current_value absent, should be directory (noop) >> info: /Stage[main]/Postfixconf::Generic/File[/etc/aliases]: Scheduling refresh of Exec[newaliases] >> notice: /Stage[main]/Postfixconf::Generic/Exec[newaliases]: Would have triggered ''refresh'' from 1 events > > The problem is that in 2.7.x ''-'' is a valid character in variable names. > So your "postfixconf/$hostname-aliases" string was interpolated to > "postfixconf/" which is a directory. > > This is tracked in bugs: > https://projects.puppetlabs.com/issues/10146 > https://projects.puppetlabs.com/issues/5268[FX: Facepalm] Thank you. Apologies for the noise. -- John Hawkes-Reed Systems Administrator. Future Publishing. x 2526 -- Future Publishing Limited (registered company number 2008885) is a wholly owned subsidiary of Future plc (registered company number 3757874), both of which are incorporated in England and Wales and share the same registered address at Beauford Court, 30 Monmouth Street, Bath BA1 2BW. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please reply to this email and then delete it. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Future. The recipient should check this email and any attachments for the presence of viruses. Future accepts no liability for any damage caused by any virus transmitted by this email. Future may regularly and randomly monitor outgoing and incoming emails and other telecommunications on its email and telecommunications systems. By replying to this email you give your consent to such monitoring. ***** Save resources: think before you print. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.