IT/Openstack

[Openstack - Train] Centos에 설치하기(6) - Neutron

louky 2019. 11. 5. 16:05
반응형

Openstack내  가상 네트워크를 설정하는 단계이다. 

 

  • DB_USER="root"
  • DB_PASSWD="root.123"

 

A) Controller node에서 설정

A-1) DB생성 및 권한 설정

## DB 생성 전 확인
[root@controller ~]# mysql -u${DB_USER} -p${DB_PASSWD} -e "show databases;"
+--------------------+
| Database           |
+--------------------+
| glance             |
| information_schema |
| keystone           |
| mysql              |
| nova               |
| nova_api           |
| nova_cell0         |
| performance_schema |
| placement          |
+--------------------+

## DB 생성
[root@controller ~]# mysql -u${DB_USER} -p${DB_PASSWD} -e "CREATE DATABASE neutron;"


## DB 생성 후 확인
[root@controller ~]# mysql -u${DB_USER} -p${DB_PASSWD} -e "show databases;"
+--------------------+
| Database           |
+--------------------+
| glance             |
| information_schema |
| keystone           |
| mysql              |
| neutron            |
| nova               |
| nova_api           |
| nova_cell0         |
| performance_schema |
| placement          |
+--------------------+

 

DB내 권한 설정 및 확인 

## DB권한 확인
[root@controller ~]# mysql -u${DB_USER} -p${DB_PASSWD} mysql -e "select Host,User,PASSWORD from user where User='neutron';"

## DB 권한 설정
[root@controller ~]# mysql -u${DB_USER} -p${DB_PASSWD} -e "GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'neutron.123';"
[root@controller ~]# mysql -u${DB_USER} -p${DB_PASSWD} -e "GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'neutron.123';"


## DB 권한 반영
[root@controller ~]# mysql -u${DB_USER} -p${DB_PASSWD} -e "Flush Privileges;"


## DB 권한 설정 확인
[root@controller ~]# mysql -u${DB_USER} -p${DB_PASSWD} mysql -e "select Host,User,PASSWORD from user where User='neutron';"
+-----------+---------+-------------------------------------------+
| Host      | User    | PASSWORD                                  |
+-----------+---------+-------------------------------------------+
| localhost | neutron | *924B7855B76848790604F4372CF29A234F311234 |
| %         | neutron | *924B7855B76848790604F4372CF29A234F311234 |
+-----------+---------+-------------------------------------------+

 

A-2) Service User 생성 및 Role 권한 설정

## Openstack Admin 환경변수 로딩
[root@controller ~]# source /root/admin-openrc


## Service user 생성
[root@controller ~] (admin-openrc):~# openstack user create --domain default --password neutron.123 neutron
+---------------------+----------------------------------+
| Field               | Value                            |
+---------------------+----------------------------------+
| domain_id           | default                          |
| enabled             | True                             |
| id                  | 0554834d58a645bd922aabad9735f39e |
| name                | neutron                          |
| options             | {}                               |
| password_expires_at | None                             |
+---------------------+----------------------------------+


## Role 권한 설정 (아무런 출력이 없다)
[root@controller ~] (admin-openrc):~# openstack role add --project service --user neutron admin

A-3) Service 생성

## Service 생성
[root@controller ~] (admin-openrc):~# openstack service create --name neutron --description "OpenStack Networking" network
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Networking             |
| enabled     | True                             |
| id          | 40f405efa5054cac9b42bbcb6f0392a3 |
| name        | neutron                          |
| type        | network                          |
+-------------+----------------------------------+

A-4) Endpoint 생성

## Endpoint 생성
[root@controller ~] (admin-openrc):~# openstack endpoint create --region RegionOne network public http://controller:9696
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 585fcf96e8e54f3080a2f5ea4070ea3e |
| interface    | public                           |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 40f405efa5054cac9b42bbcb6f0392a3 |
| service_name | neutron                          |
| service_type | network                          |
| url          | http://controller:9696           |
+--------------+----------------------------------+

[root@controller ~] (admin-openrc):~# openstack endpoint create --region RegionOne network internal http://controller:9696
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | 5809279785b94c9c9a61ec5659da5ee0 |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 40f405efa5054cac9b42bbcb6f0392a3 |
| service_name | neutron                          |
| service_type | network                          |
| url          | http://controller:9696           |
+--------------+----------------------------------+

