Skip to content

Commit

Permalink
Merge pull request redhat-openstack#43 from cwolferh/nic_fix
Browse files Browse the repository at this point in the history
fix what interface we derive values from when setting up a subnet.
  • Loading branch information
jsomara committed Jun 21, 2013
2 parents 723ad93 + f7f1153 commit 232e5f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions bin/foreman_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ echo ":dns_provider: nsupdate" >> /opt/rh/ruby193/root/etc/foreman-proxy/setting

# Set params, and run the db:seed file
cp ./seeds.rb $FOREMAN_DIR/db/.
sed -i "s#SECONDARY_INT#$SECONDARY_INT#" $FOREMAN_DIR/db/seeds.rb
sed -i "s#PRIV_INTERFACE#$PRIVATE_INTERFACE#" $FOREMAN_DIR/db/seeds.rb
sed -i "s#PUB_INTERFACE#$PUBLIC_INTERFACE#" $FOREMAN_DIR/db/seeds.rb
sed -i "s#PRIV_IP#$PRIVATE_CONTROLLER_IP#" $FOREMAN_DIR/db/seeds.rb
Expand Down
8 changes: 6 additions & 2 deletions bin/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
require 'facter'
require 'securerandom'

# for openstack
private_int = 'PRIV_INTERFACE'
public_int = 'PUB_INTERFACE'

# for the sub-network foreman owns
secondary_int = 'SECONDARY_INT'

# Changes from upstream:
# - EPEL removed
# - SELinux enforcing
Expand Down Expand Up @@ -165,8 +169,8 @@

# Subnets - use Import Subnet code
s=Subnet.find_or_create_by_name "OpenStack"
s.network=Facter.send "network_#{private_int}"
s.mask=Facter.send "netmask_#{private_int}"
s.network=Facter.send "network_#{secondary_int}"
s.mask=Facter.send "netmask_#{secondary_int}"
s.dhcp = Feature.find_by_name("DHCP").smart_proxies.first
s.dns = Feature.find_by_name("DNS").smart_proxies.first
s.tftp = Feature.find_by_name("TFTP").smart_proxies.first
Expand Down

0 comments on commit 232e5f8

Please sign in to comment.