1. Neutron service 설치
root@nw1 ~(keystone)# apt -y install neutron-server neutron-plugin-ml2 neutron-linuxbridge-agent neutron-l3-agent neutron-dhcp-agent neutron-metadata-agent python3-neutronclient
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-neutronclient is already the newest version (1:7.6.0-0ubuntu1~cloud0).
python3-neutronclient set to manually installed.
The following package was automatically installed and is no longer required:
libfwupdplugin1
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
conntrack dnsmasq-utils haproxy ipset iputils-arping ipvsadm keepalived libipset13 liblua5.3-0 neutron-common python3-designateclient python3-logutils python3-neutron python3-neutron-lib python3-os-ken
python3-pecan python3-setproctitle python3-singledispatch python3-tinyrpc python3-waitress python3-webtest radvd
Suggested packages:
nftables vim-haproxy haproxy-doc heartbeat ldirectord python-neutron-lib-doc python-pecan-doc python-tinyrpc-doc python-waitress-doc python-webtest-doc
The following NEW packages will be installed:
conntrack dnsmasq-utils haproxy ipset iputils-arping ipvsadm keepalived libipset13 liblua5.3-0 neutron-common neutron-dhcp-agent neutron-l3-agent neutron-linuxbridge-agent neutron-metadata-agent
neutron-plugin-ml2 neutron-server python3-designateclient python3-logutils python3-neutron python3-neutron-lib python3-os-ken python3-pecan python3-setproctitle python3-singledispatch python3-tinyrpc
python3-waitress python3-webtest radvd
0 upgraded, 28 newly installed, 0 to remove and 2 not upgraded.
Need to get 5,618 kB of archives.
......
2. Neutron 설정
root@nw1 ~(keystone)# mv /etc/neutron/neutron.conf /etc/neutron/neutron.conf.org
root@nw1 ~(keystone)# vi /etc/neutron/neutron.conf
# create new [DEFAULT] core_plugin = ml2 service_plugins = router auth_strategy = keystone state_path = /var/lib/neutron dhcp_agent_notification = True allow_overlapping_ips = True notify_nova_on_port_status_changes = True notify_nova_on_port_data_changes = True # RabbitMQ connection info transport_url = rabbit://openstack:RabbitMQ 패스워드@192.168.105.191 [agent] root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf # Keystone auth info [keystone_authtoken] www_authenticate_uri = http://192.168.105.191:5000 auth_url = http://192.168.105.191:5000 memcached_servers = 192.168.105.191:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = neutron password = neutron 패스워드 # MariaDB connection info [database] connection = mysql+pymysql://neutron:neutronDB패스워드@192.168.105.191/neutron_ml2 # Nova connection info [nova] auth_url = 192.168.105.191:5000 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = nova password = nova 패스워드 [oslo_concurrency] lock_path = $state_path/tmp |
3. Neutron 서비스 구동
root@nw1 ~(keystone)# touch /etc/neutron/fwaas_driver.ini
root@nw1 ~(keystone)# chmod 640 /etc/neutron/{neutron.conf,fwaas_driver.ini}
root@nw1 ~(keystone)# chgrp neutron /etc/neutron/{neutron.conf,fwaas_driver.ini}
root@nw1 ~(keystone)# vi /etc/neutron/l3_agent.ini
# 라인 21 에 추가 interface_driver = linuxbridge |
root@nw1 ~(keystone)# vi /etc/neutron/dhcp_agent.ini
# 라인 21 에 추가
interface_driver = linuxbridge
... # 라인 43 주석 제거 dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq ...
# 라인 52 에 주석 제거 및 true 설정enable_isolated_metadata = true |
root@nw1 ~(keystone)# vi /etc/neutron/metadata_agent.ini
# 라인 22 주석 제거 및 nova 서버 IP 설정
nova_metadata_host = 192.168.105.191... # 라인 34 주석 제거 및 secret key 설정 metadata_proxy_shared_secret = metadataKey값등록
... # 라인 312 : memcache 서버 설정 memcache_servers = 192.168.105.191:11211
|
root@nw1 ~(keystone)# vi /etc/neutron/plugins/ml2/ml2_conf.ini
# 라인 154 에 추가 [ml2] type_drivers = flat,vlan,vxlan tenant_network_types = vxlan mechanism_drivers = linuxbridge extension_drivers = port_security |
root@nw1 ~(keystone)# vi /etc/neutron/plugins/ml2/linuxbridge_agent.ini
# 라인 225 추가 [securitygroup] enable_security_group = True firewall_driver = iptables enable_ipset = True ... # 라인 284 추가 및 서버 IP 설정 local_ip = 192.168.105.191 |
root@nw1 ~(keystone)# vi /etc/nova/nova.conf
# [DEFAULT] section 에 내용 추가 use_neutron = True vif_plugging_is_fatal = True vif_plugging_timeout = 300 ... # 마지막 라인에 내용 추가 # metadata_proxy_shared_secret 값은 metadata_agent.ini 에 등록한 metadataKey값 입력 [neutron] auth_url = http://192.168.105.191:5000 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = neutron password = neutron패스워드 service_metadata_proxy = True metadata_proxy_shared_secret = metadataKey값 |
root@nw1 ~(keystone)# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
root@nw1 ~(keystone)# su -s /bin/bash neutron -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head"
root@nw1 ~(keystone)# for service in server l3-agent dhcp-agent metadata-agent linuxbridge-agent; do
> systemctl restart neutron-$service
> systemctl enable neutron-$service
> done
root@nw1 ~(keystone)# systemctl restart nova-api nova-compute
root@nw1 ~(keystone)# openstack network agent list
4. Neutron 에러 처리
Neutron 을 구동을 하니 다음과 같이 에러가 발생하기 시작했습니다.
Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused
Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused
(openstack:3277): Gtk-CRITICAL **: 07:39:04.858: gtk_clipboard_get_for_display: assertion 'display != NULL' failed
Traceback (most recent call last):
File "/usr/bin/openstack", line 6, in <module>
from openstackclient.shell import main
File "/usr/lib/python3/dist-packages/openstackclient/shell.py", line 23, in <module>
from osc_lib import shell
File "/usr/lib/python3/dist-packages/osc_lib/shell.py", line 24, in <module>
from cliff import app
File "/usr/lib/python3/dist-packages/cliff/app.py", line 23, in <module>
import cmd2
File "/usr/lib/python3/dist-packages/cmd2.py", line 585, in <module>
_ = pyperclip.paste()
File "/usr/lib/python3/dist-packages/pyperclip/__init__.py", line 668, in lazy_load_stub_paste
return paste()
File "/usr/lib/python3/dist-packages/pyperclip/__init__.py", line 177, in paste_gi
clipboardContents = cb.wait_for_text()
AttributeError: 'NoneType' object has no attribute 'wait_for_text'
설정들을 다시 해보고 서버 리부팅을 해봤으나 오류는 동일하게 발생하였으며
관련해서 몇가지 작업을 진행 후 정상화가 되었습니다.
관련하여 기록을 남깁니다.
1. /etc/neutron/plugin.ini chown 설정
cd /etc/neutron
chown -h root:neutron plugin.ini
2. 서비스 재시작
root@nw1 nova(keystone)# systemctl restart nova-compute nova-novncproxy
root@nw1 nova(keystone)# systemctl restart glance-api
root@nw1 nova(keystone)# systemctl enable glance-api
Synchronizing state of glance-api.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable glance-api
root@nw1 nova(keystone)# systemctl restart nova-api nova-compute
3. network agent list 재확인
root@nw1 nova(keystone)# openstack network agent list
참고 사이트
https://www.server-world.info/en/note?os=Ubuntu_20.04&p=openstack_xena&f=11
'IT > 그 외 IT' 카테고리의 다른 글
[OpenStack] 8. OpenStack 사용자 추가 (0) | 2022.06.10 |
---|---|
[OpenStack] 7. Neutron 네트워크 설정 (0) | 2022.06.08 |
[OpenStack] 6. Neutron 구성(1) (0) | 2022.06.06 |
[OpenStack] 5. nava 구성(3) (0) | 2022.06.05 |
[OpenStack] Nova state down 으로 인한 password 삭제 및 cell 재등록 (2) | 2022.06.04 |
댓글