コード例 #1
0
ファイル: ha_router.py プロジェクト: stackhpc/neutron
 def create(self):
     super(HaRouterNamespace, self).create(ipv6_forwarding=False)
     # HA router namespaces should not have ip_nonlocal_bind enabled
     ip_lib.set_ip_nonlocal_bind_for_namespace(self.name, 0)
     # Linux should not automatically assign link-local addr for HA routers
     # They are managed by keepalived
     ip_wrapper = ip_lib.IPWrapper(namespace=self.name)
     cmd = ['sysctl', '-w', 'net.ipv6.conf.all.addr_gen_mode=1']
     ip_wrapper.netns.execute(cmd, privsep_exec=True)
コード例 #2
0
ファイル: dvr_snat_ns.py プロジェクト: AradhanaSingh/neutron
 def create(self):
     super(SnatNamespace, self).create()
     # This might be an HA router namespaces and it should not have
     # ip_nonlocal_bind enabled
     ip_lib.set_ip_nonlocal_bind_for_namespace(self.name)
     # Set nf_conntrack_tcp_loose to 0 to ensure mid-stream
     # TCP conversations aren't taken over by SNAT
     cmd = ['net.netfilter.nf_conntrack_tcp_loose=0']
     ip_lib.sysctl(cmd, namespace=self.name)
コード例 #3
0
 def create(self):
     super(SnatNamespace, self).create()
     # This might be an HA router namespaces and it should not have
     # ip_nonlocal_bind enabled
     ip_lib.set_ip_nonlocal_bind_for_namespace(self.name)
     # Set nf_conntrack_tcp_loose to 0 to ensure mid-stream
     # TCP conversations aren't taken over by SNAT
     cmd = ['net.netfilter.nf_conntrack_tcp_loose=0']
     ip_lib.sysctl(cmd, namespace=self.name)
コード例 #4
0
ファイル: dvr_fip_ns.py プロジェクト: kyjsqd222/neutron
    def create(self):
        LOG.debug("DVR: add fip namespace: %s", self.name)
        # parent class will ensure the namespace exists and turn-on forwarding
        super(FipNamespace, self).create()
        ip_lib.set_ip_nonlocal_bind_for_namespace(self.name, 1,
                                                  root_namespace=True)

        # no connection tracking needed in fip namespace
        self._iptables_manager.ipv4['raw'].add_rule('PREROUTING',
                                                    '-j CT --notrack')
        self._iptables_manager.apply()
コード例 #5
0
 def create(self):
     super(HaRouterNamespace, self).create(ipv6_forwarding=False)
     # HA router namespaces should not have ip_nonlocal_bind enabled
     ip_lib.set_ip_nonlocal_bind_for_namespace(self.name, 0)
コード例 #6
0
ファイル: dvr_snat_ns.py プロジェクト: 2020human/neutron
 def create(self):
     super(SnatNamespace, self).create()
     # This might be an HA router namespaces and it should not have
     # ip_nonlocal_bind enabled
     ip_lib.set_ip_nonlocal_bind_for_namespace(self.name)
コード例 #7
0
ファイル: ha_router.py プロジェクト: AradhanaSingh/neutron
 def create(self):
     super(HaRouterNamespace, self).create()
     # HA router namespaces should not have ip_nonlocal_bind enabled
     ip_lib.set_ip_nonlocal_bind_for_namespace(self.name)
コード例 #8
0
 def create(self):
     super(SnatNamespace, self).create()
     # This might be an HA router namespaces and it should not have
     # ip_nonlocal_bind enabled
     ip_lib.set_ip_nonlocal_bind_for_namespace(self.name)