Support configuring upstream interface on coordinators
This commit is contained in:
parent
709be9fbba
commit
a3b1445bf1
|
@ -38,6 +38,9 @@
|
|||
# storage_dev: the lower-level network device to bind storage traffic to
|
||||
# storage_dev_ip: the IP address (in CIDR format) of the lower-level network device, used by
|
||||
# Ceph for storage traffic (both monitor and OSD).
|
||||
# upstream_dev: the lower-level network device to bind coordinator upstream traffic to
|
||||
# upstream_dev_ip: the IP address (in CIDR format) of the upstream network device, used by
|
||||
# the system for upstream traffic flow.
|
||||
# ipmi_hostname: the IPMI hostname for fencing (defaults to <shortname>-lom.<domain>)
|
||||
# ipmi_username: username to connect to IPMI
|
||||
# ipmi_password: password to connect to IPMI
|
||||
|
@ -61,6 +64,8 @@ vni_dev = ens4
|
|||
vni_dev_ip = 10.255.0.1/24
|
||||
storage_dev = ens4
|
||||
storage_dev_ip = 10.254.0.1/24
|
||||
upstream_dev = ens2
|
||||
upstream_dev_ip = 10.101.0.31/24
|
||||
ipmi_username = admin
|
||||
ipmi_password = Passw0rd
|
||||
ipmi_hostname = pvc-hv1-lom
|
||||
|
|
|
@ -124,6 +124,8 @@ config_values = [
|
|||
'vni_dev_ip',
|
||||
'storage_dev',
|
||||
'storage_dev_ip',
|
||||
'upstream_dev',
|
||||
'upstream_dev_ip',
|
||||
'ipmi_hostname',
|
||||
'ipmi_username',
|
||||
'ipmi_password'
|
||||
|
@ -389,7 +391,7 @@ else:
|
|||
zkhandler.writedata(zk_conn, { '/primary_node': myhostname })
|
||||
|
||||
###############################################################################
|
||||
# PHASE 6 - Create local IP addresses for VNI and Storage networks
|
||||
# PHASE 6 - Create local IP addresses for static networks
|
||||
###############################################################################
|
||||
|
||||
# VNI configuration
|
||||
|
@ -399,13 +401,21 @@ logger.out('Setting up VNI network on interface {} with IP {}'.format(vni_dev, v
|
|||
common.run_os_command('ip link set {} up'.format(vni_dev))
|
||||
common.run_os_command('ip address add {} dev {}'.format(vni_dev_ip, vni_dev))
|
||||
|
||||
# Storage configurationm
|
||||
# Storage configuration
|
||||
storage_dev = config['storage_dev']
|
||||
storage_dev_ip = config['storage_dev_ip']
|
||||
logger.out('Setting up Storage network on interface {} with IP {}'.format(storage_dev, storage_dev_ip), state='i')
|
||||
common.run_os_command('ip link set {} up'.format(storage_dev))
|
||||
common.run_os_command('ip address add {} dev {}'.format(storage_dev_ip, storage_dev))
|
||||
|
||||
# Upstream configuration
|
||||
if config['daemon_mode'] == 'coordinator':
|
||||
upstream_dev = config['upstream_dev']
|
||||
upstream_dev_ip = config['upstream_dev_ip']
|
||||
logger.out('Setting up Upstream network on interface {} with IP {}'.format(upstream_dev, upstream_dev_ip), state='i')
|
||||
common.run_os_command('ip link set {} up'.format(upstream_dev))
|
||||
common.run_os_command('ip address add {} dev {}'.format(upstream_dev_ip, upstream_dev))
|
||||
|
||||
###############################################################################
|
||||
# PHASE 7a - Ensure Libvirt is running on the local host
|
||||
###############################################################################
|
||||
|
|
|
@ -324,9 +324,11 @@ add rule inet filter input meta iifname {bridgenic} counter drop
|
|||
dhcp_configuration = [
|
||||
'--domain-needed',
|
||||
'--bogus-priv',
|
||||
'--no-resolv',
|
||||
# '--no-resolv',
|
||||
'--no-hosts',
|
||||
'--filterwin2k',
|
||||
'--expand-hosts',
|
||||
'--domain-needed',
|
||||
'--domain={}'.format(self.domain),
|
||||
'--local=/{}/'.format(self.domain),
|
||||
'--auth-zone={}'.format(self.domain),
|
||||
|
@ -337,7 +339,6 @@ add rule inet filter input meta iifname {bridgenic} counter drop
|
|||
'--leasefile-ro',
|
||||
'--dhcp-script=/usr/share/pvc/pvcd/dnsmasq-zookeeper-leases.py',
|
||||
'--dhcp-range={},{},4h'.format(self.dhcp_start, self.dhcp_end),
|
||||
'--dhcp-lease-max=99',
|
||||
'--dhcp-hostsdir={}'.format(self.dnsmasq_hostsdir),
|
||||
'--log-queries=extra',
|
||||
'--log-facility={}/dnsmasq.log'.format(self.config['dnsmasq_log_directory']),
|
||||
|
|
Loading…
Reference in New Issue