[root@controller ~] (admin-openrc):~# openstack endpoint create --region RegionOne network internal http://controller:9696
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| enabled      | True                             |
| id           | cbd3943f7d07407c8707b95cc61408ed |
| interface    | internal                         |
| region       | RegionOne                        |
| region_id    | RegionOne                        |
| service_id   | 40f405efa5054cac9b42bbcb6f0392a3 |
| service_name | neutron                          |
| service_type | network                          |
| url          | http://controller:9696           |
+--------------+----------------------------------+

A-5) 네트워크 타입 선택

Openstack에서 네트워크 타입이라면 Provider net과 Self-service net으로 크게 구분할 수 있다. 

간단히 설명을 하자면 Provider net는 외부랑 연결되는 네트워크이며, 각각의 서비스 계정(프로젝트)별로 별도의 네트워크를 가질수 없는 네트워크이며, Self-Service 네트워크는 각각의 서비스 계정별로 네트워크를 생성할 수 있는 네트워크이다.

Self-service  네트워크의 경우 Provider Network를 포함하고 있기에 가급적이면 Self-service network로 설치하기를 권장한다. 

 

 

 

A-6) PKG 설치 

여기서는   Self-service network를 설치를 진행한다. 

[root@controller ~]# yum install -y openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables

A-7) config파일 백업 

 

A-7-1) /etc/neutron/neutron.conf

##원본파일 퍼미션 확인 
[root@controller ~]# ls -al /etc/neutron/neutron.conf
-rw-r----- 1 root neutron 39154 10월 16 23:10 /etc/neutron/neutron.conf

## 파일명 변경
[root@controller ~]# mv /etc/neutron/neutron.conf /etc/neutron/neutron.conf.orig

## 주석과 공백라인을 제외하고 config파일로 생성
[root@controller ~]# cat /etc/neutron/neutron.conf.orig | grep -Ev "^#|^$" | sed -e "s/\[/\n\[/g" > /etc/neutron/neutron.conf

## 이전과 동일한 퍼미션 설정
[root@controller ~]# chown root.neutron /etc/neutron/neutron.conf
[root@controller ~]# chmod 640 /etc/neutron/neutron.conf

A-7-2) /etc/neutron/plugins/ml2/ml2_conf.ini

## 원본파일 퍼미션 확인 
[root@controller ~]# ls -al /etc/neutron/plugins/ml2/ml2_conf.ini
-rw-r----- 1 root neutron 6524 10월 16 23:10 /etc/neutron/plugins/ml2/ml2_conf.ini

## 원본파일 이름 변경
[root@controller ~]# mv /etc/neutron/plugins/ml2/ml2_conf.ini  /etc/neutron/plugins/ml2/ml2_conf.ini.orig

##주석과 공백 라인 제거 후 config 파일로 리다이렉션
[root@controller ~]# cat /etc/neutron/plugins/ml2/ml2_conf.ini.orig | grep -Ev "^#|^$" | sed -e "s/\[/\n\[/g" > /etc/neutron/plugins/ml2/ml2_conf.ini

##이전파일과 동일 퍼미션 설정
[root@controller ~]# chown root.neutron /etc/neutron/plugins/ml2/ml2_conf.ini
[root@controller ~]# chmod 640 /etc/neutron/plugins/ml2/ml2_conf.ini

 

A-7-3) /etc/neutron/plugins/ml2/linuxbridge_agent.ini

## 원본파일의 퍼미션 확인 
[root@controller ~]# ls -al  /etc/neutron/plugins/ml2/linuxbridge_agent.ini
-rw-r----- 1 root neutron 6524 10월 16 23:10 /etc/neutron/plugins/ml2/linuxbridge_agent.ini

## 파일명 변경
[root@controller ~]# mv  /etc/neutron/plugins/ml2/linuxbridge_agent.ini   /etc/neutron/plugins/ml2/linuxbridge_agent.ini.orig

## 주석과 공백라인을 제외하고 파일로 리다이렉션
[root@controller ~]# cat  /etc/neutron/plugins/ml2/linuxbridge_agent.ini.orig | grep -Ev "^#|^$" | sed -e "s/\[/\n\[/g" > /etc/neutron/plugins/ml2/linuxbridge_agent.ini

