分享

openstack【juno】入门 【总结篇】二十七:openstack排除故障及常见问题记录

pig2 发表于 2015-2-26 13:26:20 [显示全部楼层] 只看大图 回帖奖励 阅读模式 关闭右栏 3 58986
本帖最后由 pig2 于 2015-2-26 17:32 编辑

问题导读

1.如何使用neutron命令?
2.如何查看具体某个命令的参数解释?
3.如何查看ovs创建网桥







创建实例失败:
首先用下面命令查看服务是否正常
  1. nova-manage service list
复制代码
如果不正常,则使用下面命令重启,如果还不行,则查看日志,

  1. service nova-api restart
  2. service nova-cert restart
  3. service nova-consoleauth restart
  4. service nova-scheduler restart
  5. service nova-conductor restart
  6. service nova-novncproxy restart
复制代码



对网络的判断:


可以查看网桥
  1. ovs-vsctl show
复制代码
1.png
如果不会使用ovs,则可以使用
  1. ovs-vsctl  --help
复制代码
如果看不懂,则查看openstack Juno neutron必读系列文章:

网络流量查看:
  1. udhcpc eth0
复制代码


neutron命令的使用

  1. neutron --help
复制代码
会输出很多内容


  1. --version             show program's version number and exit
  2.   -v, --verbose, --debug
  3.                         Increase verbosity of output and show tracebacks on
  4.                         errors. You can repeat this option.
  5.   -q, --quiet           Suppress output except warnings and errors.
  6.   -h, --help            Show this help message and exit.
  7.   -r NUM, --retries NUM
  8.                         How many times the request to the Neutron server
  9.                         should be retried if it fails.
  10.   --os-service-type <os-service-type>
  11.                         Defaults to env[OS_NETWORK_SERVICE_TYPE] or network.
  12.   --os-endpoint-type <os-endpoint-type>
  13.                         Defaults to env[OS_ENDPOINT_TYPE] or publicURL.
  14.   --service-type <service-type>
  15.                         DEPRECATED! Use --os-service-type.
  16.   --endpoint-type <endpoint-type>
  17.                         DEPRECATED! Use --os-endpoint-type.
  18.   --os-auth-strategy <auth-strategy>
  19.                         DEPRECATED! Only keystone is supported.
  20.   --os-auth-url <auth-url>
  21.                         Authentication URL, defaults to env[OS_AUTH_URL].
  22.   --os-tenant-name <auth-tenant-name>
  23.                         Authentication tenant name, defaults to
  24.                         env[OS_TENANT_NAME].
  25.   --os-project-name <auth-project-name>
  26.                         Another way to specify tenant name. This option is
  27.                         mutually exclusive with --os-tenant-name. Defaults to
  28.                         env[OS_PROJECT_NAME].
  29.   --os-tenant-id <auth-tenant-id>
  30.                         Authentication tenant ID, defaults to
  31.                         env[OS_TENANT_ID].
  32.   --os-project-id <auth-project-id>
  33.                         Another way to specify tenant ID. This option is
  34.                         mutually exclusive with --os-tenant-id. Defaults to
  35.                         env[OS_PROJECT_ID].
  36.   --os-username <auth-username>
  37.                         Authentication username, defaults to env[OS_USERNAME].
  38.   --os-user-id <auth-user-id>
  39.                         Authentication user ID (Env: OS_USER_ID)
  40.   --os-user-domain-id <auth-user-domain-id>
  41.                         OpenStack user domain ID. Defaults to
  42.                         env[OS_USER_DOMAIN_ID].
  43.   --os-user-domain-name <auth-user-domain-name>
  44.                         OpenStack user domain name. Defaults to
  45.                         env[OS_USER_DOMAIN_NAME].
  46.   --os-project-domain-id <auth-project-domain-id>
  47.                         Defaults to env[OS_PROJECT_DOMAIN_ID].
  48.   --os-project-domain-name <auth-project-domain-name>
  49.                         Defaults to env[OS_PROJECT_DOMAIN_NAME].
  50.   --os-cert <certificate>
  51.                         Path of certificate file to use in SSL connection.
  52.                         This file can optionally be prepended with the private
  53.                         key. Defaults to env[OS_CERT].
  54.   --os-cacert <ca-certificate>
  55.                         Specify a CA bundle file to use in verifying a TLS
  56.                         (https) server certificate. Defaults to
  57.                         env[OS_CACERT].
  58.   --os-key <key>        Path of client key to use in SSL connection. This
  59.                         option is not necessary if your key is prepended to
  60.                         your certificate file. Defaults to env[OS_KEY].
  61.   --os-password <auth-password>
  62.                         Authentication password, defaults to env[OS_PASSWORD].
  63.   --os-region-name <auth-region-name>
  64.                         Authentication region name, defaults to
  65.                         env[OS_REGION_NAME].
  66.   --os-token <token>    Authentication token, defaults to env[OS_TOKEN].
  67.   --http-timeout <seconds>
  68.                         Timeout in seconds to wait for an HTTP response.
  69.                         Defaults to env[OS_NETWORK_TIMEOUT] or None if not
  70.                         specified.
  71.   --os-url <url>        Defaults to env[OS_URL].
  72.   --insecure            Explicitly allow neutronclient to perform "insecure"
  73.                         SSL (https) requests. The server's certificate will
  74.                         not be verified against any certificate authorities.
  75.                         This option should be used with caution.
  76. Commands for API v2.0:
  77.   agent-delete                   Delete a given agent.
  78.   agent-list                     List agents.
  79.   agent-show                     Show information of a given agent.
  80.   agent-update                   Update a given agent.
  81.   cisco-credential-create        Creates a credential.
  82.   cisco-credential-delete        Delete a  given credential.
  83.   cisco-credential-list          List credentials that belong to a given tenant.
  84.   cisco-credential-show          Show information of a given credential.
  85.   cisco-network-profile-create   Creates a network profile.
  86.   cisco-network-profile-delete   Delete a given network profile.
  87.   cisco-network-profile-list     List network profiles that belong to a given tenant.
  88.   cisco-network-profile-show     Show information of a given network profile.
  89.   cisco-network-profile-update   Update network profile's information.
  90.   cisco-policy-profile-list      List policy profiles that belong to a given tenant.
  91.   cisco-policy-profile-show      Show information of a given policy profile.
  92.   cisco-policy-profile-update    Update policy profile's information.
  93.   complete                       print bash completion command
  94.   dhcp-agent-list-hosting-net    List DHCP agents hosting a network.
  95.   dhcp-agent-network-add         Add a network to a DHCP agent.
  96.   dhcp-agent-network-remove      Remove a network from a DHCP agent.
  97.   ext-list                       List all extensions.
  98.   ext-show                       Show information of a given resource.
  99.   firewall-create                Create a firewall.
  100.   firewall-delete                Delete a given firewall.
  101.   firewall-list                  List firewalls that belong to a given tenant.
  102.   firewall-policy-create         Create a firewall policy.
  103.   firewall-policy-delete         Delete a given firewall policy.
  104.   firewall-policy-insert-rule    Insert a rule into a given firewall policy.
  105.   firewall-policy-list           List firewall policies that belong to a given tenant.
  106.   firewall-policy-remove-rule    Remove a rule from a given firewall policy.
  107.   firewall-policy-show           Show information of a given firewall policy.
  108.   firewall-policy-update         Update a given firewall policy.
  109.   firewall-rule-create           Create a firewall rule.
  110.   firewall-rule-delete           Delete a given firewall rule.
  111.   firewall-rule-list             List firewall rules that belong to a given tenant.
  112.   firewall-rule-show             Show information of a given firewall rule.
  113.   firewall-rule-update           Update a given firewall rule.
  114.   firewall-show                  Show information of a given firewall.
  115.   firewall-update                Update a given firewall.
  116.   floatingip-associate           Create a mapping between a floating IP and a fixed IP.
  117.   floatingip-create              Create a floating IP for a given tenant.
  118.   floatingip-delete              Delete a given floating IP.
  119.   floatingip-disassociate        Remove a mapping from a floating IP to a fixed IP.
  120.   floatingip-list                List floating IPs that belong to a given tenant.
  121.   floatingip-show                Show information of a given floating IP.
  122.   gateway-device-create          Create a network gateway device.
  123.   gateway-device-delete          Delete a given network gateway device.
  124.   gateway-device-list            List network gateway devices for a given tenant.
  125.   gateway-device-show            Show information for a given network gateway device.
  126.   gateway-device-update          Update a network gateway device.
  127.   help                           print detailed help for another command
  128.   ipsec-site-connection-create   Create an IPsec site connection.
  129.   ipsec-site-connection-delete   Delete a given IPsec site connection.
  130.   ipsec-site-connection-list     List IPsec site connections that belong to a given tenant.
  131.   ipsec-site-connection-show     Show information of a given IPsec site connection.
  132.   ipsec-site-connection-update   Update a given IPsec site connection.
  133.   l3-agent-list-hosting-router   List L3 agents hosting a router.
  134.   l3-agent-router-add            Add a router to a L3 agent.
  135.   l3-agent-router-remove         Remove a router from a L3 agent.
  136.   lb-agent-hosting-pool          Get loadbalancer agent hosting a pool.
  137.   lb-healthmonitor-associate     Create a mapping between a health monitor and a pool.
  138.   lb-healthmonitor-create        Create a healthmonitor.
  139.   lb-healthmonitor-delete        Delete a given healthmonitor.
  140.   lb-healthmonitor-disassociate  Remove a mapping from a health monitor to a pool.
  141.   lb-healthmonitor-list          List healthmonitors that belong to a given tenant.
  142.   lb-healthmonitor-show          Show information of a given healthmonitor.
  143.   lb-healthmonitor-update        Update a given healthmonitor.
  144.   lb-member-create               Create a member.
  145.   lb-member-delete               Delete a given member.
  146.   lb-member-list                 List members that belong to a given tenant.
  147.   lb-member-show                 Show information of a given member.
  148.   lb-member-update               Update a given member.
  149.   lb-pool-create                 Create a pool.
  150.   lb-pool-delete                 Delete a given pool.
  151.   lb-pool-list                   List pools that belong to a given tenant.
  152.   lb-pool-list-on-agent          List the pools on a loadbalancer agent.
  153.   lb-pool-show                   Show information of a given pool.
  154.   lb-pool-stats                  Retrieve stats for a given pool.
  155.   lb-pool-update                 Update a given pool.
  156.   lb-vip-create                  Create a vip.
  157.   lb-vip-delete                  Delete a given vip.
  158.   lb-vip-list                    List vips that belong to a given tenant.
  159.   lb-vip-show                    Show information of a given vip.
  160.   lb-vip-update                  Update a given vip.
  161.   meter-label-create             Create a metering label for a given tenant.
  162.   meter-label-delete             Delete a given metering label.
  163.   meter-label-list               List metering labels that belong to a given tenant.
  164.   meter-label-rule-create        Create a metering label rule for a given label.
  165.   meter-label-rule-delete        Delete a given metering label.
  166.   meter-label-rule-list          List metering labels that belong to a given label.
  167.   meter-label-rule-show          Show information of a given metering label rule.
  168.   meter-label-show               Show information of a given metering label.
  169.   nec-packet-filter-create       Create a packet filter for a given tenant.
  170.   nec-packet-filter-delete       Delete a given packet filter.
  171.   nec-packet-filter-list         List packet filters that belong to a given tenant.
  172.   nec-packet-filter-show         Show information of a given packet filter.
  173.   nec-packet-filter-update       Update packet filter's information.
  174.   net-create                     Create a network for a given tenant.
  175.   net-delete                     Delete a given network.
  176.   net-external-list              List external networks that belong to a given tenant.
  177.   net-gateway-connect            Add an internal network interface to a router.
  178.   net-gateway-create             Create a network gateway.
  179.   net-gateway-delete             Delete a given network gateway.
  180.   net-gateway-disconnect         Remove a network from a network gateway.
  181.   net-gateway-list               List network gateways for a given tenant.
  182.   net-gateway-show               Show information of a given network gateway.
  183.   net-gateway-update             Update the name for a network gateway.
  184.   net-list                       List networks that belong to a given tenant.
  185.   net-list-on-dhcp-agent         List the networks on a DHCP agent.
  186.   net-show                       Show information of a given network.
  187.   net-update                     Update network's information.
  188.   nuage-netpartition-create      Create a netpartition for a given tenant.
  189.   nuage-netpartition-delete      Delete a given netpartition.
  190.   nuage-netpartition-list        List netpartitions that belong to a given tenant.
  191.   nuage-netpartition-show        Show information of a given netpartition.
  192.   port-create                    Create a port for a given tenant.
  193.   port-delete                    Delete a given port.
  194.   port-list                      List ports that belong to a given tenant.
  195.   port-show                      Show information of a given port.
  196.   port-update                    Update port's information.
  197.   queue-create                   Create a queue.
  198.   queue-delete                   Delete a given queue.
  199.   queue-list                     List queues that belong to a given tenant.
  200.   queue-show                     Show information of a given queue.
  201.   quota-delete                   Delete defined quotas of a given tenant.
  202.   quota-list                     List quotas of all tenants who have non-default quota values.
  203.   quota-show                     Show quotas of a given tenant.
  204.   quota-update                   Define tenant's quotas not to use defaults.
  205.   router-create                  Create a router for a given tenant.
  206.   router-delete                  Delete a given router.
  207.   router-gateway-clear           Remove an external network gateway from a router.
  208.   router-gateway-set             Set the external network gateway for a router.
  209.   router-interface-add           Add an internal network interface to a router.
  210.   router-interface-delete        Remove an internal network interface from a router.
  211.   router-list                    List routers that belong to a given tenant.
  212.   router-list-on-l3-agent        List the routers on a L3 agent.
  213.   router-port-list               List ports that belong to a given tenant, with specified router.
  214.   router-show                    Show information of a given router.
  215.   router-update                  Update router's information.
  216.   security-group-create          Create a security group.
  217.   security-group-delete          Delete a given security group.
  218.   security-group-list            List security groups that belong to a given tenant.
  219.   security-group-rule-create     Create a security group rule.
  220.   security-group-rule-delete     Delete a given security group rule.
  221.   security-group-rule-list       List security group rules that belong to a given tenant.
  222.   security-group-rule-show       Show information of a given security group rule.
  223.   security-group-show            Show information of a given security group.
  224.   security-group-update          Update a given security group.
  225.   service-provider-list          List service providers.
  226.   subnet-create                  Create a subnet for a given tenant.
  227.   subnet-delete                  Delete a given subnet.
  228.   subnet-list                    List subnets that belong to a given tenant.
  229.   subnet-show                    Show information of a given subnet.
  230.   subnet-update                  Update subnet's information.
  231.   vpn-ikepolicy-create           Create an IKE policy.
  232.   vpn-ikepolicy-delete           Delete a given IKE policy.
  233.   vpn-ikepolicy-list             List IKE policies that belong to a tenant.
  234.   vpn-ikepolicy-show             Show information of a given IKE policy.
  235.   vpn-ikepolicy-update           Update a given IKE policy.
  236.   vpn-ipsecpolicy-create         Create an IPsec policy.
  237.   vpn-ipsecpolicy-delete         Delete a given IPsec policy.
  238.   vpn-ipsecpolicy-list           List ipsecpolicies that belongs to a given tenant connection.
  239.   vpn-ipsecpolicy-show           Show information of a given IPsec policy.
  240.   vpn-ipsecpolicy-update         Update a given IPsec policy.
  241.   vpn-service-create             Create a VPN service.
  242.   vpn-service-delete             Delete a given VPN service.
  243.   vpn-service-list               List VPN service configurations that belong to a given tenant.
  244.   vpn-service-show               Show information of a given VPN service.
  245.   vpn-service-update             Update a given VPN service.
