【问题标题】:Installation via openstack (yoga) ansible fail通过 openstack (yoga) 安装 ansible 失败
【发布时间】:2022-08-23 03:39:56
【问题描述】:

我正在 4 台计算机上测试 openstack:1 台部署,3 台主机。

3 台主机各有 2 个网卡,一个用于与 lan 的连接,另一个仅用于 openstack,这意味着例如 enp2s0 在 dhcp 172.16.0.1/12 (lan) 上,enp3s0 仅是 openstack(请参阅配置下面的每台机器)。它被配置为 enp3s0 上的单一 nic 样式。

部署计算机带有一个网卡。没有添加具体配置。

根据设置手册,我要做的第一件事是openstack-ansible setup-hosts.yml,完成没有任何问题。然后我执行openstack-ansible setup-infrastructure.yml,它在任务Get list of repo packages 处崩溃。

Ansible 给出这个原因: fatal: [infra1_utility_container-4c9c698c]: FAILED! => {\"changed\": false, \"content\": \"\", \"elapsed\": 0, \"msg\": \"Status code was -1 and not [200]: Request failed: <urlopen error [Errno 111] Connection refused>\", \"redirected\": false, \"status\": -1, \"url\": \"http://172.29.236.11:8181/constraints/upper_constraints_cached.txt\"}

我不明白为什么与实用程序容器的连接消失了。我在infra计算机上,这个容器被启动了,iptables默认是在接受的。我不知道什么是错的。

这是使用的用户配置:

---
cidr_networks:
  container: 172.29.236.0/22
  tunnel: 172.29.240.0/22
  storage: 172.29.244.0/22

used_ips:
  - \"172.29.236.1,172.29.236.50\"
  - \"172.29.240.1,172.29.240.50\"
  - \"172.29.244.1,172.29.244.50\"
  - \"172.29.248.1,172.29.248.50\"

global_overrides:
  # The internal and external VIP should be different IPs, however they
  # do not need to be on separate networks.
  external_lb_vip_address: 172.29.236.11
  internal_lb_vip_address: 172.29.236.11
  management_bridge: \"br-mgmt\"
  provider_networks:
    - network:
        container_bridge: \"br-mgmt\"
        container_type: \"veth\"
        container_interface: \"eth1\"
        ip_from_q: \"container\"
        type: \"raw\"
        group_binds:
          - all_containers
          - hosts
        is_container_address: true
    - network:
        container_bridge: \"br-vxlan\"
        container_type: \"veth\"
        container_interface: \"eth10\"
        ip_from_q: \"tunnel\"
        type: \"vxlan\"
        range: \"1:1000\"
        net_name: \"vxlan\"
        group_binds:
          - neutron_linuxbridge_agent
    - network:
        container_bridge: \"br-vlan\"
        container_type: \"veth\"
        container_interface: \"eth12\"
        host_bind_override: \"eth12\"
        type: \"flat\"
        net_name: \"flat\"
        group_binds:
          - neutron_linuxbridge_agent
    - network:
        container_bridge: \"br-vlan\"
        container_type: \"veth\"
        container_interface: \"eth11\"
        type: \"vlan\"
        range: \"101:200,301:400\"
        net_name: \"vlan\"
        group_binds:
          - neutron_linuxbridge_agent
    - network:
        container_bridge: \"br-storage\"
        container_type: \"veth\"
        container_interface: \"eth2\"
        ip_from_q: \"storage\"
        type: \"raw\"
        group_binds:
          - glance_api
          - cinder_api
          - cinder_volume
          - nova_compute

###
### Infrastructure
###

# galera, memcache, rabbitmq, utility
shared-infra_hosts:
  infra1:
    ip: 172.29.236.11

# repository (apt cache, python packages, etc)
repo-infra_hosts:
  infra1:
    ip: 172.29.236.11
    
os-infra_hosts:
  infra1:
    ip: 172.29.236.11

# load balancer
# haproxy_hosts:
  # infra1:
    # ip: 172.29.236.11

###
### OpenStack
###

# keystone
identity_hosts:
  infra1:
    ip: 172.29.236.11

# cinder api services
storage-infra_hosts:
  infra1:
    ip: 172.29.236.11

# glance
image_hosts:
  infra1:
    ip: 172.29.236.11

# placement
placement-infra_hosts:
  infra1:
    ip: 172.29.236.11

# nova api, conductor, etc services
compute-infra_hosts:
  infra1:
    ip: 172.29.236.11

# heat
orchestration_hosts:
  infra1:
    ip: 172.29.236.11

# horizon
dashboard_hosts:
  infra1:
    ip: 172.29.236.11

# neutron server, agents (L3, etc)
network_hosts:
  infra1:
    ip: 172.29.236.11

# nova hypervisors
compute_hosts:
  compute1:
    ip: 172.29.236.12

# cinder storage host (LVM-backed)
storage_hosts:
  storage1:
    ip: 172.29.244.18
    container_vars:
      cinder_backends:
        limit_container_types: cinder_volume
        lvm:
          volume_group: cinder-volumes
          volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver
          volume_backend_name: LVM_iSCSI
          iscsi_ip_address: \"172.29.244.18\"

基础计算机网络配置:

auto enp3s0
iface enp3s0 inet manual

# Container/Host management VLAN interface
auto enp3s0.10
iface enp3s0.10 inet manual
    vlan-raw-device enp3s0

# OpenStack Networking VXLAN (tunnel/overlay) VLAN interface
auto enp3s0.30
iface enp3s0.30 inet manual
    vlan-raw-device enp3s0

# Storage network VLAN interface (optional)
auto enp3s0.20
iface enp3s0.20 inet manual
    vlan-raw-device enp3s0

# Container/Host management bridge
auto br-mgmt
iface br-mgmt inet static
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports enp3s0.10
    address 172.29.236.11
    netmask 255.255.252.0
#    gateway 172.29.236.1
    dns-nameservers 8.8.8.8 8.8.4.4

# OpenStack Networking VXLAN (tunnel/overlay) bridge
#
# Nodes hosting Neutron agents must have an IP address on this interface,
# including COMPUTE, NETWORK, and collapsed INFRA/NETWORK nodes.
#

auto br-vxlan
iface br-vxlan inet static
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports enp3s0.30
    address 172.29.240.16
    netmask 255.255.252.0

# OpenStack Networking VLAN bridge
#
# The \"br-vlan\" bridge is no longer necessary for deployments unless Neutron
# agents are deployed in a container. Instead, a direct interface such as
# enp3s0 can be specified via the \"host_bind_override\" override when defining
# provider networks.
#
#auto br-vlan
#iface br-vlan inet manual
#    bridge_stp off
#    bridge_waitport 0
#    bridge_fd 0
#    bridge_ports enp3s0

# compute1 Network VLAN bridge
#auto br-vlan
#iface br-vlan inet manual
#    bridge_stp off
#    bridge_waitport 0
#    bridge_fd 0
#

# Storage bridge (optional)
#
# Only the COMPUTE and STORAGE nodes must have an IP address
# on this bridge. When used by infrastructure nodes, the
# IP addresses are assigned to containers which use this
# bridge.
#
auto br-storage
iface br-storage inet manual
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports enp3s0.20

# compute1 Storage bridge
#auto br-storage
#iface br-storage inet static
#    bridge_stp off
#    bridge_waitport 0
#    bridge_fd 0
#    bridge_ports enp3s0.20
#    address 172.29.244.16
#    netmask 255.255.252.0

计算计算机网络配置:

auto enp3s0
iface enp3s0 inet manual

# Container/Host management VLAN interface
auto enp3s0.10
iface enp3s0.10 inet manual
    vlan-raw-device enp3s0

# OpenStack Networking VXLAN (tunnel/overlay) VLAN interface
auto enp3s0.30
iface enp3s0.30 inet manual
    vlan-raw-device enp3s0

# Storage network VLAN interface (optional)
auto enp3s0.20
iface enp3s0.20 inet manual
    vlan-raw-device enp3s0

# Container/Host management bridge
auto br-mgmt
iface br-mgmt inet static
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports enp3s0.10
    address 172.29.236.12
    netmask 255.255.252.0
#    gateway 172.29.236.1
    dns-nameservers 8.8.8.8 8.8.4.4

# OpenStack Networking VXLAN (tunnel/overlay) bridge
#
# Nodes hosting Neutron agents must have an IP address on this interface,
# including COMPUTE, NETWORK, and collapsed INFRA/NETWORK nodes.
#

auto br-vxlan
iface br-vxlan inet static
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports enp3s0.30
    address 172.29.240.17
    netmask 255.255.252.0

# OpenStack Networking VLAN bridge
#
# The \"br-vlan\" bridge is no longer necessary for deployments unless Neutron
# agents are deployed in a container. Instead, a direct interface such as
# bond0 can be specified via the \"host_bind_override\" override when defining
# provider networks.
#
#auto br-vlan
#iface br-vlan inet manual
#    bridge_stp off
#    bridge_waitport 0
#    bridge_fd 0
#    bridge_ports bond0

# compute1 Network VLAN bridge
#auto br-vlan
#iface br-vlan inet manual
#    bridge_stp off
#    bridge_waitport 0
#    bridge_fd 0
#

# Storage bridge (optional)
#
# Only the COMPUTE and STORAGE nodes must have an IP address
# on this bridge. When used by infrastructure nodes, the
# IP addresses are assigned to containers which use this
# bridge.
#
#auto br-storage
#iface br-storage inet manual
#    bridge_stp off
#    bridge_waitport 0
#    bridge_fd 0
#    bridge_ports bond0.20

# compute1 Storage bridge
auto br-storage
iface br-storage inet static
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports enp3s0.20
    address 172.29.244.17
    netmask 255.255.252.0

存储计算机网络配置:

auto enp2s0
iface enp2s0 inet manual

# Container/Host management VLAN interface
auto enp2s0.10
iface enp2s0.10 inet manual
    vlan-raw-device enp2s0

# OpenStack Networking VXLAN (tunnel/overlay) VLAN interface
auto enp2s0.30
iface enp2s0.30 inet manual
    vlan-raw-device enp2s0

# Storage network VLAN interface (optional)
auto enp2s0.20
iface enp2s0.20 inet manual
    vlan-raw-device enp2s0

# Container/Host management bridge
auto br-mgmt
iface br-mgmt inet static
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports enp2s0.10
    address 172.29.236.13
    netmask 255.255.252.0
#    gateway 172.16.0.1
    dns-nameservers 8.8.8.8 8.8.4.4

# OpenStack Networking VXLAN (tunnel/overlay) bridge
#
# Nodes hosting Neutron agents must have an IP address on this interface,
# including COMPUTE, NETWORK, and collapsed INFRA/NETWORK nodes.
#

auto br-vxlan
iface br-vxlan inet static
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports enp2s0.30
    address 172.29.240.18
    netmask 255.255.252.0

# OpenStack Networking VLAN bridge
#
# The \"br-vlan\" bridge is no longer necessary for deployments unless Neutron
# agents are deployed in a container. Instead, a direct interface such as
# enp2s0 can be specified via the \"host_bind_override\" override when defining
# provider networks.
#
#auto br-vlan
#iface br-vlan inet manual
#    bridge_stp off
#    bridge_waitport 0
#    bridge_fd 0
#    bridge_ports enp2s0

# compute1 Network VLAN bridge
#auto br-vlan
#iface br-vlan inet manual
#    bridge_stp off
#    bridge_waitport 0
#    bridge_fd 0
#

# Storage bridge (optional)
#
# Only the COMPUTE and STORAGE nodes must have an IP address
# on this bridge. When used by infrastructure nodes, the
# IP addresses are assigned to containers which use this
# bridge.
#
#auto br-storage
#iface br-storage inet manual
#    bridge_stp off
#    bridge_waitport 0
#    bridge_fd 0
#    bridge_ports enp2s0.20

# compute1 Storage bridge
auto br-storage
iface br-storage inet static
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports enp2s0.20
    address 172.29.244.18
    netmask 255.255.252.0

    标签: networking ansible openstack lxc


    【解决方案1】:

    该错误意味着即使实用程序容器正在运行,repo 服务器在 172.29.236.11:8181 也不可用。

    我遇到了同样的错误,结果证明我的一些网络掩码不正确。请仔细检查 /etc/openstack_deploy/user_variables.yml 和 /etc/openstack_deploy/openstack_user_config.yml 中的 CIDR 设置!在线示例中的一些默认设置非常疯狂。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-05-29
      • 1970-01-01
      • 2023-03-14
      • 1970-01-01
      • 2020-03-28
      • 2013-08-16
      • 2017-05-02
      • 1970-01-01
      相关资源
      最近更新 更多