## 이전과 동을 퍼미션으로 설정
[root@controller ~]# chown root.neutron /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[root@controller ~]# chmod 640 /etc/neutron/plugins/ml2/linuxbridge_agent.ini

 

 

A-7-4) /etc/neutron/l3_agent.ini

## 원본파일 퍼미션 확인
[root@controller ~]# ls -al /etc/neutron/l3_agent.ini
-rw-r----- 1 root neutron 6524 10월 16 23:10 /etc/neutron/l3_agent.ini

## 파일명 변경
[root@controller ~]# mv /etc/neutron/l3_agent.ini /etc/neutron/l3_agent.ini.orig


## 주석과 공백라인 제거
[root@controller ~]# cat /etc/neutron/l3_agent.ini.orig | grep -Ev "^#|^$" | sed -e "s/\[/\n\[/g" > /etc/neutron/l3_agent.ini

## 이전 퍼미션으로 설정
[root@controller ~]# chown root.neutron /etc/neutron/l3_agent.ini
[root@controller ~]# chmod 640 /etc/neutron/l3_agent.ini

 

A-7-5) /etc/neutron/dhcp_agent.ini

## 원본파일 퍼미션 확인
[root@controller ~]# ls -al /etc/neutron/dhcp_agent.ini
-rw-r----- 1 root neutron 6524 10월 16 23:10 /etc/neutron/dhcp_agent.ini

## 파일명 변경
[root@controller ~]# mv /etc/neutron/dhcp_agent.ini /etc/neutron/dhcp_agent.ini.orig

## 공백 및 주석 제거
[root@controller ~]# cat /etc/neutron/dhcp_agent.ini.orig  | grep -Ev "^#|^$" | sed -e "s/\[/\n\[/g" >/etc/neutron/dhcp_agent.ini

## 이전 퍼미션으로 설정
[root@controller~]# chown root.neutron /etc/neutron/dhcp_agent.ini
[root@controller ~]# chmod 640 /etc/neutron/dhcp_agent.ini

A-7-6) /etc/neutron/metadata_agent.ini

[root@controller ~]# ls -al /etc/neutron/metadata_agent.ini
-rw-r----- 1 root neutron 9873 10월 16 23:10 /etc/neutron/metadata_agent.ini


[root@controller ~]# mv /etc/neutron/metadata_agent.ini /etc/neutron/metadata_agent.ini.orig

[root@controller ~]# cat /etc/neutron/metadata_agent.ini.orig  | grep -Ev "^#|^$" | sed -e "s/^\[/\n\[/g"  > /etc/neutron/metadata_agent.ini

[root@controller ~]# chown root.neutron /etc/neutron/metadata_agent.ini
[root@controller ~]# chmod 640 /etc/neutron/metadata_agent.ini

 

 

 

A-8) config 수정 

 

A-8-1) /etc/neutron/neutron.conf 

[root@controller ~]# cat  /etc/neutron/neutron.conf 
[DEFAULT]
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = true
transport_url = rabbit://openstack:rabbitmq.123@controller
auth_strategy = keystone
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true

[cors]

[database]
connection = mysql+pymysql://neutron:neutron.123@controller/neutron

[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron.123

[nova]
auth_url = http://controller:5000
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = nova.123

[oslo_concurrency]
lock_path = /var/lib/neutron/tmp

[oslo_messaging_amqp]

[oslo_messaging_kafka]

[oslo_messaging_notifications]

[oslo_messaging_rabbit]

[oslo_middleware]

[oslo_policy]

[privsep]

[ssl]

 

A-8-2)  /etc/neutron/neutron.conf/etc/neutron/plugins/ml2/ml2_conf.ini

[root@controller ~]# cat /etc/neutron/plugins/ml2/ml2_conf.ini

[DEFAULT]

[ML2]
type_drivers = flat,vlan,vxlan
tenant_network_types = vxlan
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security

[ml2_type_flat]
flat_networks = provider

[ml2_type_vxlan]
vni_ranges = 1:1000

[securitygroup]
enable_ipset = true

 

A-8-3)  /etc/neutron/neutron.conf/etc/neutron/plugins/ml2/linuxbridge_agent.ini

[root@controller ~]# cat /etc/neutron/plugins/ml2/linuxbridge_agent.ini

[DEFAULT]


[linux_bridge]
physical_interface_mappings = provider:em2   ## Controller MGMT Interface

