puppet 3.2.4:堆栈层级太深

puppet 3.2.4:堆栈层级太深

我正在为一个大型自定义 Puppet 模块存储库进行重构项目。这包括从 Puppet 2.x 升级到 3.2.4。当我最终达到临界质量并开始测试一些更改时,我很快遇到了以下错误:

Info: Retrieving plugin
Info: Loading facts in /etc/puppet/modules/base/lib/facter/elversion.rb
Info: Loading facts in /etc/puppet/modules/base/lib/facter/site.rb
Info: Loading facts in /var/lib/puppet/lib/facter/elversion.rb
Info: Loading facts in /var/lib/puppet/lib/facter/site.rb
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: stack level too deep at /etc/puppet/manifests/nodes.pp:9 on node puppet
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

在查看了各种 Puppet 错误报告后,我决定尝试简化问题。我将问题缩小到两类,定义如下:

class base::includes { }

class prod_secure::base::includes inherits base::includes { }

仅包含 prod_secure::base::includes 的节点会产生上面列出的错误输出。我看到的唯一可能相关的警告puppet-lint是:

WARNING: class inherits across module namespaces on line 1

...但这只是警告,我认为不应该在代理运行时导致 Puppet 崩溃。有什么想法吗?我设置的命名空间方案是否可能不受 Puppet 支持?

更新

我决定进一步测试,并更改继承类的名称。新定义是:

class prod_secure::base2::includes2 inherits base::includes { }

结果是一样的……stack level too deep在我看来,这个问题与命名空间无关。

更新2

在上一轮调试中我错过了一个显著的细节:

Wed Sep 11 11:25:09 -0400 2013 Puppet (info): Caching node for puppet
Wed Sep 11 11:25:09 -0400 2013 Puppet (debug): importing '/etc/puppet/manifests/nodes.pp' in environment production
Wed Sep 11 11:25:09 -0400 2013 Puppet (debug): importing '/etc/puppet/manifests/config_file.pp' in environment production
Wed Sep 11 11:25:10 -0400 2013 Puppet (debug): importing '/etc/puppet/modules/prod_secure/manifests/base2/includes2.pp' in environment production
Wed Sep 11 11:25:10 -0400 2013 Puppet (debug): Automatically imported prod_secure::base2::includes2 from prod_secure/base2/includes2 into production
Wed Sep 11 11:25:10 -0400 2013 Puppet (debug): importing '/etc/puppet/modules/prod_secure/manifests/base/includes.pp' in environment production
Wed Sep 11 11:25:10 -0400 2013 Puppet (debug): Automatically imported prod_secure::base::includes from prod_secure/base/includes into production
Wed Sep 11 11:25:10 -0400 2013 Puppet (err): stack level too deep at /etc/puppet/manifests/nodes.pp:9 on node puppet
Wrapped exception:
stack level too deep

我不能确定为什么,但它仍在尝试加载 prod_secure::base::includes,而这就是有问题的条目。完全删除该文件后,测试通过了。我又回到了命名空间理论……

答案1

您可能想尝试一下 puppet 3.2.3。

3.2.2 有#21376类似的问题,但它在 3.2.3 中已修复,可能是回归问题

相关内容