Cloud/OpenStack
원본 글 보기

[OpenStack] 네트워크 Linux Bridge agent를 OVS agent로 바꾸기

[OpenStack]

Linuxbridge agent를 OVS agent로 바꾸기

(오픈스택 로드밸런스를 위해)

(컨트롤러 노드)

1)



dnf -y install openstack-neutron-openvswitch libibverbs

2) 설정 파일 변경



vi /etc/neutron/dhcp_agent.ini



[DEFAULT]
			interface_driver = openvswitch
			dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
			enable_isolated_metadata = true



vi /etc/neutron/l3_agent.ini

변경 전

여기에 다음을 수정, 추가.



interface_driver = openvswitch
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true

(2)



vi /etc/neutron/plugins/ml2/ml2_conf.ini

위 부분([ml2])을 다음처럼 수정, 추가.



type_drivers = flat,vlan,gre,vxlan
tenant_network_types =
mechanism_drivers = openvswitch



vi /etc/neutron/plugins/ml2/openvswitch_agent.ini

위 설정 파일 맨 마지막에 다음을 추가.



[securitygroup]
			firewall_driver = openvswitch
			enable_security_group = true
			enable_ipset = true

(4)



vi /etc/nova/nova.conf

[DEFAULT] 섹션에 다음을 추가



			use_neutron = True
			linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver
			firewall_driver = nova.virt.firewall.NoopFirewallDriver



su -s /bin/bash neutron -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head"

시스템들 재시작



systemctl enable openvswitch
systemctl restart openvswitch
	
systemctl restart neutron-server neutron-metadata-agent neutron-openvswitch-agent.service
systemctl restart openstack-nova-api

확인 ::

Open vSwitch agent 추가된 것 확인.

리눅스 브릿지 오픈스택에서 제거 ::



systemctl disable neutron-linuxbridge-agent.service
systemctl stop neutron-linuxbridge-agent.service

이렇게까지하면 지워지긴 하지만,

아래처럼 openstack network agent list 에는 남아있음.

이것도 지워주기 위해 리스트에서 ID를 확인하고,



openstack network agent delete [확인한 ID]

위 명령어 실행 후 다시 리스트 확인해보면

지워진 것 확인!

[2] compute 노드

컴퓨트 노드에서 작업.



dnf -y install openstack-neutron-openvswitch openstack-neutron-ml2



vi /etc/neutron/neutron.conf

[DEFAULT] 섹션에 다음을 추가.



core_plugin = ml2
service_plugins = router
state_path = /var/lib/neutron
allow_overlapping_ips = True



vi /etc/neutron/plugins/ml2/ml2_conf.ini

맨 마지막 줄에 추가



[ml2]
			type_drivers = flat,vlan,gre,vxlan
			tenant_network_types = vxlan

[ml2_type_flat]		
			flat_networks = provider

[ml2_type_vxlan]
			vni_ranges = 1:1000
[securitygroup]
			firewall_driver = openvswitch
			enable_security_group = true
			enable_ipset = true



vi /etc/neutron/plugins/ml2/openvswitch_agent.ini

마지막 줄에 추가.



[agent]
			tunnel_types = vxlan
			prevent_arp_spoofing = True

[ovs]
			local_ip = [컴퓨트 노드 IP]
[securitygroup]
			firewall_driver = openvswitch
			enable_security_group = true
			enable_ipset = true



vi /etc/nova/nova.conf

[DEFAULT] 섹션에 추가



use_neutron = True
linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver

서비스 시작



systemctl enable openvswitch
systemctl restart openvswitch
	
systemctl enable neutron-openvswitch-agent
systemctl restart neutron-openvswitch-agent
systemctl restart openstack-nova-compute

Linux bridge agent의 ID 확인.

리눅스 브릿지 오픈스택에서 제거 하는 법

(제거해도 다시 살아나는 경우)

*** 컴퓨트에서도



	systemctl disable neutron-linuxbridge-agent.service
	systemctl stop neutron-linuxbridge-agent.service
	
	openstack network agent list 명령어로 ID를 확인하고

	openstack network agent delete [확인한 ID]

다음을 해 주어야 다시 안살아남 !!