[vxlan]
enable_vxlan = true
local_ip = Controller_MGMT_IP_ADDR   ## Controller node MGMT IP addr
l2_population = true

[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

 

아래 Kernel parameter가 1인지 확인한다. 
  • net.bridge.bridge-nf-call-ip6tables = 1
  • net.bridge.bridge-nf-call-iptables = 1

위의 Kernel  Parameter가 안보일 경우 아래를 확인한다. 

더보기

만약 sysctl 에서 해당 Kernel  parameter 목록이 안보인 경우 아래와 같이 확인한다. 

[root@controller ~]# lsmod | grep "br_netfilter"
br_netfilter           22256  0
bridge                151336  1 br_netfilter 

출력이 안된다면 모듈이 탑재되지 않은것이므로 다음과 같이 모듈을 탑재 한다. 

[root@controller ~]# modprobe br_netfilter

만약 sysctl 에서 해당 Kernel  parameter 목록이 안보인 경우 아래와 같이 확인한다. 

[root@controller ~]# lsmod | grep "br_netfilter"
br_netfilter           22256  0
bridge                151336  1 br_netfilter 

 

출력이 안된다면 모듈이 탑재되지 않은것이므로 다음과 같이 모듈을 탑재 한다. 

[root@controller ~]# modprobe br_netfilter

 

 

A-8-4) /etc/neutron/l3_agent.ini

[root@controller ~]# cat /etc/neutron/l3_agent.ini
[DEFAULT]
interface_driver = linuxbridge

 

A-8-5) /etc/neutron/dhcp_agent.ini

[root@controller ~]# cat /etc/neutron/dhcp_agent.ini

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

 

A-8-6) /etc/neutron/metadata_agent.ini

[root@controller ~]# cat /etc/neutron/metadata_agent.ini
[DEFAULT]
nova_metadata_host = controller
metadata_proxy_shared_secret = meta.123

[cache]

 

A-8-7)  /etc/nova/nova.conf

 

 /etc/nova/nova.conf 파일에 neutron config 를 추가 한다.

## 혹시 모를 불상사를 대비하여 Neutron 정보 추가하기전에 백업을 한다. 
[root@controller ~]# cp  /etc/nova/nova.conf   /etc/nova/nova.conf.neutron_before

 

[root@controller ~]# vi /etc/nova/nova.conf
~(생략)

[neutron]
auth_url = http://controller:5000
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron.123
service_metadata_proxy = true
metadata_proxy_shared_secret = meta.123

~(이하 생략)

 

A-9) 링크 설정

## 소프트링크 설정 
[root@controller ~]# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini

## 링크 설정 확인
[root@controller ~]# ls -al /etc/neutron/plugin.ini
lrwxrwxrwx 1 root root 37 11월  5 18:02 /etc/neutron/plugin.ini -> /etc/neutron/plugins/ml2/ml2_conf.ini

 

A-10) Neutron DB내 table생성 

[root@controller ~]# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
>   --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
  neutron에 대한 upgrade 실행 중...
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade  -> kilo
INFO  [alembic.runtime.migration] Running upgrade kilo -> 354db87e3225
INFO  [alembic.runtime.migration] Running upgrade 354db87e3225 -> 599c6a226151

~(중간 생략)

INFO  [alembic.runtime.migration] Running upgrade b12a3ef66e62 -> 97c25b0d2353
INFO  [alembic.runtime.migration] Running upgrade 97c25b0d2353 -> 2e0d7a8a1586
INFO  [alembic.runtime.migration] Running upgrade 2e0d7a8a1586 -> 5c85685d616d
  OK

 

Table생성 후 확인

[root@ibcontroller ~]# mysql -uneutron -pneutron.123 neutron -e " show tables;"
+-----------------------------------------+
| Tables_in_neutron                       |
+-----------------------------------------+
| address_scopes                          |
| agents                                  |
| alembic_version                         |
| allowedaddresspairs                     |
| arista_provisioned_nets                 |
| arista_provisioned_tenants              |
| arista_provisioned_vms                  |
| auto_allocated_topologies               |
| bgp_peers                               |
| bgp_speaker_dragent_bindings            |
| bgp_speaker_network_bindings            |

~(생략)

| vcns_router_bindings                    |
| vips                                    |
| vpnservices                             |
+-----------------------------------------+

 

A-11) Daemon 재시작

Provider network로 설치를 하였다면 "neutron-l3-agent.service" 제외한다. 

