Created
August 27, 2016 12:55
-
-
Save hoonetorg/d42eb34eccc7d7d1c48349bd55c566a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#On the node where the tenant vars are sourced | |
[root@os1 ~]# cat /etc/neutron/plugins/ml2/linuxbridge_agent.ini |grep mapping | |
# mapping physical network names to the agent's node-specific physical network | |
# listed in network_vlan_ranges on the server should have mappings to | |
physical_interface_mappings = provider:bond0.2 | |
[root@os1 ~]# neutron agent-list | |
+--------------------------------------+--------------------+--------------------+-------------------+-------+----------------+---------------------------+ | |
| id | agent_type | host | availability_zone | alive | admin_state_up | binary | | |
+--------------------------------------+--------------------+--------------------+-------------------+-------+----------------+---------------------------+ | |
| 0f8d60df-a66d-471e-90f6-e0dd2ea63fa8 | L3 agent | os3.os.example.org | nova | :-) | True | neutron-l3-agent | | |
| 39a5e322-ad63-4063-9cae-9742e9a6640b | DHCP agent | os2.os.example.org | nova | :-) | True | neutron-dhcp-agent | | |
| 3adf87f2-55c0-46e0-8d5a-e7aaae630882 | Linux bridge agent | os4.os.example.org | | :-) | True | neutron-linuxbridge-agent | | |
| 4108902f-e17d-4da3-a6ec-52ffe4014510 | L3 agent | os2.os.example.org | nova | :-) | True | neutron-l3-agent | | |
| 438a5b66-3bd0-4fc5-a6b1-378a237ba05a | Metadata agent | os3.os.example.org | | :-) | True | neutron-metadata-agent | | |
| 55d005be-7c96-4925-b65f-c2245fe36d0b | Linux bridge agent | os1.os.example.org | | :-) | True | neutron-linuxbridge-agent | | |
| 68bc28e7-53c5-455c-a856-254c559085eb | Metadata agent | os2.os.example.org | | :-) | True | neutron-metadata-agent | | |
| 6dc464c3-ae95-4952-b4d1-2e00a77d6a27 | DHCP agent | os1.os.example.org | nova | :-) | True | neutron-dhcp-agent | | |
| 8340796b-60f1-45f5-9277-632a69949e2c | Linux bridge agent | os2.os.example.org | | :-) | True | neutron-linuxbridge-agent | | |
| 8bcdc710-9f37-4029-ab5d-0d90eadc4b92 | L3 agent | os1.os.example.org | nova | :-) | True | neutron-l3-agent | | |
| 8c642a23-90d3-482a-aaf8-8ca896419c90 | Metadata agent | os1.os.example.org | | :-) | True | neutron-metadata-agent | | |
| 8f9acb0c-a379-4bbb-b65f-74437ec73bed | Linux bridge agent | os3.os.example.org | | :-) | True | neutron-linuxbridge-agent | | |
| 95a7337b-455f-4ba4-85dc-010697be6796 | DHCP agent | os3.os.example.org | nova | :-) | True | neutron-dhcp-agent | | |
+--------------------------------------+--------------------+--------------------+-------------------+-------+----------------+---------------------------+ | |
[root@os1 ~]# neutron ext-list | |
+---------------------------+-----------------------------------------------+ | |
| alias | name | | |
+---------------------------+-----------------------------------------------+ | |
| default-subnetpools | Default Subnetpools | | |
| network-ip-availability | Network IP Availability | | |
| network_availability_zone | Network Availability Zone | | |
| auto-allocated-topology | Auto Allocated Topology Services | | |
| ext-gw-mode | Neutron L3 Configurable external gateway mode | | |
| binding | Port Binding | | |
| agent | agent | | |
| subnet_allocation | Subnet Allocation | | |
| l3_agent_scheduler | L3 Agent Scheduler | | |
| tag | Tag support | | |
| external-net | Neutron external network | | |
| net-mtu | Network MTU | | |
| availability_zone | Availability Zone | | |
| quotas | Quota management support | | |
| l3-ha | HA Router extension | | |
| provider | Provider Network | | |
| multi-provider | Multi Provider Network | | |
| address-scope | Address scope | | |
| extraroute | Neutron Extra Route | | |
| timestamp_core | Time Stamp Fields addition for core resources | | |
| router | Neutron L3 Router | | |
| extra_dhcp_opt | Neutron Extra DHCP opts | | |
| dns-integration | DNS Integration | | |
| security-group | security-group | | |
| dhcp_agent_scheduler | DHCP Agent Scheduler | | |
| router_availability_zone | Router Availability Zone | | |
| rbac-policies | RBAC Policies | | |
| standard-attr-description | standard-attr-description | | |
| port-security | Port Security | | |
| allowed-address-pairs | Allowed Address Pairs | | |
| dvr | Distributed Virtual Router | | |
+---------------------------+-----------------------------------------------+ | |
[root@os1 ~]# neutron net-create --shared --provider:physical_network provider --provider:network_type flat provider | |
Created a new network: | |
+---------------------------+--------------------------------------+ | |
| Field | Value | | |
+---------------------------+--------------------------------------+ | |
| admin_state_up | True | | |
| availability_zone_hints | | | |
| availability_zones | | | |
| created_at | 2016-08-25T21:01:32 | | |
| description | | | |
| id | 77521675-9b29-4ad5-95ef-088feb0a36b3 | | |
| ipv4_address_scope | | | |
| ipv6_address_scope | | | |
| mtu | 1500 | | |
| name | provider | | |
| port_security_enabled | True | | |
| provider:network_type | flat | | |
| provider:physical_network | provider | | |
| provider:segmentation_id | | | |
| router:external | False | | |
| shared | True | | |
| status | ACTIVE | | |
| subnets | | | |
| tags | | | |
| tenant_id | 6b79b205449c4510ab7b450aaa0eca9d | | |
| updated_at | 2016-08-25T21:01:32 | | |
+---------------------------+--------------------------------------+ | |
[root@os1 ~]# brctl show | |
bridge name bridge id STP enabled interfaces | |
brosclu 8000.80ee73976bfd no bond0.33 | |
brosman 8000.80ee73976bfd no bond0 | |
brosmon 8000.80ee73976bfd no bond0.34 | |
brososd 8000.80ee73976bfd no bond0.35 | |
brostun 8000.80ee73976bfd no bond0.32 | |
[root@os1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0.2 | |
DEVICE=bond0.2 | |
VLAN=yes | |
ONBOOT=yes | |
MTU=9000 | |
PEERDNS=no | |
[root@os1 ~]# neutron subnet-create --name provider --allocation-pool start=192.168.236.11,end=192.168.236.39 --dns-nameserver 8.8.4.4 --gateway 192.168.236.254 provider 192.168.236.0/24 | |
Created a new subnet: | |
+-------------------+------------------------------------------------------+ | |
| Field | Value | | |
+-------------------+------------------------------------------------------+ | |
| allocation_pools | {"start": "192.168.236.11", "end": "192.168.236.39"} | | |
| cidr | 192.168.236.0/24 | | |
| created_at | 2016-08-25T21:04:47 | | |
| description | | | |
| dns_nameservers | 8.8.4.4 | | |
| enable_dhcp | True | | |
| gateway_ip | 192.168.236.254 | | |
| host_routes | | | |
| id | 9be218da-23ae-4859-b219-9669e0962620 | | |
| ip_version | 4 | | |
| ipv6_address_mode | | | |
| ipv6_ra_mode | | | |
| name | provider | | |
| network_id | 77521675-9b29-4ad5-95ef-088feb0a36b3 | | |
| subnetpool_id | | | |
| tenant_id | 6b79b205449c4510ab7b450aaa0eca9d | | |
| updated_at | 2016-08-25T21:04:47 | | |
+-------------------+------------------------------------------------------+ | |
[root@os1 ~]# brctl show | |
bridge name bridge id STP enabled interfaces | |
brosclu 8000.80ee73976bfd no bond0.33 | |
brosman 8000.80ee73976bfd no bond0 | |
brosmon 8000.80ee73976bfd no bond0.34 | |
brososd 8000.80ee73976bfd no bond0.35 | |
brostun 8000.80ee73976bfd no bond0.32 | |
[root@os1 ~]# ip netns | |
qdhcp-77521675-9b29-4ad5-95ef-088feb0a36b3 (id: 0) | |
[root@os1 ~]# ip a l bond0.2 | |
7: bond0.2@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master brq77521675-9b state UP | |
link/ether 80:ee:73:97:6b:fd brd ff:ff:ff:ff:ff:ff | |
[root@os1 ~]# ip netns exec qdhcp-77521675-9b29-4ad5-95ef-088feb0a36b3 ip a l | |
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN | |
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 | |
inet 127.0.0.1/8 scope host lo | |
valid_lft forever preferred_lft forever | |
inet6 ::1/128 scope host | |
valid_lft forever preferred_lft forever | |
2: ns-a18dc866-94@if17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 | |
link/ether fa:16:3e:49:85:84 brd ff:ff:ff:ff:ff:ff link-netnsid 0 | |
inet 192.168.236.13/24 brd 192.168.236.255 scope global ns-a18dc866-94 | |
valid_lft forever preferred_lft forever | |
inet 169.254.169.254/16 brd 169.254.255.255 scope global ns-a18dc866-94 | |
valid_lft forever preferred_lft forever | |
inet6 fe80::f816:3eff:fe49:8584/64 scope link | |
valid_lft forever preferred_lft forever | |
[root@os1 ~]# ip netns | |
qdhcp-77521675-9b29-4ad5-95ef-088feb0a36b3 (id: 0) | |
[root@os1 ~]# openstack server create --nic net-id=77521675-9b29-4ad5-95ef-088feb0a36b3 --security-group default --flavor m1.tiny --image "Cirros 0.3.4" providervm | |
+--------------------------------------+-----------------------------------------------------+ | |
| Field | Value | | |
+--------------------------------------+-----------------------------------------------------+ | |
| OS-DCF:diskConfig | MANUAL | | |
| OS-EXT-AZ:availability_zone | | | |
| OS-EXT-SRV-ATTR:host | None | | |
| OS-EXT-SRV-ATTR:hypervisor_hostname | None | | |
| OS-EXT-SRV-ATTR:instance_name | instance-0000001e | | |
| OS-EXT-STS:power_state | 0 | | |
| OS-EXT-STS:task_state | scheduling | | |
| OS-EXT-STS:vm_state | building | | |
| OS-SRV-USG:launched_at | None | | |
| OS-SRV-USG:terminated_at | None | | |
| accessIPv4 | | | |
| accessIPv6 | | | |
| addresses | | | |
| adminPass | blubblub | | |
| config_drive | | | |
| created | 2016-08-25T21:09:35Z | | |
| flavor | m1.tiny (1) | | |
| hostId | | | |
| id | 47717745-46a4-489f-a83d-16a03b501c43 | | |
| image | Cirros 0.3.4 (3c98d640-66fe-4c8a-8d46-63d42b056c18) | | |
| key_name | None | | |
| name | providervm | | |
| os-extended-volumes:volumes_attached | [] | | |
| progress | 0 | | |
| project_id | 6b79b205449c4510ab7b450aaa0eca9d | | |
| properties | | | |
| security_groups | [{u'name': u'default'}] | | |
| status | BUILD | | |
| updated | 2016-08-25T21:09:36Z | | |
| user_id | 01287aff03034568a7fd6cb809d44d9e | | |
+--------------------------------------+-----------------------------------------------------+ | |
[root@os1 ~]# brctl show | |
bridge name bridge id STP enabled interfaces | |
brosclu 8000.80ee73976bfd no bond0.33 | |
brosman 8000.80ee73976bfd no bond0 | |
brosmon 8000.80ee73976bfd no bond0.34 | |
brososd 8000.80ee73976bfd no bond0.35 | |
brostun 8000.80ee73976bfd no bond0.32 | |
brq77521675-9b 8000.80ee73976bfd no bond0.2 | |
tapa18dc866-94 | |
[root@os1 ~]# openstack server show providervm | |
+--------------------------------------+----------------------------------------------------------+ | |
| Field | Value | | |
+--------------------------------------+----------------------------------------------------------+ | |
| OS-DCF:diskConfig | MANUAL | | |
| OS-EXT-AZ:availability_zone | nova | | |
| OS-EXT-SRV-ATTR:host | os4.os.example.org | | |
| OS-EXT-SRV-ATTR:hypervisor_hostname | os4.os.example.org | | |
| OS-EXT-SRV-ATTR:instance_name | instance-0000001e | | |
| OS-EXT-STS:power_state | 1 | | |
| OS-EXT-STS:task_state | None | | |
| OS-EXT-STS:vm_state | active | | |
| OS-SRV-USG:launched_at | 2016-08-25T21:09:44.000000 | | |
| OS-SRV-USG:terminated_at | None | | |
| accessIPv4 | | | |
| accessIPv6 | | | |
| addresses | provider=192.168.236.14 | | |
| config_drive | | | |
| created | 2016-08-25T21:09:35Z | | |
| flavor | m1.tiny (1) | | |
| hostId | bcc8f4129037523e97e580543a3d4dd8e906792f3b7058df5fc5fefc | | |
| id | 47717745-46a4-489f-a83d-16a03b501c43 | | |
| image | Cirros 0.3.4 (3c98d640-66fe-4c8a-8d46-63d42b056c18) | | |
| key_name | None | | |
| name | providervm | | |
| os-extended-volumes:volumes_attached | [] | | |
| progress | 0 | | |
| project_id | 6b79b205449c4510ab7b450aaa0eca9d | | |
| properties | | | |
| security_groups | [{u'name': u'default'}] | | |
| status | ACTIVE | | |
| updated | 2016-08-25T21:09:44Z | | |
| user_id | 01287aff03034568a7fd6cb809d44d9e | | |
+--------------------------------------+----------------------------------------------------------+ | |
[root@os1 ~]# ip netns | |
qdhcp-77521675-9b29-4ad5-95ef-088feb0a36b3 (id: 0) | |
[root@os1 ~]# ip netns exec qdhcp-77521675-9b29-4ad5-95ef-088feb0a36b3 ip a l | |
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN | |
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 | |
inet 127.0.0.1/8 scope host lo | |
valid_lft forever preferred_lft forever | |
inet6 ::1/128 scope host | |
valid_lft forever preferred_lft forever | |
2: ns-a18dc866-94@if17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 | |
link/ether fa:16:3e:49:85:84 brd ff:ff:ff:ff:ff:ff link-netnsid 0 | |
inet 192.168.236.13/24 brd 192.168.236.255 scope global ns-a18dc866-94 | |
valid_lft forever preferred_lft forever | |
inet 169.254.169.254/16 brd 169.254.255.255 scope global ns-a18dc866-94 | |
valid_lft forever preferred_lft forever | |
inet6 fe80::f816:3eff:fe49:8584/64 scope link | |
valid_lft forever preferred_lft forever | |
##### COMPUTENODE where vm runs | |
[root@os4 ~]# brctl show | |
bridge name bridge id STP enabled interfaces | |
brosclu 8000.80ee73976c45 no bond0.33 | |
brosman 8000.80ee73976c45 no bond0 | |
brosmon 8000.80ee73976c45 no bond0.34 | |
brososd 8000.80ee73976c45 no bond0.35 | |
brostun 8000.80ee73976c45 no bond0.32 | |
brq77521675-9b 8000.80ee73976c45 no bond0.2 | |
tap43cc05f5-60 | |
[root@os4 ~]# virsh list | |
Id Name State | |
---------------------------------------------------- | |
5 instance-0000001e running | |
[root@os4 ~]# virsh dumpxml instance-0000001e | |
<domain type='kvm' id='5'> | |
<name>instance-0000001e</name> | |
<uuid>47717745-46a4-489f-a83d-16a03b501c43</uuid> | |
<metadata> | |
<nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0"> | |
<nova:package version="13.1.0-1.el7"/> | |
<nova:name>providervm</nova:name> | |
<nova:creationTime>2016-08-25 21:09:39</nova:creationTime> | |
<nova:flavor name="m1.tiny"> | |
<nova:memory>512</nova:memory> | |
<nova:disk>1</nova:disk> | |
<nova:swap>0</nova:swap> | |
<nova:ephemeral>0</nova:ephemeral> | |
<nova:vcpus>1</nova:vcpus> | |
</nova:flavor> | |
<nova:owner> | |
<nova:user uuid="01287aff03034568a7fd6cb809d44d9e">admin</nova:user> | |
<nova:project uuid="6b79b205449c4510ab7b450aaa0eca9d">admin</nova:project> | |
</nova:owner> | |
<nova:root type="image" uuid="3c98d640-66fe-4c8a-8d46-63d42b056c18"/> | |
</nova:instance> | |
</metadata> | |
<memory unit='KiB'>524288</memory> | |
<currentMemory unit='KiB'>524288</currentMemory> | |
<vcpu placement='static'>1</vcpu> | |
<cputune> | |
<shares>1024</shares> | |
</cputune> | |
<resource> | |
<partition>/machine</partition> | |
</resource> | |
<sysinfo type='smbios'> | |
<system> | |
<entry name='manufacturer'>Fedora Project</entry> | |
<entry name='product'>OpenStack Nova</entry> | |
<entry name='version'>13.1.0-1.el7</entry> | |
<entry name='serial'>b60db9ab-1d1e-4805-bfba-f6b838e23983</entry> | |
<entry name='uuid'>47717745-46a4-489f-a83d-16a03b501c43</entry> | |
<entry name='family'>Virtual Machine</entry> | |
</system> | |
</sysinfo> | |
<os> | |
<type arch='x86_64' machine='pc-i440fx-rhel7.2.0'>hvm</type> | |
<boot dev='hd'/> | |
<smbios mode='sysinfo'/> | |
</os> | |
<features> | |
<acpi/> | |
<apic/> | |
</features> | |
<cpu mode='host-passthrough'> | |
<topology sockets='1' cores='1' threads='1'/> | |
</cpu> | |
<clock offset='utc'> | |
<timer name='pit' tickpolicy='delay'/> | |
<timer name='rtc' tickpolicy='catchup'/> | |
<timer name='hpet' present='no'/> | |
</clock> | |
<on_poweroff>destroy</on_poweroff> | |
<on_reboot>restart</on_reboot> | |
<on_crash>destroy</on_crash> | |
<devices> | |
<emulator>/usr/libexec/qemu-kvm</emulator> | |
<disk type='network' device='disk'> | |
<driver name='qemu' type='raw' cache='writeback' discard='unmap'/> | |
<auth username='cinder'> | |
<secret type='ceph' uuid='2e4e3d73-52ee-42d1-b776-efcbb58cd423'/> | |
</auth> | |
<source protocol='rbd' name='vms/47717745-46a4-489f-a83d-16a03b501c43_disk'> | |
<host name='192.168.234.111' port='6789'/> | |
<host name='192.168.234.112' port='6789'/> | |
<host name='192.168.234.113' port='6789'/> | |
</source> | |
<backingStore/> | |
<target dev='sda' bus='scsi'/> | |
<alias name='scsi0-0-0-0'/> | |
<address type='drive' controller='0' bus='0' target='0' unit='0'/> | |
</disk> | |
<controller type='scsi' index='0' model='virtio-scsi'> | |
<alias name='scsi0'/> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> | |
</controller> | |
<controller type='usb' index='0'> | |
<alias name='usb'/> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> | |
</controller> | |
<controller type='pci' index='0' model='pci-root'> | |
<alias name='pci.0'/> | |
</controller> | |
<controller type='virtio-serial' index='0'> | |
<alias name='virtio-serial0'/> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> | |
</controller> | |
<interface type='bridge'> | |
<mac address='fa:16:3e:7b:ea:da'/> | |
<source bridge='brq77521675-9b'/> | |
<target dev='tap43cc05f5-60'/> | |
<model type='virtio'/> | |
<alias name='net0'/> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> | |
</interface> | |
<serial type='file'> | |
<source path='/var/lib/nova/instances/47717745-46a4-489f-a83d-16a03b501c43/console.log'/> | |
<target port='0'/> | |
<alias name='serial0'/> | |
</serial> | |
<serial type='pty'> | |
<source path='/dev/pts/1'/> | |
<target port='1'/> | |
<alias name='serial1'/> | |
</serial> | |
<console type='file'> | |
<source path='/var/lib/nova/instances/47717745-46a4-489f-a83d-16a03b501c43/console.log'/> | |
<target type='serial' port='0'/> | |
<alias name='serial0'/> | |
</console> | |
<channel type='unix'> | |
<source mode='bind' path='/var/lib/libvirt/qemu/org.qemu.guest_agent.0.instance-0000001e.sock'/> | |
<target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/> | |
<alias name='channel0'/> | |
<address type='virtio-serial' controller='0' bus='0' port='1'/> | |
</channel> | |
<input type='tablet' bus='usb'> | |
<alias name='input0'/> | |
</input> | |
<input type='mouse' bus='ps2'/> | |
<input type='keyboard' bus='ps2'/> | |
<graphics type='vnc' port='5900' autoport='yes' listen='192.168.233.114' keymap='en-us'> | |
<listen type='address' address='192.168.233.114'/> | |
</graphics> | |
<video> | |
<model type='cirrus' vram='16384' heads='1'/> | |
<alias name='video0'/> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> | |
</video> | |
<memballoon model='virtio'> | |
<stats period='10'/> | |
<alias name='balloon0'/> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> | |
</memballoon> | |
</devices> | |
<seclabel type='dynamic' model='selinux' relabel='yes'> | |
<label>system_u:system_r:svirt_t:s0:c628,c875</label> | |
<imagelabel>system_u:object_r:svirt_image_t:s0:c628,c875</imagelabel> | |
</seclabel> | |
</domain> | |
[root@os4 ~]# brctl show | |
bridge name bridge id STP enabled interfaces | |
brosclu 8000.80ee73976c45 no bond0.33 | |
brosman 8000.80ee73976c45 no bond0 | |
brosmon 8000.80ee73976c45 no bond0.34 | |
brososd 8000.80ee73976c45 no bond0.35 | |
brostun 8000.80ee73976c45 no bond0.32 | |
brq77521675-9b 8000.80ee73976c45 no bond0.2 | |
tap43cc05f5-60 | |
####### login to instance | |
[root@os1 ~]# ssh cirros@192.168.236.14 | |
cirros@192.168.236.14's password: | |
$ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment