8.2. 統合制限の有効化
統合制限を有効にするには、各セルに対して nova-api サービスと nova-conductor サービスを設定する必要があります。登録された制限を必須とするか無視するかを指定するリソースのリストを定義することもできます。
コンピュートホストにスケジュールされたことがない ERROR 状態のサーバーには配置割り当てがないため、コアと RAM のクォータ使用量を消費しません。
SHELVED_OFFLOADED 状態のサーバーには配置割り当てがないため、コアと RAM のクォータ使用量を消費しません。そのため、サーバーの復元に必要なコアと RAM をサポートできるだけの十分なクォータがユーザーにない場合、サーバーの復元要求が拒否される可能性があります。
統合制限を有効にすると、サーバーのサイズ変更中に、サイズ変更が完了するまでクォータ使用量が増加します。詳細は、https://bugs.launchpad.net/nova/+bug/1790204 を参照してください。
手順
per-project クォータのクォータ適用については、システムスコープの
readerロールを Compute サービスユーザーに追加します。$ oc exec openstackclient -- openstack role add --user nova --user-domain <service_domain_name> --system all reader-
<service_domain_name>をサービスドメイン名に置き換えます。
-
Compute サービスエンドポイント ID を取得します。
nova-apiおよびnova-conductorサービスを設定するには、この値が必要です。$ oc exec openstackclient -- openstack endpoint list --service nova -f value -c ID-
ワークステーションで
OpenStackControlPlaneカスタムリソース (CR) ファイルopenstack_control_plane.yamlを開きます。 openstack_control_plane.yamlでnova-apiおよびnova-conductorサービスを設定します。driverパラメーターをnova.quota.UnifiedLimitsDriverに設定します。前の手順で取得した Compute サービスのendpoint_idを、各セルのapiServiceTemplate.customServiceConfigとconductorServiceTemplate.customServiceConfigに定義する必要があります。簡単な例:
apiVersion: core.openstack.org/v1beta1 kind: OpenStackControlPlane spec: nova: template: apiServiceTemplate: customServiceConfig: | [quota] driver = nova.quota.UnifiedLimitsDriver [oslo_limit] endpoint_id = <service_endpoint_id> cellTemplates: cell0: conductorServiceTemplate: customServiceConfig: | [quota] driver = nova.quota.UnifiedLimitsDriver [oslo_limit] endpoint_id = <service_endpoint_id> cell1: conductorServiceTemplate: customServiceConfig: | [quota] driver = nova.quota.UnifiedLimitsDriver [oslo_limit] endpoint_id = <service_endpoint_id><service_endpoint_id>を、前の手順で取得した Compute サービスエンドポイント ID に置き換えます。注記セルを追加する場合は、新しいセルにも統合制限を設定する必要があります。新しいセルを追加するには、Red Hat OpenStack Services on OpenShift デプロイメントのカスタマイズ ガイドの コントロールプレーンへのコンピュートセルの追加 を参照してください。
オプション:
unified_limits_resource_listパラメーターを設定することで、[quota]統合制限リソースストラテジーとして、登録済みの制限を無視 (ignore) するか要求 (require) するかを設定します。デフォルトのストラテジーはrequireであり、デフォルトのリソースリストにはserversが含まれます。リソースストラテジーが
requireの設定例:apiVersion: core.openstack.org/v1beta1 kind: OpenStackControlPlane spec: nova: template: apiServiceTemplate: customServiceConfig: | [quota] driver = nova.quota.UnifiedLimitsDriver unified_limits_resource_strategy = require # Do not allow allocation of a resource in this list unless it has # a limit set in Keystone. unified_limits_resource_list = servers,class:VCPU,class:MEMORY_MB,class:DISK_GB [oslo_limit] endpoint_id = <service_endpoint_id> cellTemplates: cell0: conductorServiceTemplate: customServiceConfig: | [quota] driver = nova.quota.UnifiedLimitsDriver unified_limits_resource_strategy = require # Do not allow allocation of a resource in this list unless it has # a limit set in Keystone. unified_limits_resource_list = servers,class:VCPU,class:MEMORY_MB,class:DISK_GB [oslo_limit] endpoint_id = <service_endpoint_id> cell1: conductorServiceTemplate: customServiceConfig: | [quota] driver = nova.quota.UnifiedLimitsDriver unified_limits_resource_strategy = require # Do not allow allocation of a resource in this list unless it has # a limit set in Keystone. unified_limits_resource_list = servers,class:VCPU,class:MEMORY_MB,class:DISK_GB [oslo_limit] endpoint_id = <service_endpoint_id>リソースストラテジーが
ignoreの設定例:apiVersion: core.openstack.org/v1beta1 kind: OpenStackControlPlane spec: nova: template: apiServiceTemplate: customServiceConfig: | [quota] driver = nova.quota.UnifiedLimitsDriver unified_limits_resource_strategy = ignore # Allow unlimited allocation of a resource in this list unless it # has a limit set in Keystone. unified_limits_resource_list = servers,class:VCPU,class:MEMORY_MB,class:DISK_GB [oslo_limit] endpoint_id = <service_endpoint_id> cellTemplates: cell0: conductorServiceTemplate: customServiceConfig: | [quota] driver = nova.quota.UnifiedLimitsDriver unified_limits_resource_strategy = ignore # Allow unlimited allocation of a resource in this list unless it # has a limit set in Keystone. unified_limits_resource_list = servers,class:VCPU,class:MEMORY_MB,class:DISK_GB [oslo_limit] endpoint_id = <service_endpoint_id> cell1: conductorServiceTemplate: customServiceConfig: | [quota] driver = nova.quota.UnifiedLimitsDriver unified_limits_resource_strategy = ignore # Allow unlimited allocation of a resource in this list unless it # has a limit set in Keystone. unified_limits_resource_list = servers,class:VCPU,class:MEMORY_MB,class:DISK_GB [oslo_limit] endpoint_id = <service_endpoint_id>コントロールプレーンを更新します。
$ oc apply -f openstack_control_plane.yaml -n openstackRed Hat OpenShift Container Platform (RHOCP) が
OpenStackControlPlaneCR に関連するリソースを作成するまで待機します。次のコマンドを実行して、ステータスを確認します。$ oc get openstackcontrolplane -n openstackステータスが
Setup completeであれば、OpenStackControlPlaneリソースが作成されています。ヒントデプロイの進行状況を追跡するには、
getコマンドの末尾に-wオプションを追加します。-
オプション: 作成した各セルの
openstacknamespace 内の Pod を確認して、コントロールプレーンがデプロイされていることを確認します。すべての Pod が完了または実行中の状態であれば、コントロールプレーンがデプロイされています。
関連情報