## Nova-api 재시작
systemctl restart openstack-nova-api.service

## 시스템 재부팅시 자동실행 설정
systemctl enable neutron-server.service \
  neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
  neutron-metadata-agent.service neutron-l3-agent.service

## Neutron daemon 시작
systemctl start neutron-server.service \
  neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
  neutron-metadata-agent.service neutron-l3-agent.service

## Daemon 상태 확인
systemctl status neutron-server.service \
  neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
  neutron-metadata-agent.service neutron-l3-agent.service

 

 

B) Compute node에서 설정 

B-1) PKG 설치

[root@compute01 ~]#  yum install openstack-neutron-linuxbridge ebtables ipset -y

B-2) config 백업

B-2-1) /etc/neutron/neutron.conf

##원본 퍼미션 확인
[root@compute01 ~]# ls -al /etc/neutron/neutron.conf
-rw-r----- 1 root neutron 39154 10월 16 23:10 /etc/neutron/neutron.conf

## 파일명 변경
[root@compute01 ~]# mv /etc/neutron/neutron.conf /etc/neutron/neutron.conf.orig

## 공백라인 과 주석 제거
[root@compute01 ~]# cat /etc/neutron/neutron.conf.orig | grep -Ev "^#|^$" | sed -e "s/^\[/\n\[/g" > /etc/neutron/neutron.conf


## 이전과 동일 퍼미션 설정
[root@compute01 ~]# chown root.neutron /etc/neutron/neutron.conf
[root@compute01 ~]# chmod 640 /etc/neutron/neutron.conf

B-2-2)  /etc/neutron/plugins/ml2/linuxbridge_agent.ini

##원본 퍼미션 확인
[root@compute01 ~]# ls -al  /etc/neutron/plugins/ml2/linuxbridge_agent.ini
-rw-r----- 1 root neutron 6524 10월 16 23:10 /etc/neutron/plugins/ml2/linuxbridge_agent.ini


## 파일명 변경
[root@compute01 ~]# mv  /etc/neutron/plugins/ml2/linuxbridge_agent.ini   /etc/neutron/plugins/ml2/linuxbridge_agent.ini.orig


## 공백라인 과 주석 제거
[root@compute01 ~]# cat  /etc/neutron/plugins/ml2/linuxbridge_agent.ini.orig | grep -Ev "^#|^$" | sed -e "s/^\[/\n\[/g" > /etc/neutron/plugins/ml2/linuxbridge_agent.ini


## 이전과 동일 퍼미션 설정
[root@compute01 ~]# chown root.neutron /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[root@compute01 ~]# chmod 640 /etc/neutron/plugins/ml2/linuxbridge_agent.ini

 

 

B-3) config 수정

B-3-1) /etc/neutron/neutron.conf

[root@compute01 ~]# cat /etc/neutron/neutron.conf 
[DEFAULT]
transport_url = rabbit://openstack:rabbitmq.123@controller
auth_strategy = keystone

[cors]

[database]

[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron.123


[oslo_concurrency]
lock_path = /var/lib/neutron/tmp

[oslo_messaging_amqp]

[oslo_messaging_kafka]

[oslo_messaging_notifications]

[oslo_messaging_rabbit]

[oslo_middleware]

[oslo_policy]

[privsep]

[ssl]

B-3-2)  /etc/neutron/plugins/ml2/linuxbridge_agent.ini

[root@compute01 ~]# cat /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[DEFAULT]

[linux_bridge]
physical_interface_mappings = provider:em2

[vxlan]
enable_vxlan = true
local_ip = ##COMPUTE_NODE_MGMT_IP_ADDR
l2_population = true

[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

 

B-3-3) kernel parameter 확인 및 변경

[root@compute01 ~]# lsmod | grep br_netfilter   ##필요한 모듈이 적재되어있는지 확인한다.

[root@compute01 ~]# modprobe br_netfilter      ## 상기와 같이 아무런 출력이 없을 경우 로딩한다. 
[root@compute01 ~]# lsmod | grep br_netfilter  ## 로딩이 되었는지 확인한다. 
br_netfilter           22256  0
bridge                151336  1 br_netfilter

 

 kernel parameter 값이 1이 아닐 경우 1로 수정한다. 

[root@compute01 ~]# sysctl -a | grep "net.bridge.bridge-nf-call-ip"
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1

 

