验证操作

验证计算服务的运行。

注意

在控制器节点上执行以下命令。

  1. 激活 admin 凭证以访问仅管理员可用的 CLI 命令

    $ . admin-openrc
    
  2. 列出服务组件,以验证每个进程是否成功启动和注册

    $ openstack compute service list
    
    +----+--------------------+------------+----------+---------+-------+----------------------------+
    | Id | Binary             | Host       | Zone     | Status  | State | Updated At                 |
    +----+--------------------+------------+----------+---------+-------+----------------------------+
    |  1 | nova-scheduler     | controller | internal | enabled | up    | 2016-02-09T23:11:15.000000 |
    |  2 | nova-conductor     | controller | internal | enabled | up    | 2016-02-09T23:11:16.000000 |
    |  3 | nova-compute       | compute1   | nova     | enabled | up    | 2016-02-09T23:11:20.000000 |
    +----+--------------------+------------+----------+---------+-------+----------------------------+
    

    注意

    输出应指示在控制器节点上启用了两个服务组件,并在计算节点上启用了单个服务组件。

  3. 列出身份服务中的 API 端点,以验证与身份服务的连接。

    注意

    以下端点列表可能因 OpenStack 组件的安装而异。

    $ openstack catalog list
    
    +-----------+-----------+-----------------------------------------+
    | Name      | Type      | Endpoints                               |
    +-----------+-----------+-----------------------------------------+
    | keystone  | identity  | RegionOne                               |
    |           |           |   public: http://controller:5000/v3/    |
    |           |           | RegionOne                               |
    |           |           |   internal: http://controller:5000/v3/  |
    |           |           | RegionOne                               |
    |           |           |   admin: http://controller:5000/v3/     |
    |           |           |                                         |
    | glance    | image     | RegionOne                               |
    |           |           |   admin: http://controller:9292         |
    |           |           | RegionOne                               |
    |           |           |   public: http://controller:9292        |
    |           |           | RegionOne                               |
    |           |           |   internal: http://controller:9292      |
    |           |           |                                         |
    | nova      | compute   | RegionOne                               |
    |           |           |   admin: http://controller:8774/v2.1    |
    |           |           | RegionOne                               |
    |           |           |   internal: http://controller:8774/v2.1 |
    |           |           | RegionOne                               |
    |           |           |   public: http://controller:8774/v2.1   |
    |           |           |                                         |
    | placement | placement | RegionOne                               |
    |           |           |   public: http://controller:8778        |
    |           |           | RegionOne                               |
    |           |           |   admin: http://controller:8778         |
    |           |           | RegionOne                               |
    |           |           |   internal: http://controller:8778      |
    |           |           |                                         |
    +-----------+-----------+-----------------------------------------+
    

    注意

    忽略此输出中的任何警告。

  4. 列出镜像服务中的镜像,以验证与镜像服务的连接。

    $ openstack image list
    
    +--------------------------------------+-------------+-------------+
    | ID                                   | Name        | Status      |
    +--------------------------------------+-------------+-------------+
    | 9a76d9f9-9620-4f2e-8c69-6c5691fae163 | cirros      | active      |
    +--------------------------------------+-------------+-------------+
    
  5. 检查 cells 和 placement API 是否正常工作,以及其他必要的先决条件是否就位。

    # nova-status upgrade check
    
    +--------------------------------------------------------------------+
    | Upgrade Check Results                                              |
    +--------------------------------------------------------------------+
    | Check: Cells v2                                                    |
    | Result: Success                                                    |
    | Details: None                                                      |
    +--------------------------------------------------------------------+
    | Check: Placement API                                               |
    | Result: Success                                                    |
    | Details: None                                                      |
    +--------------------------------------------------------------------+
    | Check: Cinder API                                                  |
    | Result: Success                                                    |
    | Details: None                                                      |
    +--------------------------------------------------------------------+
    | Check: Policy File JSON to YAML Migration                          |
    | Result: Success                                                    |
    | Details: None                                                      |
    +--------------------------------------------------------------------+
    | Check: Older than N-1 computes                                     |
    | Result: Success                                                    |
    | Details: None                                                      |
    +--------------------------------------------------------------------+