复制代码
关键这些命令该如何使用:
例如我们想查看网络
  1. neutron net-list
复制代码
2.png

如果我们查看某个特定的信息,则使用show命令
比如我们想查看上述网络的 demo-net具体信息。其他的依次类推

  1. neutron net-show  demo-net
复制代码
3.png


而有些比较复杂,比如我们想删除路由的某个端口,
我们不知道后面跟什么参数,只看到了命令,该如何处理
  1. router-interface-delete
复制代码


使用下面命令
  1. neutron  router-interface-delete --help
复制代码


列出下面参数:
也就是需要一个路由的id,以及SUBNET|subnet=SUBNET|port=PORT这些参数都是可以的
  1. usage: neutron router-interface-delete [-h] [--request-format {json,xml}]
  2.                                        router-id INTERFACE
  3. Remove an internal network interface from a router.
  4. positional arguments:
  5.   router-id             ID of the router.
  6.   INTERFACE             The format is "SUBNET|subnet=SUBNET|port=PORT". Either
  7.                         a subnet or port must be specified. Both ID and name
  8.                         are accepted as SUBNET or PORT. Note that "subnet="
  9.                         can be omitted when specifying a subnet.
  10. optional arguments:
  11.   -h, --help            show this help message and exit
  12.   --request-format {json,xml}
  13.                         The XML or JSON request format.