B-4) /etc/nova/nova.conf 를 수정한다. 

 

수정하기전에 이전 파일을 백업한다. 

[root@compute01 ~]# cp -rpRf /etc/nova/nova.conf  /etc/nova/nova.conf_neutron_before

/etc/nova/nova.conf파일에 neutron정보를 추가 한다. 

[root@compute01 ~]# vi /etc/nova/nova.conf

~(중간 생략)

[neutron]
auth_url = http://controller:5000
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron.123

~(이하 생략)

 

B-5) Daemon을 재시작한다. 

##  Nova config 변경에 따라 Nova daemon을 재기동한다. 
[root@compute01 ~]# systemctl restart openstack-nova-compute.service


## Neutron daemon 재기동
### 시스템 부팅 후 시작 될 수 있도록 설정
[root@compute01 ~]# systemctl enable neutron-linuxbridge-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-linuxbridge-agent.service to /usr/lib/systemd/system/neutron-linuxbridge-agent.service.

### Daemon시작 (또는 재시작)
[root@compute01 ~]# systemctl start neutron-linuxbridge-agent.service


##Daemon 실행 여부 확인 
[root@compute01 ~]# systemctl status neutron-linuxbridge-agent.service
● neutron-linuxbridge-agent.service - OpenStack Neutron Linux Bridge Agent
   Loaded: loaded (/usr/lib/systemd/system/neutron-linuxbridge-agent.service; enabled; vendor preset: disabled)
   Active: active (running) since 수 2019-11-06 17:31:56 KST; 10s ago
  Process: 26999 ExecStartPre=/usr/bin/neutron-enable-bridge-firewall.sh (code=exited, status=0/SUCCESS)
 Main PID: 27006 (/usr/bin/python)
    Tasks: 1
   CGroup: /system.slice/neutron-linuxbridge-agent.service
           └─27006 /usr/bin/python2 /usr/bin/neutron-linuxbridge-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/ne...

11월 06 17:31:56 compute01 systemd[1]: Starting OpenStack Neutron Linux Bridge Agent...
11월 06 17:31:56 compute01 neutron-enable-bridge-firewall.sh[26999]: net.bridge.bridge-nf-call-iptables = 1
11월 06 17:31:56 compute01 neutron-enable-bridge-firewall.sh[26999]: net.bridge.bridge-nf-call-ip6tables = 1
11월 06 17:31:56 compute01 systemd[1]: Started OpenStack Neutron Linux Bridge Agent.
11월 06 17:31:59 compute01 sudo[27020]:  neutron : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/neutron-rootwrap /etc/neutron/rootwrap.conf privsep-helper --config-file /usr/shar...
11월 06 17:32:01 compute01 sudo[27067]:  neutron : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/neutron-rootwrap-daemon /etc/neutron/rootwrap.conf
Hint: Some lines were ellipsized, use -l to show in full.

 

 

확인 

Controller node에서 확인한다. 

[root@controller ~] (admin-openrc):~# neutron  agent-list
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+--------------------------------------+--------------------+--------------+-------------------+-------+----------------+---------------------------+
| id                                   | agent_type         | host         | availability_zone | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+--------------+-------------------+-------+----------------+---------------------------+
| 262e7fa7-66db-4c2b-9aff-1695ea1e981d | Linux bridge agent | compute02    |                   | :-)   | True           | neutron-linuxbridge-agent |
| 346aad4c-5b14-43ac-87cc-8d03c79807c3 | Linux bridge agent | compute01    |                   | :-)   | True           | neutron-linuxbridge-agent |
| 3b75b66b-eee0-4431-944b-da930ac72e8a | Metadata agent     | controller   |                   | :-)   | True           | neutron-metadata-agent    |
| a5d4a55d-ad6b-45ba-a60f-963c7ebaa920 | Linux bridge agent | controller   |                   | :-)   | True           | neutron-linuxbridge-agent |
| d148e1c7-901e-4325-bc75-428a8bd71084 | DHCP agent         | controller   | nova              | :-)   | True           | neutron-dhcp-agent        |
| fcf7c1a7-c759-42f8-8838-094541e6a373 | L3 agent           | controller   | nova              | :-)   | True           | neutron-l3-agent          |
+--------------------------------------+--------------------+--------------+-------------------+-------+----------------+---------------------------+

 

 

반응형