シンダーサポートNFSスナップショット

[問題の説明]

NFSへシンダーバックエンド、スナップショットディスク障害を作成します。

このエラーの中に発見ログ:

VolumeDriverException:ボリュームドライバがエラーを報告しました:NFSドライバーのスナップショットのサポートは cinder.confで無効になっています。

   

変更方法]

cinder.conf次のパラメータを変更したり、追加します。

[NFS]

......

nfs_snapshot_support =真

nas_secure_file_operations =偽

再起動噴石・ボリューム・サービス

   

[理由]

GoogleはビットおよびNFSに見つかっシンダーバックエンド、デフォルトでスナップショット機能をサポートしていません。

   

以下は、公式の説明です

https://docs.openstack.org/ocata/config-reference/block-storage/drivers/nfs-volume-driver.html

   

構成オプション=デフォルト値

説明

[デフォルト]

  

nfs_mount_attempts = 3

(整数)エラーを上げる前に、NFS共有をマウントする試行回数。少なくとも一つの試みは関係なく、指定された値の、NFS共有をマウントするために行われます。

nfs_mount_options =なし

(文字列)マウントオプションは、NFSクライアントに渡されます。詳細については、NFSのmanページのセクションを参照してください。

nfs_mount_point_base = $ state_pathを/ mnt

NFS共有のマウントポイントを含む(文字列)ベースDIR。

nfs_qcow2_volumes =偽

(ブール値)QCOW2ファイルではなく、RAWファイルとしてボリュームを作成します。

nfs_shares_config =の/ etc /噴石/ nfs_shares

(String)を利用できるNFS共有のリストを持つファイル。

nfs_snapshot_support =偽

(ブール値)NFSドライバーのスナップショットのサポートを有効にしますlibvirtの<1.2.7を使用したプラットフォームは、この機能で問題が発生します。

nfs_sparsed_volumes =真

(ブール値)はスペースを取らない、散在ファイルとしてボリュームを作成します。偽音量に設定した場合は通常のファイルとして作成されます。そのような場合にはボリュームの作成には時間がかかります。

   

変更= Trueのnfs_snapshot_supportを、彼は新しいエラーを見つけた後:

VolumeDriverException: Volume driver reported an error: Snapshots are not supported with nas_secure_file_operations enabled ('true' or 'auto'). Please set it to 'false' if you intend to have it enabled.

   

以下为官方解释

from https://docs.openstack.org/security-guide/block-storage/checklist.html

   

Check-Block-07: Is NAS operating in a secure environment?

   

Cinder supports an NFS driver which works differently than a traditional block storage driver. The NFS driver does not actually allow an instance to access a storage device at the block level. Instead, files are created on an NFS share and mapped to instances, which emulates a block device. Cinder supports secure configuration for such files by controlling the file permissions when cinder volumes are created. Cinder configuration can also control whether file operations are run as the root user or the current OpenStack process user.

   

Pass: If value of parameter nas_secure_file_permissions under [DEFAULT] section in /etc/cinder/cinder.conf is set to auto. When set to auto, a check is done during cinder startup to determine if there are existing cinder volumes, no volumes will set the option to True, and use secure file permissions. The detection of existing volumes will set the option to False, and use the current insecure method of handling file permissions. If value of parameter nas_secure_file_operations under [DEFAULT] section in /etc/cinder/cinder.conf is set to auto. When set to "auto", a check is done during cinder startup to determine if there are existing cinder volumes, no volumes will set the option to True, be secure and do NOT run as the root user. The detection of existing volumes will set the option to False, and use the current method of running operations as the root user. For new installations, a "marker file" is written so that subsequent restarts of cinder will know what the original determination had been.

   

Fail: If value of parameter nas_secure_file_permissions under [DEFAULT] section in /etc/cinder/cinder.conf is set to False and if value of parameter nas_secure_file_operations under [DEFAULT] section in /etc/cinder/cinder.conf is set to False.

   

原因是因为NFS有些操作不兼容NAS的某些安全特性。

所以需要在配置文件里面修改nas_secure_file_operations = False

   

【代码位置】

 1 def _check_snapshot_support(self, setup_checking=False):
 2     """Ensure snapshot support is enabled in config."""
 3 
 4     if (not self.configuration.nfs_snapshot_support and
 5             not setup_checking):
 6         msg = _("NFS driver snapshot support is disabled in cinder.conf.")
 7         raise exception.VolumeDriverException(message=msg)
 8 
 9     if (self.configuration.nas_secure_file_operations == 'true' and
10             self.configuration.nfs_snapshot_support):
11         msg = _("Snapshots are not supported with "
12                 "nas_secure_file_operations enabled ('true' or 'auto'). "
13                 "Please set it to 'false' if you intend to  have "
14                 "it enabled.")
15         LOG.error(msg)
16         raise exception.VolumeDriverException(message=msg)

 

【隐患】

这样修改可能会导致NAS的安全特性不可用。

from http://fanyi.baidu.com/transpage?query=https%3A%2F%2Fbugs.launchpad.net%2Fkolla-ansible%2F%2Bbug%2F1726836&from=en&to=zh&source=url&render=1

   

The NFS backend driver for Cinder implements enhanced NAS security features that default to being enabled.

NFS后端驱动程序实现了增强的NAS安全特性,默认为启用。

However, the features require non-standard configuration changes in Nova's libvirt, and without those changes some cinder volume operations fail.

然而,这些特性要求nova的libvirt一些非标准配置的变动,如果不去手动修改这些配置,某些cinder volume的操作将会失败。

Fix: Add TripleO settings to control the NFS driver's NAS secure features, and disable the features by default.

修复:添加TripleO 配置来控制NFS驱动程序的NAS安全特性,并默认禁止这些功能。

Also these features enabled actually disable possibility to use snapshots.

此外,这些特性实际上禁用了使用快照的可能性。

   

建议一:

as of Queens cinder volume refuses to work with both snapshots/backups and secure nas feature:

截至Q版本,cinder服务拒绝与安全NAS特性共存:

VolumeDriverException: Volume driver reported an error: Snapshots are not supported with nas_secure_file_operations enabled ('true' or 'auto'). Please set it to 'false' if you intend to have it enabled.

选择前者(true/auto),直到NAS安全特性可在所有的openstack环境中工作

Choosing the former until secure nas feature works in all environments

   

建议二:

Cinder fails to run because snapshots are not compatible with secure NAS

cinder无法运行,因为快照与NAS安全特性不兼容。

Cinder cannot run with both snapshots or backups of volumes and secure NAS feature. Choosing the former as the latter does not function well everywhere.

cinder不能同时使用快照和备份,和安全的NAS特性。

选择前者,后者将不起作用。

おすすめ

転載: www.cnblogs.com/liuxia912/p/11327161.html