默认 VMware Integrated OpenStack 配置可能不足,无法执行高并发或较大卷的 Cinder 备份操作。

问题

增加 Cinder 备份操作的并发数或 Cinder 卷的大小后,操作可能会失败,并且日志中可能会显示 GetResourceFailure 错误。

解决方案

  1. 扩大控制平面和 Cinder 备份 Pod 数。
    每个控制器节点只能包含一个 Cinder 备份 Pod。
    1. 增加部署中的控制器节点数。
    2. 增加部署中的 Cinder 备份 Pod 数。
  2. root 用户身份登录到 Integrated OpenStack Manager
    ssh root@mgmt-server-ip
  3. 更新 Cinder 的 RPC 响应超时和执行器线程池大小。
    1. 修改 Cinder 配置。
      viocli update cinder
    2. DEFAULT 部分中,添加 rpc_response_timeout 参数并将其值设置为 6000
    3. 添加 executor_thread_pool_size 参数并将其值设置为 640
      现在,配置文件看起来类似于以下内容。
      conf:
        backends:
          [...]
        cinder:
          DEFAULT:
            [...]
            rpc_response_timeout: 6000
            executor_thread_pool_size: 640
  4. 更新数据库超时和最大连接参数。
    1. 修改 MariaDB 配置。
      viocli update mariadb
    2. conf 部分中,添加 connect_timeout 参数并将其值设置为 5
    3. 添加 max_connections 参数并将其值设置为 5000
    4. 添加 net_read_timeout 参数并将其值设置为 1200
    5. 添加 net_write_timeout 参数并将其值设置为 1200
    6. conf 部分中,添加 ingress 部分。
    7. ingress 部分中,添加 proxy-read-timeout 参数并将其值设置为 1200
    8. 添加 proxy-send-timeout 参数并将其值设置为 1200
    9. 添加 proxy-stream-timeout 参数并将其值设置为 3600s
      现在,配置文件看起来类似于以下内容。
      conf:
        connect_timeout: 5
        max_connections: 5000
        net_read_timeout: 1200
        net_write_timeout: 1200
        ingress:
          proxy-read-timeout: "1200"
          proxy-send-timeout: "1200"
          proxy-stream-timeout: 3600s
  5. 更新 Nova 的池大小和分配比率。
    1. 修改 Nova 配置。
      viocli update nova
    2. nova 部分中,添加 DEFAULT 部分。
    3. DEFAULT 部分中,添加 cpu_allocation_ratio 参数并将其值设置为 30
    4. 添加 executor_thread_pool_size 参数并将其值设置为 640
    5. 添加 ram_allocation_ratio 参数并将其值设置为 6
    6. nova 部分中,添加 database 部分。
    7. database 部分中,添加 max_pool_size 参数并将其值设置为 50
    现在,配置文件看起来类似于以下内容。
    conf:
      nova:
        DEFAULT:
          cpu_allocation_ratio: 30
          executor_thread_pool_size: 640
          ram_allocation_ratio: 6
        database:
          max_pool_size: 50
  6. 更新 Keystone 的令牌过期和 Web 服务器网关接口 (WSGI) 参数。
    1. 修改 Keystone 配置。
      viocli update keystone
    2. conf 部分中,添加 keystone 部分。
    3. keystone 部分中,添加 wsgi_processes 参数并将其值设置为 8
    4. 添加 wsgi_threads 参数并将其值设置为 15
    5. keystone 部分中,添加 token 部分。
    6. token 部分中,添加 expiration 参数并将其值设置为 28800
      现在,配置文件看起来类似于以下内容。
      conf:
        keystone:
          wsgi_processes: 8
          wsgi_threads: 15
            token:
              expiration: 28800