Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I used the openvswitch to create a br-ex for openstack to create a router and two network, the interfaces in the routers are down:

Creat Bridge

ovs-vsctl add-br br-ex ip addr add 192.168.43.110/24 dev br-ex ip addr flush dev eno16777736 ip addr add 192.168.43.110/24 dev br-ex ovs-vsctl add-port br-ex eno16777736 ip link set dev br-ex up

virsh net-define /tmp/ovs-network.xml \ Network ovs-network defined from /tmp/ovs-network.xml

#

systemctl disable NetworkManager systemctl stop NetworkManager systemctl disable firewalld systemctl stop firewalld setenforce 0

systemctl restart network systemctl status network

#

subscription-manager list --available

subscription-manager attach --pool=

subscription-manager repos --enable=rhel-7-server-optional-rpms \ --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-rh-common-rpms subscription-manager repos --enable=rhel-7-server-openstack-14-rpms subscription-manager repos --enable=rhel-7-server-openstack-14-devtools-rpms subscription-manager repos --enable=rhel-7-server-openstack-14-tools-rpms subscription-manager repos --enable=rhel-7-server-openstack-13-rpms subscription-manager repos --enable=rhel-7-server-openstack-13-devtools-rpms subscription-manager repos --enable=rhel-7-server-openstack-13-tools-rpms yum repolist enabled #enable all

subscriptiion-manager repos --enable=

sudo yum -y install yum-plugin-priorities yum-utils

yum install openstack-selinux

rpm -q --whatprovides rubygem-json ###### rubygem-json-1.7.7-20.el7.x86_64

do not update with ### yum update ### it will upgrade the RHEL 7 to 7.6 Maipo if you want to keep 7.0 on your VM

#

neutron net-create External1 --provider:network_type flat --provider:physical_network br-ex --router:external=true --shared neutron net-create External2 --provider:network_type flat --provider:physical_network eno16777736 --router:external=true --shared neutron net-create External3 --provider-physical-network provider --provider:physical_network eno16777736 --router:external=true --shared openstack subnet create --network provider \ --allocation-pool start=192.168.43.2,end=192.168.43.240 \ --dns-nameserver 192.168.64.1 --gateway 192.168.43.1 \ --subnet-range 192.168.64.0/24 provider

mysql

create database neutron; grant all privileges on neutron.* to 'neutron'@'localhost' identified by 'server'; grant all privileges on neutron.* to 'neutron'@'%' identified by 'server'; quit

export | grep OS_declare -x OS_AUTH_URL="https://192.168.64.128:5000/v3"

source admin-openrc.sh openstack user create --domain default --password-prompt neutron openstack role add --project service --user neutron admin openstack service create --name neutron --description "OpenStack Networking" network openstack endpoint create --region RegionOne network public http://controller:9696 openstack endpoint create --region RegionOne network internal http://controller:9696 openstack endpoint create --region RegionOne network admin http://controller:9696

systemctl enable neutron-server.service neutron-openvswitch-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service neutron-ovs-cleanup.service systemctl start neutron-server.service neutron-openvswitch-agent.service neutron-dhcp-agent.service neutron-metadata-agent.service neutron-ovs-cleanup.service systemctl enable neutron-l3-agent.service systemctl start neutron-l3-agent.service

#

Horizon admin unauthorized access error

export OS_USERNAME=admin export OS_PASSWORD=server export OS_TENANT_NAME=admin export OS_AUTH_URL=http://localhost:5000/v3

export OS_USERNAME=admin export OS_PASSWORD=server export OS_PROJECT_NAME=project export OS_USER_DOMAIN_ID=default export OS_PROJECT_DOMAIN_ID=default export OS_AUTH_URL=http://auth.example.com:5000/v3

neutron router-gateway-set ROUTER NETWORK neutron router-interface-add ROUTER SUBNET

neutron router-gateway-set router1 External2

