web-dev-qa-db-ja.com

Openstackインスタンスはインターネットにアクセスできません

MAASでランドスケープインストーラーを使用しました。 NeutronノードにSSHで接続すると、インターネットにpingできますが、インスタンスはできません。

ubuntu@nvcg:~$ ping google.com
PING google.com (216.58.223.14) 56(84) bytes of data.
From 10.10.0.1 icmp_seq=1 Destination Net Unreachable
From 10.10.0.1 icmp_seq=2 Destination Net Unreachable
From 10.10.0.1 icmp_seq=3 Destination Net Unreachable

インスタンスの/ etc/network/interfaces:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback

# Source interfaces
# Please check /etc/network/interfaces.d before changing this file
# as interfaces may have been defined in /etc/network/interfaces.d
# NOTE: the primary ethernet device is defined in
# /etc/network/interfaces.d/eth0
# See LP: #1262951
source /etc/network/interfaces.d/*.cfg
/etc/network/interfaces.d/eth0.cfg in Instance:

# The primary network interface
auto eth0
iface eth0 inet dhcp

NeutronノードのIPルートは、デフォルトゲートウェイがMAASコントローラーノード経由であることを示しています。

ubuntu@blue-drop:~$ ip route
default via 10.1.1.100 dev juju-br0 
10.0.3.0/24 dev lxcbr0  proto kernel  scope link  src 10.0.3.1 
10.1.1.0/24 dev juju-br0  proto kernel  scope link  src 10.1.1.152 

風景LXCからのjujuステータス中性子:

landscape@juju-machine-0-lxc-1:~$ juju status neutron-gateway
environment: "1"
machines:
  "0":
    agent-state: started
    agent-version: 1.25.6
    dns-name: blue-drop.maas
    instance-id: /MAAS/api/1.0/nodes/node-b76c3dca-5a50-11e6-8378-0cc47a2275d4/
    series: trusty
    hardware: Arch=AMD64 cpu-cores=24 mem=131072M tags=node-b76c3dca-5a50-11e6-8378-0cc47a2275d4
      availability-zone=default
    state-server-member-status: has-vote
services:
  landscape-client:
    charm: cs:trusty/landscape-client-14
    exposed: false
    service-status: {}
    relations:
      ceph-client:
      - ceph-mon
      container:
      - base-machine
      - ceilometer
      - ceph-mon
      - ceph-osd
      - ceph-radosgw
      - cinder
      - glance
      - glance-simplestreams-sync
      - keystone
      - mongodb
      - mysql
      - neutron-api
      - neutron-gateway
      - nova-cloud-controller
      - nova-compute-kvm
      - ntpmaster
      - openstack-dashboard
      - rabbitmq-server
    subordinate-to:
    - base-machine
    - ceilometer
    - ceph-mon
    - ceph-osd
    - ceph-radosgw
    - cinder
    - glance
    - glance-simplestreams-sync
    - keystone
    - mongodb
    - mysql
    - neutron-api
    - neutron-gateway
    - nova-cloud-controller
    - nova-compute-kvm
    - ntpmaster
    - openstack-dashboard
    - rabbitmq-server
  neutron-gateway:
    charm: cs:trusty/neutron-gateway-229
    can-upgrade-to: cs:trusty/neutron-gateway-230
    exposed: false
    service-status:
      current: active
      message: Unit is ready
      since: 21 Sep 2016 07:36:41Z
    relations:
      amqp:
      - rabbitmq-server
      cluster:
      - neutron-gateway
      juju-info:
      - landscape-client
      neutron-plugin-api:
      - neutron-api
      quantum-network-service:
      - nova-cloud-controller
    units:
      neutron-gateway/0:
        workload-status:
          current: active
          message: Unit is ready
          since: 21 Sep 2016 07:36:41Z
        agent-status:
          current: idle
          since: 21 Sep 2016 07:36:43Z
          version: 1.25.6
        agent-state: started
        agent-version: 1.25.6
        machine: "0"
        public-address: blue-drop.maas
        subordinates:
          landscape-client/3:
            workload-status:
              current: active
              message: System successfully registered
              since: 20 Sep 2016 07:25:58Z
            agent-status:
              current: idle
              since: 21 Sep 2016 07:36:45Z
              version: 1.25.6
            agent-state: started
            agent-version: 1.25.6
            upgrading-from: cs:trusty/landscape-client-14
            public-address: blue-drop.maas
networks:
  subnet-1:
    provider-id: subnet-1
    cidr: 172.26.0.0/22
  subnet-2:
    provider-id: subnet-2
    cidr: 10.1.1.0/24
  subnet-3:
    provider-id: subnet-3
    cidr: 192.168.122.0/24

neutronノードのifconfig:

ubuntu@blue-drop:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 0c:c4:7a:22:89:9c  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4940677 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5279006 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1477383852 (1.4 GB)  TX bytes:2890096642 (2.8 GB)
          Memory:c7120000-c7140000 

eth1      Link encap:Ethernet  HWaddr 0c:c4:7a:22:89:9d  
          inet6 addr: fe80::ec4:7aff:fe22:899d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:56379 errors:0 dropped:0 overruns:0 frame:0
          TX packets:372 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5587444 (5.5 MB)  TX bytes:45875 (45.8 KB)
          Memory:c7100000-c7120000 

juju-br0  Link encap:Ethernet  HWaddr 0c:c4:7a:22:89:9c  
          inet addr:10.1.1.152  Bcast:10.1.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ec4:7aff:fe22:899c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1739573 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1605712 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:550485072 (550.4 MB)  TX bytes:1694052911 (1.6 GB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:11853058 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11853058 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:6184581194 (6.1 GB)  TX bytes:6184581194 (6.1 GB)

lxcbr0    Link encap:Ethernet  HWaddr 16:3e:90:08:e6:6e  
          inet addr:10.0.3.1  Bcast:10.0.3.255  Mask:255.255.255.0
          inet6 addr: fe80::143e:90ff:fe08:e66e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:648 (648.0 B)

tap17f944be-8c Link encap:Ethernet  HWaddr 06:15:a8:c7:72:43  
          UP BROADCAST RUNNING MULTICAST  MTU:1458  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:648 (648.0 B)  TX bytes:262 (262.0 B)

tap2a05341c-57 Link encap:Ethernet  HWaddr da:ad:d8:d0:d5:32  
          UP BROADCAST RUNNING MULTICAST  MTU:1458  Metric:1
          RX packets:485 errors:0 dropped:0 overruns:0 frame:0
          TX packets:568 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:61839 (61.8 KB)  TX bytes:65210 (65.2 KB)

tap9799d51d-3f Link encap:Ethernet  HWaddr ba:ee:51:bb:19:51  
          UP BROADCAST RUNNING MULTICAST  MTU:1458  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:864 (864.0 B)  TX bytes:140 (140.0 B)

tapaf2b94ee-1b Link encap:Ethernet  HWaddr 1a:f7:3c:a1:57:a7  
          UP BROADCAST RUNNING MULTICAST  MTU:1458  Metric:1
          RX packets:335 errors:0 dropped:0 overruns:0 frame:0
          TX packets:53150 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:43105 (43.1 KB)  TX bytes:5254767 (5.2 MB)

tapf4edb36f-89 Link encap:Ethernet  HWaddr 26:18:93:ef:8a:4c  
          UP BROADCAST RUNNING MULTICAST  MTU:1458  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1874 (1.8 KB)  TX bytes:7328 (7.3 KB)

tapf97a3cfd-7f Link encap:Ethernet  HWaddr 16:62:97:43:da:26  
          UP BROADCAST RUNNING MULTICAST  MTU:1458  Metric:1
          RX packets:21 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52862 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1474 (1.4 KB)  TX bytes:5219352 (5.2 MB)

veth9GOBB0 Link encap:Ethernet  HWaddr fe:08:5b:e8:1e:2b  
          inet6 addr: fe80::fc08:5bff:fee8:1e2b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:469961 errors:0 dropped:0 overruns:0 frame:0
          TX packets:562703 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:95499097 (95.4 MB)  TX bytes:179705526 (179.7 MB)

vethQELJ2E Link encap:Ethernet  HWaddr fe:59:b7:41:18:3a  
          inet6 addr: fe80::fc59:b7ff:fe41:183a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2349669 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2490007 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1100476551 (1.1 GB)  TX bytes:747480935 (747.4 MB)

Neutronノードの/ etc/network/interfaces:

auto lo
iface lo inet loopback
    dns-nameservers 10.1.1.100
    dns-search maas
iface eth0 inet manual
auto juju-br0
iface juju-br0 inet static
    gateway 10.1.1.100
    address 10.1.1.152/24
    mtu 1500
    bridge_ports eth0
auto eth1
iface eth1 inet manual
    mtu 1500
source /etc/network/interfaces.d/*.cfg

Landscape - Networks

2
Imran Khakoo

これは、インストールのOVS構成ステップでゲートウェイおよびCIDRの誤った構成であることが判明しました。

ネットワークは172.26.1.0/22であるはずだったときに172.26.0.0/24に設定されていたため、既存のネットワークと衝突していました。

管理者の資格情報を取得してサブネットを更新し、外部ネットワークサブネットのゲートウェイが設定されていないことにも気付きました。これが設定されると、インスタンスはネットワーク接続を受信しました。

2
Imran Khakoo