Comment 0 for bug 1633701

Revision history for this message
tontinme (tontinme-m) wrote : fuel for openstack zabbix plugin

Detailed bug description:
When I try to deploy MOS9.0 with fuel-plugin-external-zabbix(latest version, build by mysels), I met error:

2016-10-14 07:32:25 +0000 Puppet (err): hostinfo is not a hash or array when accessing it with network_roles at /etc/fuel/plugins/zabbix_monitoring-2.5/puppet/manifests/agent.pp:23 on node cmp-01.domain.tld
/usr/lib/ruby/vendor_ruby/puppet/parser/ast/leaf.rb:157:in `evaluate'
/usr/lib/ruby/vendor_ruby/puppet/parser/ast.rb:61:in `safeevaluate'

Steps to reproduce:
1. Download latest version of plugin from master:
https://github.com/openstack/fuel-plugin-external-zabbix.git
2. Build it:
fpb --debug --build fuel-plugin-external-zabbix/
3. Install it with MOS 9.0
4. In MOS, crete an environment, add nodes, set hostname and name for all nodes.
NOTE: modify hostname replace node-XXX(default). Example, I set cmopute-01 with hostname cmp-01, instead of node-18.
+----+---------------+-----------+-------------+----------------------------------------------------------------------------+------------+-------------------+---------+---------------+--------+
| id | name | status | os_platform | roles | ip | mac | cluster | platform_name | online |
+----+---------------+-----------+-------------+----------------------------------------------------------------------------+------------+-------------------+---------+---------------+--------+
| 15 | controller-03 | deploying | ubuntu | [u'controller'] | 10.10.0.54 | 52:54:00:36:7e:de | 2 | None | True |
| 13 | compute-02 | deploying | ubuntu | [u'compute'] | 10.10.0.55 | 52:54:00:ab:cc:6a | 2 | KVM | True |
| 18 | compute-01 | deploying | ubuntu | [u'compute'] | 10.10.0.52 | 52:54:00:27:5b:51 | 2 | KVM | True |
| 16 | controller-01 | deploying | ubuntu | [u'controller'] | 10.10.0.51 | 42:6f:43:5e:3e:8b | 2 | None | True |
| 11 | lma-03 | deploying | ubuntu | [u'infrastructure_alerting', u'elasticsearch_kibana', u'influxdb_grafana'] | 10.10.0.58 | 52:54:00:6c:39:a3 | 2 | None | True |
| 12 | lma-01 | deploying | ubuntu | [u'infrastructure_alerting', u'elasticsearch_kibana', u'influxdb_grafana'] | 10.10.0.56 | 52:54:00:16:4a:d9 | 2 | None | True |
| 14 | controller-02 | deploying | ubuntu | [u'controller'] | 10.10.0.53 | 52:54:00:0c:33:8f | 2 | None | True |
| 17 | lma-02 | deploying | ubuntu | [u'infrastructure_alerting', u'elasticsearch_kibana', u'influxdb_grafana'] | 10.10.0.57 | 52:54:00:05:83:61 | 2 | None | True |
+----+---------------+-----------+-------------+----------------------------------------------------------------------------+------------+-------------------+---------+---------------+--------+

Expected results:
Deploy successfully.

Actual result:
it fails

Reproducability:
always

Workaround:
MOS create /etc/hiera/astute.yaml like:

...
nodes:
   node-18:
      fqdn: cmp-01.domain.tld
      name: cmp-01
...

but in agent.pp, we define hostinfo with:
$hostinfo = $network_metadata['nodes'][$::hostname]

In my environment, $::hostname is cmp-01, not node-18. So agent.pp can not find hostinfo in astute.yaml.