复制代码


4.png


这样我们根据英文含义及参数详细信息,就会使用neutron的命令了






相关内容:

openstack【juno】入门 【准备篇】零:整体介绍

openstack【juno】入门 【准备篇】一: Ubuntu14.04远程连接(ssh安装)

openstack【juno】入门 【准备篇】二::NTP安装

openstack【juno】入门 【准备篇】三:mysql(MariaDB)安装

openstack【juno】入门 【准备篇】四::RabbitMQ 安装

openstack【juno】入门 【keystone篇】五::Keystone部署及介绍

openstack【juno】入门 【keystone篇】六::Keystone使用及遇到问题解决办法

openstack【juno】入门 【keystone篇】七:创建 service entity 和 API endpoint

openstack【juno】入门 【keystone篇】八:新手操作篇(验证操作篇)

openstack【juno】入门 【keystone篇】九:创建openstack客户端环境变量脚本

openstack【juno】入门 【glance 篇】十:glance初步介绍

openstack【juno】入门 【glance 篇】十一:glance安装配置

openstack【juno】入门 【glance 篇】十二:glance安装配置验证及相关操作

openstack【juno】入门 【nova 篇】十三(1):nova简单介绍

openstack【juno】入门 【nova 篇】十三(2):安装配置计算服务

openstack【juno】入门 【网络篇】十四:neutron介绍