neutron net-create External2 --provider:network_type flat --provider:physical_network eno16777736 --router:external=true --shared neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Created a new network: +---------------------------+--------------------------------------+ | Field | Value | +---------------------------+--------------------------------------+ | admin_state_up | True | | availability_zone_hints | | | availability_zones | | | created_at | 2019-01-17T17:05:57Z | | description | | | id | 0f9adf89-6ee2-4e68-8559-fc474dedb30d | | ipv4_address_scope | | | ipv6_address_scope | | | is_default | False | | mtu | 1500 | | name | External2 | | port_security_enabled | True | | project_id | a76eea958a6e435a93e3ffc7a36c7970 | | provider:network_type | flat | | provider:physical_network | eno16777736 | | provider:segmentation_id | | | qos_policy_id | | | revision_number | 1 | | router:external | True | | shared | True | | status | ACTIVE | | subnets | | | tags | | | tenant_id | a76eea958a6e435a93e3ffc7a36c7970 | | updated_at | 2019-01-17T17:05:57Z | +---------------------------+--------------------------------------+ [root@localhost ~(keystone_admin)]# neutron router-create router1 neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Created a new router: +-------------------------+--------------------------------------+ | Field | Value | +-------------------------+--------------------------------------+ | admin_state_up | True | | availability_zone_hints | | | availability_zones | | | created_at | 2019-01-17T17:09:36Z | | description | | | distributed | False | | external_gateway_info | | | flavor_id | | | ha | False | | id | 59dabea6-0f82-48e4-a093-9a4a904df496 | | name | router1 | | project_id | a76eea958a6e435a93e3ffc7a36c7970 | | revision_number | 0 | | routes | | | status | ACTIVE | | tags | | | tenant_id | a76eea958a6e435a93e3ffc7a36c7970 | | updated_at | 2019-01-17T17:09:36Z | +-------------------------+--------------------------------------+ [root@localhost ~(keystone_admin)]# neutron router-gateway-set router1 External2 neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Set gateway for router router1 [root@localhost ~(keystone_admin)]# ^C [root@localhost ~(keystone_admin)]# neutron router-interface-add router1 Internal neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Added interface 1271621e-4cf0-425e-a6a8-ad68c3b43c7a to router router1.

neutron port-create Internal --fixed-ip ip_address=172.17.20.5 neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Created a new port: +-----------------------+------------------------------------------------------------------------------------+ | Field | Value | +-----------------------+------------------------------------------------------------------------------------+ | admin_state_up | True | | allowed_address_pairs | | | binding:host_id | | | binding:profile | {} | | binding:vif_details | {} | | binding:vif_type | unbound | | binding:vnic_type | normal | | created_at | 2019-01-17T17:19:52Z | | description | | | device_id | | | device_owner | | | extra_dhcp_opts | | | fixed_ips | {"subnet_id": "4f61307a-6f89-4edc-8c9b-f4afc9c9bde6", "ip_address": "172.17.20.5"} | | id | b2639fd0-a2ff-4616-9f69-1a86240a65ce | | mac_address | fa:16:3e:ff:0c:d1 | | name | | | network_id | 5f3ec4e3-a5c4-4b0b-8e9e-add01ffa2960 | | port_security_enabled | True | | project_id | a76eea958a6e435a93e3ffc7a36c7970 | | qos_policy_id | | | revision_number | 2 | | security_groups | 0edb18c8-e7ce-4f6f-9a81-2a24b9a8769f | | status | DOWN | | tags | | | tenant_id | a76eea958a6e435a93e3ffc7a36c7970 | | updated_at | 2019-01-17T17:19:52Z | +-----------------------+------------------------------------------------------------------------------------+

