Error: Could not run: Interpolation for ipaddress_eth0 failed

Bug #1260787 reported by Britt Houser
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cisco Openstack
Fix Released
Low
Mark T. Voelker
Havana
Fix Released
Low
Mark T. Voelker

Bug Description

I'm running the H.0 install.sh. My topology is odd in that eth2 is
the management (aka default) interface and eth0/eth1 are the public (aka
external) interface. Therefore eth0/eth1 don't have ip addresses of their
own; they are merely awaiting addition to the br-ex bridge. I tried the
installer three different ways:

#Variation #1 which should work on our setup
export default_interface="${default_interface:-eth2}"
export external_interface="${external_interface:-eth0}"

#Variation #2 which should work on our setup
export default_interface="${default_interface:-eth2}"
export external_interface="${external_interface:-eth1}"

#Default, but obviously invalid for our setup
export default_interface="${default_interface:-eth0}"
export external_interface="${external_interface:-eth1}"

In all three instances, the install errors out here:

--
Debug: importing '/usr/share/puppet/modules/apache/manifests/vhost.pp' in environment production
Debug: Automatically imported apache::vhost from apache/vhost into production
Debug: Scope(Class[Apache::Mod::Proxy]): Retrieving template apache/mod/proxy.conf.erb
Debug: template[/usr/share/puppet/modules/apache/templates/mod/proxy.conf.erb]: Bound template variables for /usr/share/puppet/modules/apache/templates/mod/proxy.conf.erb in 0.00 seconds
Debug: template[/usr/share/puppet/modules/apache/templates/mod/proxy.conf.erb]: Interpolated template /usr/share/puppet/modules/apache/templates/mod/proxy.conf.erb in 0.00 seconds
Error: Could not run: Interpolation for ipaddress_eth0 failed
--

I did a little grepping and found the following files which contain the ipaddress_eth0 variable:

$ grep -cR ipaddress_eth0 /usr/share/puppet/modules/ | grep -v :0
/usr/share/puppet/modules/stdlib/spec/unit/puppet/parser/functions/has_ip_address_spec.rb:1
/usr/share/puppet/modules/stdlib/spec/unit/puppet/parser/functions/has_interface_with_spec.rb:1
/usr/share/puppet/modules/openstack-ha/tests/cloudcontroller.pp:1
/usr/share/puppet/modules/openstack-ha/examples/core.pp:3
/usr/share/puppet/modules/swift/tests/site.pp:2
/usr/share/puppet/modules/swift/README.md:7
/usr/share/puppet/modules/openstack/tests/cloudcontroller.pp:1
/usr/share/puppet/modules/openstack/tests/all.pp:1
/usr/share/puppet/modules/openstack/tests/site.pp:2
/usr/share/puppet/modules/openstack/README.md:1
/usr/share/puppet/modules/openstack/manifests/swift/proxy.pp:2
/usr/share/puppet/modules/openstack/manifests/swift/storage-node.pp:1
/usr/share/puppet/modules/openstack/spec/classes/openstack_swift_storage-node.rb:1

Revision history for this message
Britt Houser (britthouser) wrote :

More troubleshooting led to:

# grep -ri ipaddress_eth0 /etc/puppet/data
/etc/puppet/data/hiera_data/user.common.yaml:#cobbler::ip: "%{ipaddress_eth0}"
/etc/puppet/data/hiera_data/user.full_ha.yaml:swift_proxy_net_ip: "%{ipaddress_eth0}"
/etc/puppet/data/hiera_data/user.full_ha.yaml:swift_local_net_ip: "%{ipaddress_eth0_222}"
/etc/puppet/data/hiera_data/user.full_ha.yaml:nova::compute::vncserver_proxyclient_address: "%{ipaddress_eth0}"
/etc/puppet/data/hiera_data/user.full_ha.yaml:bind_address: "%{ipaddress_eth0}"
/etc/puppet/data/hiera_data/user.full_ha.yaml:cinder::volume::iscsi::iscsi_ip_address: "%{ipaddress_eth0}"
/etc/puppet/data/hiera_data/vendor/cisco_coi_user.common.yaml:cobbler::ip: "%{ipaddress_eth0}"

I'm not doing an HA install, so I think the error must be coming from cisco_coi_user.common.yaml.

Revision history for this message
Chip (cbaesema) wrote :

This can be changed prior to running the installer at

puppet_openstack_builder/data/hiera_data/vendor/cisco_coi_user.common.yaml

Revision history for this message
Britt Houser (britthouser) wrote :

I like the customizability, but I think 90% of the time this will be set to the same interface configured as default_interface in install.sh. Is there a way to make the default value in this file $default_interface?

Revision history for this message
rakshith (rhp-4) wrote :

i have work around for this. This error is seen if your public interface is not eth0

step 1: edit /etc/udev/rules.d/70-persistent-net-rules.d
             change eth which you are using to eth0

step 2: Edit /etc/network/interfaces
             change existing eth to eth0 so that it will get an ip.

Step 3: reboot your machine

This will solve this problem

note: This is just a work around , not a fix

Revision history for this message
Mark T. Voelker (mvoelker) wrote :

I don't think there is a simple way to set it equivalent to $default_interface (since that's not a fact/exported resource). However what we could do is change it from:

cobbler::ip: "%{ipaddress_eth0}"

to:

cobbler::ip: "%{ipaddress}"

That would set it to the first IP address on the box. That may not always be right either, but it's more likely to be right than assuming that eth0 has an IP on it, IMHO.

And then we should also document how to change it obviously.

Revision history for this message
Mark T. Voelker (mvoelker) wrote :
Changed in openstack-cisco:
assignee: nobody → Mark T. Voelker (mvoelker)
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Britt Houser (britthouser) wrote :

I tested that and it did work on my setup too.

Changed in openstack-cisco:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.