nfs.py revision 6847
2667N/A# vim: tabstop=4 shiftwidth=4 softtabstop=4 2667N/A# Copyright (c) 2012 OpenStack LLC. 2667N/A# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. 2667N/A# Licensed under the Apache License, Version 2.0 (the "License"); you may 2667N/A# not use this file except in compliance with the License. You may obtain 2667N/A# Unless required by applicable law or agreed to in writing, software 2667N/A# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 2667N/A# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 2667N/A# License for the specific language governing permissions and limitations 2667N/AVolume driver for Solaris ZFS NFS storage 2899N/A help=(
'Schedule volumes round robin across NFS shares.')),
2667N/A """Local ZFS NFS volume operations.""" 2667N/A """Retrieve volume status info.""" 3817N/A """Creates a sparse file of a given size in GiB.""" """Creates a regular file of given size in GiB.""" """Sets access permissions for given NFS path. :param path: the volume file path. """Sets 666 permissions for the path.""" """Sets read-write permissions to the owner for the path.""" """Calculate available space on the NFS share. :param nfs_share: example 172.18.194.100:/var/nfs Implement a round robin generator for share list """Choose NFS share among available ones for given volume size. For instances with more than one share that meets the criteria, the share with the least "allocated" space will be selected. :param volume_size_in_gib: int size in GB # Round Robin volume placement on shares LOG.
debug(_(
"_find_share using round robin"))
# Place volume on share with the most free space. LOG.
debug(_(
"_find_share using select most free"))
"""Extend an existing volume to the new size.""" ' extend volume %s to %sG' For Solaris we always operate in a secure mode and do not rely on root or any rootwrap utilities. With RBAC we can do what we need as the cinder user. We set the nas_secure_file.XXX to be true by default. We ignore any conf file setting for these string vars. We don't ever use these nas_secure_file_XXX vars in this driver but we still set the value to true. This might prevent admin/users from opening bugs stating we are not running in a secure mode. LOG.
debug(
'NAS variable secure_file_permissions setting is: %s' %
LOG.
debug(
'NAS variable secure_file_operations setting is: %s' %