neutron port-create Internal neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Created a new port: +-----------------------+--------------------------------------------------------------------------------------+ | Field | Value | +-----------------------+--------------------------------------------------------------------------------------+ | admin_state_up | True | | allowed_address_pairs | | | binding:host_id | | | binding:profile | {} | | binding:vif_details | {} | | binding:vif_type | unbound | | binding:vnic_type | normal | | created_at | 2019-01-17T17:21:59Z | | description | | | device_id | | | device_owner | | | extra_dhcp_opts | | | fixed_ips | {"subnet_id": "4f61307a-6f89-4edc-8c9b-f4afc9c9bde6", "ip_address": "172.17.20.152"} | | id | 53c7f03e-27b6-419d-a098-61823dad013b | | mac_address | fa:16:3e:94:b5:b2 | | name | | | network_id | 5f3ec4e3-a5c4-4b0b-8e9e-add01ffa2960 | | port_security_enabled | True | | project_id | a76eea958a6e435a93e3ffc7a36c7970 | | qos_policy_id | | | revision_number | 2 | | security_groups | 0edb18c8-e7ce-4f6f-9a81-2a24b9a8769f | | status | DOWN | | tags | | | tenant_id | a76eea958a6e435a93e3ffc7a36c7970 | | updated_at | 2019-01-17T17:22:00Z | +-----------------------+--------------------------------------------------------------------------------------+

neutron port-list --fixed-ips ip_address=192.168.43.1 ip_address=172.17.20.5 ip_address=172.17.20.152 neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. +--------------------------------------+------+----------------------------------+-------------------+------------------------------------------------------------------------------------+ | id | name | tenant_id | mac_address | fixed_ips | +--------------------------------------+------+----------------------------------+-------------------+------------------------------------------------------------------------------------+ | 7c8baea6-b9f1-4152-ae4c-97023def8282 | | a76eea958a6e435a93e3ffc7a36c7970 | fa:16:3e:9e:58:64 | {"subnet_id": "2b834612-9e58-4714-9a0a-2f4b87f5720d", "ip_address": "172.17.20.5"} | +--------------------------------------+------+----------------------------------+-------------------+------------------------------------------------------------------------------------+ [root@localhost network-scripts(keystone_admin)]#

neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. +--------------------------------------+------+----------------------------------+-------------------+--------------------------------------------------------------------------------------+ | id | name | tenant_id | mac_address | fixed_ips | +--------------------------------------+------+----------------------------------+-------------------+--------------------------------------------------------------------------------------+ | 53c7f03e-27b6-419d-a098-61823dad013b | | a76eea958a6e435a93e3ffc7a36c7970 | fa:16:3e:94:b5:b2 | {"subnet_id": "4f61307a-6f89-4edc-8c9b-f4afc9c9bde6", "ip_address": "172.17.20.152"} | | b2639fd0-a2ff-4616-9f69-1a86240a65ce | | a76eea958a6e435a93e3ffc7a36c7970 | fa:16:3e:ff:0c:d1 | {"subnet_id": "4f61307a-6f89-4edc-8c9b-f4afc9c9bde6", "ip_address": "172.17.20.5"} | +--------------------------------------+------+----------------------------------+-------------------+--------------------------------------------------------------------------------------+

neutron router-update router1 --routes type=dict list=true destination=192.168.43.0/24,nexthop=172.17.20.150 neutron router-update router1 --routes type=dict list=true destination=172.17.0.0,nexthop=192.168.43.1

#

/etc/cinder/cinder.conf

added

[keystone_authtoken] auth_uri = https://keystone_ip:5000 auth_url = https://keystone_ip:35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = services username = cinder password = [ccinder password]

systemctl restart openstack-nova-api systemctl restart openstack-nova-cert systemctl restart openstack-nova-consoleauth systemctl restart openstack-nova-scheduler systemctl restart openstack-nova-conductor systemctl restart openstack-nova-novncproxy systemctl restart neutron-server systemctl restart neutron-dhcp-agent systemctl restart neutron-l3-agent systemctl restart neutron-metadata-agent systemctl restart neutron-openvswitch-agent systemctl restart openstack-cinder-api systemctl restart openstack-cinder-backup systemctl restart openstack-cinder-scheduler systemctl restart openstack-cinder-volume

sudo service --status-all | grep nova sudo service --status-all | grep neutron sudo service --status-all | grep cinder