openstack【juno】入门 【网络篇】十五:neutron安装部署(控制节点)

openstack【juno】入门 【网络篇】十六:neutron安装部署(网络节点)

openstack【juno】入门 【网络篇】十七:neutron安装部署(计算节点)

openstack【juno】入门 【网络篇】十八:创建实例化网络

openstack【juno】入门 【dashboard篇】十九:添加dashboard

openstack【juno】入门 【cinder篇】二十:cinder介绍及安装配置【控制节点】

openstack【juno】入门 【cinder篇】二十一:安装配置块存储节点(cinder)

openstack【juno】入门 【swift篇】二十二:对象存储安装配置【控制节点】

openstack【juno】入门 【swift篇】二十三:安装配置swift节点

openstack【juno】入门 【swift篇】二十四:创建初始rings

openstack【juno】入门 【swift篇】二十五:验证安装(控制节点)

openstack【juno】入门 【实例篇】二十六:创建实例(neutron)

openstack【juno】入门 【总结篇】二十七:openstack排除故障及常见问题记录

openstack【juno】入门 【总结篇】二十八:keystone及网络总结


已有(3)人评论

跳转到指定楼层
贪吃的奶酪 发表于 2015-4-28 18:52:31
ERROR neutron.plugins.openvswitch.agent.ovs_neutron_agent [-] Tunneling cannot be enabled without a valid local_ip 请问版主这是怎么回事啊
回复

使用道具 举报

jixianqiuxue 发表于 2015-4-28 22:55:37
贪吃的奶酪 发表于 2015-4-28 18:52
ERROR neutron.plugins.openvswitch.agent.ovs_neutron_agent [-] Tunneling cannot be enabled without a  ...


/etc/neutron/plugins/ml2/ml2_conf.ini


[ovs]
...
local_ip =  10.0.1.31
enable_tunneling = True
ip地址是否配置网络配置在这三篇中,找到对应的local_ip = 10.0.1.31看配置是否正确
openstack【juno】入门 【网络篇】十五:neutron安装部署(控制节点)


openstack【juno】入门 【网络篇】十六:neutron安装部署(网络节点)

openstack【juno】入门 【网络篇】十七:neutron安装部署(计算节点)

回复

使用道具 举报

贪吃的奶酪 发表于 2015-4-29 09:18:28
非常感谢版主的帮助
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条