neutron router-create router1 neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Created a new router: +-------------------------+--------------------------------------+ | Field | Value | +-------------------------+--------------------------------------+ | admin_state_up | True | | availability_zone_hints | | | availability_zones | | | created_at | 2019-01-18T00:06:23Z | | description | | | distributed | False | | external_gateway_info | | | flavor_id | | | ha | False | | id | 85019eef-e2f2-444f-a023-39a4c8af7085 | | name | router1 | | project_id | a76eea958a6e435a93e3ffc7a36c7970 | | revision_number | 0 | | routes | | | status | ACTIVE | | tags | | | tenant_id | a76eea958a6e435a93e3ffc7a36c7970 | | updated_at | 2019-01-18T00:06:23Z | +-------------------------+--------------------------------------+ [root@localhost network-scripts(keystone_admin)]# neutron port-create Internal --fixed-ip ip_address=172.17.20.5 neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Created a new port: +-----------------------+------------------------------------------------------------------------------------+ | Field | Value | +-----------------------+------------------------------------------------------------------------------------+ | admin_state_up | True | | allowed_address_pairs | | | binding:host_id | | | binding:profile | {} | | binding:vif_details | {} | | binding:vif_type | unbound | | binding:vnic_type | normal | | created_at | 2019-01-18T00:13:35Z | | description | | | device_id | | | device_owner | | | extra_dhcp_opts | | | fixed_ips | {"subnet_id": "2b834612-9e58-4714-9a0a-2f4b87f5720d", "ip_address": "172.17.20.5"} | | id | 7c8baea6-b9f1-4152-ae4c-97023def8282 | | mac_address | fa:16:3e:9e:58:64 | | name | | | network_id | 5866d16a-1417-49af-9f9c-90ce35277510 | | port_security_enabled | True | | project_id | a76eea958a6e435a93e3ffc7a36c7970 | | qos_policy_id | | | revision_number | 2 | | security_groups | 0edb18c8-e7ce-4f6f-9a81-2a24b9a8769f | | status | DOWN | | tags | | | tenant_id | a76eea958a6e435a93e3ffc7a36c7970 | | updated_at | 2019-01-18T00:13:36Z | +-----------------------+------------------------------------------------------------------------------------+

neutron net-create External2 --provider:network_type flat --provider:physical_network eno16777736 --router:external=true --shared neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Created a new network: +---------------------------+--------------------------------------+ | Field | Value | +---------------------------+--------------------------------------+ | admin_state_up | True | | availability_zone_hints | | | availability_zones | | | created_at | 2019-01-18T00:29:35Z | | description | | | id | 73079298-653a-4ead-85fd-a11d83672109 | | ipv4_address_scope | | | ipv6_address_scope | | | is_default | False | | mtu | 1500 | | name | External2 | | port_security_enabled | True | | project_id | a76eea958a6e435a93e3ffc7a36c7970 | | provider:network_type | flat | | provider:physical_network | eno16777736 | | provider:segmentation_id | | | qos_policy_id | | | revision_number | 1 | | router:external | True | | shared | True | | status | ACTIVE | | subnets | | | tags | | | tenant_id | a76eea958a6e435a93e3ffc7a36c7970 | | updated_at | 2019-01-18T00:29:36Z | +---------------------------+--------------------------------------+ [root@localhost network-scripts(keystone_admin)]# neutron net-create External3 --provider-physical-network provider --provider:physical_network eno16777736 --router:external=true --shared neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Unrecognized attribute(s) 'provider_physical_network' Neutron server returns request_ids: ['req-b9ce0c6f-b0e5-487b-b214-450814b2b65f'] [root@localhost network-scripts(keystone_admin)]# openstack subnet create --network provider \

--allocation-pool start=192.168.43.2,end=192.168.43.240 \ --dns-nameserver 192.168.64.1 --gateway 192.168.43.1 \ --subnet-range 192.168.64.0/24 provider