add EMC VNX plugin code
Change-Id: I21cd07c1d3549bc0ffc57ae7b7376be993e457b5
This commit is contained in:
parent
3a1e6008f0
commit
7e457b0bbd
|
@ -0,0 +1,176 @@
|
||||||
|
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
#
|
||||||
|
# Copyright 2015 Mirantis, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
#
|
||||||
|
include plugin_emc_vnx::compute
|
|
@ -0,0 +1,16 @@
|
||||||
|
#
|
||||||
|
# Copyright 2015 Mirantis, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
#
|
||||||
|
include plugin_emc_vnx::controller
|
|
@ -0,0 +1,16 @@
|
||||||
|
#
|
||||||
|
# Copyright 2015 Mirantis, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
#
|
||||||
|
include plugin_emc_vnx::primary_controller
|
|
@ -0,0 +1,265 @@
|
||||||
|
#
|
||||||
|
# Open-iSCSI default configuration.
|
||||||
|
# Could be located at /etc/iscsi/iscsid.conf or ~/.iscsid.conf
|
||||||
|
#
|
||||||
|
# Note: To set any of these values for a specific node/session run
|
||||||
|
# the iscsiadm --mode node --op command for the value. See the README
|
||||||
|
# and man page for iscsiadm for details on the --op command.
|
||||||
|
#
|
||||||
|
|
||||||
|
################
|
||||||
|
# iSNS settings
|
||||||
|
################
|
||||||
|
# Address of iSNS server
|
||||||
|
#isns.address = 192.168.0.1
|
||||||
|
#isns.port = 3205
|
||||||
|
|
||||||
|
#############################
|
||||||
|
# NIC/HBA and driver settings
|
||||||
|
#############################
|
||||||
|
# open-iscsi can create a session and bind it to a NIC/HBA.
|
||||||
|
# To set this up see the example iface config file.
|
||||||
|
|
||||||
|
#*****************
|
||||||
|
# Startup settings
|
||||||
|
#*****************
|
||||||
|
|
||||||
|
# To request that the iscsi initd scripts startup a session set to "automatic".
|
||||||
|
# node.startup = automatic
|
||||||
|
#
|
||||||
|
# To manually startup the session set to "manual". The default is manual.
|
||||||
|
node.startup = manual
|
||||||
|
|
||||||
|
# *************
|
||||||
|
# CHAP Settings
|
||||||
|
# *************
|
||||||
|
|
||||||
|
# To enable CHAP authentication set node.session.auth.authmethod
|
||||||
|
# to CHAP. The default is None.
|
||||||
|
#node.session.auth.authmethod = CHAP
|
||||||
|
|
||||||
|
# To set a CHAP username and password for initiator
|
||||||
|
# authentication by the target(s), uncomment the following lines:
|
||||||
|
#node.session.auth.username = username
|
||||||
|
#node.session.auth.password = password
|
||||||
|
|
||||||
|
# To set a CHAP username and password for target(s)
|
||||||
|
# authentication by the initiator, uncomment the following lines:
|
||||||
|
#node.session.auth.username_in = username_in
|
||||||
|
#node.session.auth.password_in = password_in
|
||||||
|
|
||||||
|
# To enable CHAP authentication for a discovery session to the target
|
||||||
|
# set discovery.sendtargets.auth.authmethod to CHAP. The default is None.
|
||||||
|
#discovery.sendtargets.auth.authmethod = CHAP
|
||||||
|
|
||||||
|
# To set a discovery session CHAP username and password for the initiator
|
||||||
|
# authentication by the target(s), uncomment the following lines:
|
||||||
|
#discovery.sendtargets.auth.username = username
|
||||||
|
#discovery.sendtargets.auth.password = password
|
||||||
|
|
||||||
|
# To set a discovery session CHAP username and password for target(s)
|
||||||
|
# authentication by the initiator, uncomment the following lines:
|
||||||
|
#discovery.sendtargets.auth.username_in = username_in
|
||||||
|
#discovery.sendtargets.auth.password_in = password_in
|
||||||
|
|
||||||
|
# ********
|
||||||
|
# Timeouts
|
||||||
|
# ********
|
||||||
|
#
|
||||||
|
# See the iSCSI REAME's Advanced Configuration section for tips
|
||||||
|
# on setting timeouts when using multipath or doing root over iSCSI.
|
||||||
|
#
|
||||||
|
# To specify the length of time to wait for session re-establishment
|
||||||
|
# before failing SCSI commands back to the application when running
|
||||||
|
# the Linux SCSI Layer error handler, edit the line.
|
||||||
|
# The value is in seconds and the default is 120 seconds.
|
||||||
|
node.session.timeo.replacement_timeout = 5
|
||||||
|
|
||||||
|
# To specify the time to wait for login to complete, edit the line.
|
||||||
|
# The value is in seconds and the default is 15 seconds.
|
||||||
|
node.conn[0].timeo.login_timeout = 5
|
||||||
|
|
||||||
|
# To specify the time to wait for logout to complete, edit the line.
|
||||||
|
# The value is in seconds and the default is 15 seconds.
|
||||||
|
node.conn[0].timeo.logout_timeout = 5
|
||||||
|
|
||||||
|
# Time interval to wait for on connection before sending a ping.
|
||||||
|
node.conn[0].timeo.noop_out_interval = 3
|
||||||
|
|
||||||
|
# To specify the time to wait for a Nop-out response before failing
|
||||||
|
# the connection, edit this line. Failing the connection will
|
||||||
|
# cause IO to be failed back to the SCSI layer. If using dm-multipath
|
||||||
|
# this will cause the IO to be failed to the multipath layer.
|
||||||
|
node.conn[0].timeo.noop_out_timeout = 3
|
||||||
|
|
||||||
|
# To specify the time to wait for abort response before
|
||||||
|
# failing the operation and trying a logical unit reset edit the line.
|
||||||
|
# The value is in seconds and the default is 15 seconds.
|
||||||
|
node.session.err_timeo.abort_timeout = 15
|
||||||
|
|
||||||
|
# To specify the time to wait for a logical unit response
|
||||||
|
# before failing the operation and trying session re-establishment
|
||||||
|
# edit the line.
|
||||||
|
# The value is in seconds and the default is 30 seconds.
|
||||||
|
node.session.err_timeo.lu_reset_timeout = 20
|
||||||
|
|
||||||
|
#******
|
||||||
|
# Retry
|
||||||
|
#******
|
||||||
|
|
||||||
|
# To specify the number of times iscsid should retry a login
|
||||||
|
# if the login attempt fails due to the node.conn[0].timeo.login_timeout
|
||||||
|
# expiring modify the following line. Note that if the login fails
|
||||||
|
# quickly (before node.conn[0].timeo.login_timeout fires) because the network
|
||||||
|
# layer or the target returns an error, iscsid may retry the login more than
|
||||||
|
# node.session.initial_login_retry_max times.
|
||||||
|
#
|
||||||
|
# This retry count along with node.conn[0].timeo.login_timeout
|
||||||
|
# determines the maximum amount of time iscsid will try to
|
||||||
|
# establish the initial login. node.session.initial_login_retry_max is
|
||||||
|
# multiplied by the node.conn[0].timeo.login_timeout to determine the
|
||||||
|
# maximum amount.
|
||||||
|
#
|
||||||
|
# The default node.session.initial_login_retry_max is 8 and
|
||||||
|
# node.conn[0].timeo.login_timeout is 15 so we have:
|
||||||
|
#
|
||||||
|
# node.conn[0].timeo.login_timeout * node.session.initial_login_retry_max =
|
||||||
|
# 120 seconds
|
||||||
|
#
|
||||||
|
# Valid values are any integer value. This only
|
||||||
|
# affects the initial login. Setting it to a high value can slow
|
||||||
|
# down the iscsi service startup. Setting it to a low value can
|
||||||
|
# cause a session to not get logged into, if there are distuptions
|
||||||
|
# during startup or if the network is not ready at that time.
|
||||||
|
node.session.initial_login_retry_max = 8
|
||||||
|
|
||||||
|
################################
|
||||||
|
# session and device queue depth
|
||||||
|
################################
|
||||||
|
|
||||||
|
# To control how many commands the session will queue set
|
||||||
|
# node.session.cmds_max to an integer between 2 and 2048 that is also
|
||||||
|
# a power of 2. The default is 128.
|
||||||
|
node.session.cmds_max = 128
|
||||||
|
|
||||||
|
# To control the device's queue depth set node.session.queue_depth
|
||||||
|
# to a value between 1 and 1024. The default is 32.
|
||||||
|
node.session.queue_depth = 32
|
||||||
|
|
||||||
|
##################################
|
||||||
|
# MISC SYSTEM PERFORMANCE SETTINGS
|
||||||
|
##################################
|
||||||
|
|
||||||
|
# For software iscsi (iscsi_tcp) and iser (ib_iser) each session
|
||||||
|
# has a thread used to transmit or queue data to the hardware. For
|
||||||
|
# cxgb3i you will get a thread per host.
|
||||||
|
#
|
||||||
|
# Setting the thread's priority to a lower value can lead to higher throughput
|
||||||
|
# and lower latencies. The lowest value is -20. Setting the priority to
|
||||||
|
# a higher value, can lead to reduced IO performance, but if you are seeing
|
||||||
|
# the iscsi or scsi threads dominate the use of the CPU then you may want
|
||||||
|
# to set this value higher.
|
||||||
|
#
|
||||||
|
# Note: For cxgb3i you must set all sessions to the same value, or the
|
||||||
|
# behavior is not defined.
|
||||||
|
#
|
||||||
|
# The default value is -20. The setting must be between -20 and 20.
|
||||||
|
node.session.xmit_thread_priority = -20
|
||||||
|
|
||||||
|
|
||||||
|
#***************
|
||||||
|
# iSCSI settings
|
||||||
|
#***************
|
||||||
|
|
||||||
|
# To enable R2T flow control (i.e., the initiator must wait for an R2T
|
||||||
|
# command before sending any data), uncomment the following line:
|
||||||
|
#
|
||||||
|
#node.session.iscsi.InitialR2T = Yes
|
||||||
|
#
|
||||||
|
# To disable R2T flow control (i.e., the initiator has an implied
|
||||||
|
# initial R2T of "FirstBurstLength" at offset 0), uncomment the following line:
|
||||||
|
#
|
||||||
|
# The defaults is No.
|
||||||
|
node.session.iscsi.InitialR2T = No
|
||||||
|
|
||||||
|
#
|
||||||
|
# To disable immediate data (i.e., the initiator does not send
|
||||||
|
# unsolicited data with the iSCSI command PDU), uncomment the following line:
|
||||||
|
#
|
||||||
|
#node.session.iscsi.ImmediateData = No
|
||||||
|
#
|
||||||
|
# To enable immediate data (i.e., the initiator sends unsolicited data
|
||||||
|
# with the iSCSI command packet), uncomment the following line:
|
||||||
|
#
|
||||||
|
# The default is Yes
|
||||||
|
node.session.iscsi.ImmediateData = Yes
|
||||||
|
|
||||||
|
# To specify the maximum number of unsolicited data bytes the initiator
|
||||||
|
# can send in an iSCSI PDU to a target, edit the following line.
|
||||||
|
#
|
||||||
|
# The value is the number of bytes in the range of 512 to (2^24-1) and
|
||||||
|
# the default is 262144
|
||||||
|
node.session.iscsi.FirstBurstLength = 262144
|
||||||
|
|
||||||
|
# To specify the maximum SCSI payload that the initiator will negotiate
|
||||||
|
# with the target for, edit the following line.
|
||||||
|
#
|
||||||
|
# The value is the number of bytes in the range of 512 to (2^24-1) and
|
||||||
|
# the defauls it 16776192
|
||||||
|
node.session.iscsi.MaxBurstLength = 16776192
|
||||||
|
|
||||||
|
# To specify the maximum number of data bytes the initiator can receive
|
||||||
|
# in an iSCSI PDU from a target, edit the following line.
|
||||||
|
#
|
||||||
|
# The value is the number of bytes in the range of 512 to (2^24-1) and
|
||||||
|
# the default is 262144
|
||||||
|
node.conn[0].iscsi.MaxRecvDataSegmentLength = 262144
|
||||||
|
|
||||||
|
# To specify the maximum number of data bytes the initiator can receive
|
||||||
|
# in an iSCSI PDU from a target during a discovery session, edit the
|
||||||
|
# following line.
|
||||||
|
#
|
||||||
|
# The value is the number of bytes in the range of 512 to (2^24-1) and
|
||||||
|
# the default is 32768
|
||||||
|
discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768
|
||||||
|
|
||||||
|
# To allow the targets to control the setting of the digest checking,
|
||||||
|
# with the initiator requesting a preference of enabling the checking, uncomment# one or both of the following lines:
|
||||||
|
#node.conn[0].iscsi.HeaderDigest = CRC32C,None
|
||||||
|
#node.conn[0].iscsi.DataDigest = CRC32C,None
|
||||||
|
#
|
||||||
|
# To allow the targets to control the setting of the digest checking,
|
||||||
|
# with the initiator requesting a preference of disabling the checking,
|
||||||
|
# uncomment one or both of the following lines:
|
||||||
|
#node.conn[0].iscsi.HeaderDigest = None,CRC32C
|
||||||
|
#node.conn[0].iscsi.DataDigest = None,CRC32C
|
||||||
|
#
|
||||||
|
# To enable CRC32C digest checking for the header and/or data part of
|
||||||
|
# iSCSI PDUs, uncomment one or both of the following lines:
|
||||||
|
#node.conn[0].iscsi.HeaderDigest = CRC32C
|
||||||
|
#node.conn[0].iscsi.DataDigest = CRC32C
|
||||||
|
#
|
||||||
|
# To disable digest checking for the header and/or data part of
|
||||||
|
# iSCSI PDUs, uncomment one or both of the following lines:
|
||||||
|
#node.conn[0].iscsi.HeaderDigest = None
|
||||||
|
#node.conn[0].iscsi.DataDigest = None
|
||||||
|
#
|
||||||
|
# The default is to never use DataDigests or HeaderDigests.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
#************
|
||||||
|
# Workarounds
|
||||||
|
#************
|
||||||
|
|
||||||
|
# Some targets like IET prefer after an initiator has sent a task
|
||||||
|
# management function like an ABORT TASK or LOGICAL UNIT RESET, that
|
||||||
|
# it does not respond to PDUs like R2Ts. To enable this behavior uncomment
|
||||||
|
# the following line (The default behavior is Yes):
|
||||||
|
node.session.iscsi.FastAbort = Yes
|
||||||
|
|
||||||
|
# Some targets like Equalogic prefer that after an initiator has sent
|
||||||
|
# a task management function like an ABORT TASK or LOGICAL UNIT RESET, that
|
||||||
|
# it continue to respond to R2Ts. To enable this uncomment this line
|
||||||
|
# node.session.iscsi.FastAbort = No
|
||||||
|
|
|
@ -0,0 +1,302 @@
|
||||||
|
#
|
||||||
|
# Open-iSCSI default configuration.
|
||||||
|
# Could be located at /etc/iscsi/iscsid.conf or ~/.iscsid.conf
|
||||||
|
#
|
||||||
|
# Note: To set any of these values for a specific node/session run
|
||||||
|
# the iscsiadm --mode node --op command for the value. See the README
|
||||||
|
# and man page for iscsiadm for details on the --op command.
|
||||||
|
#
|
||||||
|
|
||||||
|
######################
|
||||||
|
# iscsid daemon config
|
||||||
|
######################
|
||||||
|
# If you want iscsid to start the first time a iscsi tool
|
||||||
|
# needs to access it, instead of starting it when the init
|
||||||
|
# scripts run, set the iscsid startup command here. This
|
||||||
|
# should normally only need to be done by distro package
|
||||||
|
# maintainers.
|
||||||
|
#
|
||||||
|
# Default for Fedora and RHEL. (uncomment to activate).
|
||||||
|
iscsid.startup = /etc/rc.d/init.d/iscsid force-start
|
||||||
|
|
||||||
|
# Default for upstream open-iscsi scripts (uncomment to activate).
|
||||||
|
# iscsid.startup = /sbin/iscsid
|
||||||
|
|
||||||
|
|
||||||
|
#############################
|
||||||
|
# NIC/HBA and driver settings
|
||||||
|
#############################
|
||||||
|
# open-iscsi can create a session and bind it to a NIC/HBA.
|
||||||
|
# To set this up see the example iface config file.
|
||||||
|
|
||||||
|
#*****************
|
||||||
|
# Startup settings
|
||||||
|
#*****************
|
||||||
|
|
||||||
|
# To request that the iscsi initd scripts startup a session set to "automatic".
|
||||||
|
# node.startup = automatic
|
||||||
|
#
|
||||||
|
# To manually startup the session set to "manual". The default is automatic.
|
||||||
|
node.startup = automatic
|
||||||
|
|
||||||
|
# For "automatic" startup nodes, setting this to "Yes" will try logins on each
|
||||||
|
# available iface until one succeeds, and then stop. The default "No" will try
|
||||||
|
# logins on all availble ifaces simultaneously.
|
||||||
|
node.leading_login = No
|
||||||
|
|
||||||
|
# *************
|
||||||
|
# CHAP Settings
|
||||||
|
# *************
|
||||||
|
|
||||||
|
# To enable CHAP authentication set node.session.auth.authmethod
|
||||||
|
# to CHAP. The default is None.
|
||||||
|
#node.session.auth.authmethod = CHAP
|
||||||
|
|
||||||
|
# To set a CHAP username and password for initiator
|
||||||
|
# authentication by the target(s), uncomment the following lines:
|
||||||
|
#node.session.auth.username = username
|
||||||
|
#node.session.auth.password = password
|
||||||
|
|
||||||
|
# To set a CHAP username and password for target(s)
|
||||||
|
# authentication by the initiator, uncomment the following lines:
|
||||||
|
#node.session.auth.username_in = username_in
|
||||||
|
#node.session.auth.password_in = password_in
|
||||||
|
|
||||||
|
# To enable CHAP authentication for a discovery session to the target
|
||||||
|
# set discovery.sendtargets.auth.authmethod to CHAP. The default is None.
|
||||||
|
#discovery.sendtargets.auth.authmethod = CHAP
|
||||||
|
|
||||||
|
# To set a discovery session CHAP username and password for the initiator
|
||||||
|
# authentication by the target(s), uncomment the following lines:
|
||||||
|
#discovery.sendtargets.auth.username = username
|
||||||
|
#discovery.sendtargets.auth.password = password
|
||||||
|
|
||||||
|
# To set a discovery session CHAP username and password for target(s)
|
||||||
|
# authentication by the initiator, uncomment the following lines:
|
||||||
|
#discovery.sendtargets.auth.username_in = username_in
|
||||||
|
#discovery.sendtargets.auth.password_in = password_in
|
||||||
|
|
||||||
|
# ********
|
||||||
|
# Timeouts
|
||||||
|
# ********
|
||||||
|
#
|
||||||
|
# See the iSCSI REAME's Advanced Configuration section for tips
|
||||||
|
# on setting timeouts when using multipath or doing root over iSCSI.
|
||||||
|
#
|
||||||
|
# To specify the length of time to wait for session re-establishment
|
||||||
|
# before failing SCSI commands back to the application when running
|
||||||
|
# the Linux SCSI Layer error handler, edit the line.
|
||||||
|
# The value is in seconds and the default is 120 seconds.
|
||||||
|
# Special values:
|
||||||
|
# - If the value is 0, IO will be failed immediately.
|
||||||
|
# - If the value is less than 0, IO will remain queued until the session
|
||||||
|
# is logged back in, or until the user runs the logout command.
|
||||||
|
node.session.timeo.replacement_timeout = 5
|
||||||
|
|
||||||
|
# To specify the time to wait for login to complete, edit the line.
|
||||||
|
# The value is in seconds and the default is 15 seconds.
|
||||||
|
node.conn[0].timeo.login_timeout = 5
|
||||||
|
|
||||||
|
# To specify the time to wait for logout to complete, edit the line.
|
||||||
|
# The value is in seconds and the default is 15 seconds.
|
||||||
|
node.conn[0].timeo.logout_timeout = 5
|
||||||
|
|
||||||
|
# Time interval to wait for on connection before sending a ping.
|
||||||
|
node.conn[0].timeo.noop_out_interval = 3
|
||||||
|
|
||||||
|
# To specify the time to wait for a Nop-out response before failing
|
||||||
|
# the connection, edit this line. Failing the connection will
|
||||||
|
# cause IO to be failed back to the SCSI layer. If using dm-multipath
|
||||||
|
# this will cause the IO to be failed to the multipath layer.
|
||||||
|
node.conn[0].timeo.noop_out_timeout = 3
|
||||||
|
|
||||||
|
# To specify the time to wait for abort response before
|
||||||
|
# failing the operation and trying a logical unit reset edit the line.
|
||||||
|
# The value is in seconds and the default is 15 seconds.
|
||||||
|
node.session.err_timeo.abort_timeout = 15
|
||||||
|
|
||||||
|
# To specify the time to wait for a logical unit response
|
||||||
|
# before failing the operation and trying session re-establishment
|
||||||
|
# edit the line.
|
||||||
|
# The value is in seconds and the default is 30 seconds.
|
||||||
|
node.session.err_timeo.lu_reset_timeout = 20
|
||||||
|
|
||||||
|
# To specify the time to wait for a target response
|
||||||
|
# before failing the operation and trying session re-establishment
|
||||||
|
# edit the line.
|
||||||
|
# The value is in seconds and the default is 30 seconds.
|
||||||
|
node.session.err_timeo.tgt_reset_timeout = 20
|
||||||
|
|
||||||
|
|
||||||
|
#******
|
||||||
|
# Retry
|
||||||
|
#******
|
||||||
|
|
||||||
|
# To specify the number of times iscsid should retry a login
|
||||||
|
# if the login attempt fails due to the node.conn[0].timeo.login_timeout
|
||||||
|
# expiring modify the following line. Note that if the login fails
|
||||||
|
# quickly (before node.conn[0].timeo.login_timeout fires) because the network
|
||||||
|
# layer or the target returns an error, iscsid may retry the login more than
|
||||||
|
# node.session.initial_login_retry_max times.
|
||||||
|
#
|
||||||
|
# This retry count along with node.conn[0].timeo.login_timeout
|
||||||
|
# determines the maximum amount of time iscsid will try to
|
||||||
|
# establish the initial login. node.session.initial_login_retry_max is
|
||||||
|
# multiplied by the node.conn[0].timeo.login_timeout to determine the
|
||||||
|
# maximum amount.
|
||||||
|
#
|
||||||
|
# The default node.session.initial_login_retry_max is 8 and
|
||||||
|
# node.conn[0].timeo.login_timeout is 15 so we have:
|
||||||
|
#
|
||||||
|
# node.conn[0].timeo.login_timeout * node.session.initial_login_retry_max =
|
||||||
|
# 120 seconds
|
||||||
|
#
|
||||||
|
# Valid values are any integer value. This only
|
||||||
|
# affects the initial login. Setting it to a high value can slow
|
||||||
|
# down the iscsi service startup. Setting it to a low value can
|
||||||
|
# cause a session to not get logged into, if there are distuptions
|
||||||
|
# during startup or if the network is not ready at that time.
|
||||||
|
node.session.initial_login_retry_max = 8
|
||||||
|
|
||||||
|
################################
|
||||||
|
# session and device queue depth
|
||||||
|
################################
|
||||||
|
|
||||||
|
# To control how many commands the session will queue set
|
||||||
|
# node.session.cmds_max to an integer between 2 and 2048 that is also
|
||||||
|
# a power of 2. The default is 128.
|
||||||
|
node.session.cmds_max = 128
|
||||||
|
|
||||||
|
# To control the device's queue depth set node.session.queue_depth
|
||||||
|
# to a value between 1 and 1024. The default is 32.
|
||||||
|
node.session.queue_depth = 32
|
||||||
|
|
||||||
|
##################################
|
||||||
|
# MISC SYSTEM PERFORMANCE SETTINGS
|
||||||
|
##################################
|
||||||
|
|
||||||
|
# For software iscsi (iscsi_tcp) and iser (ib_iser) each session
|
||||||
|
# has a thread used to transmit or queue data to the hardware. For
|
||||||
|
# cxgb3i you will get a thread per host.
|
||||||
|
#
|
||||||
|
# Setting the thread's priority to a lower value can lead to higher throughput
|
||||||
|
# and lower latencies. The lowest value is -20. Setting the priority to
|
||||||
|
# a higher value, can lead to reduced IO performance, but if you are seeing
|
||||||
|
# the iscsi or scsi threads dominate the use of the CPU then you may want
|
||||||
|
# to set this value higher.
|
||||||
|
#
|
||||||
|
# Note: For cxgb3i you must set all sessions to the same value, or the
|
||||||
|
# behavior is not defined.
|
||||||
|
#
|
||||||
|
# The default value is -20. The setting must be between -20 and 20.
|
||||||
|
node.session.xmit_thread_priority = -20
|
||||||
|
|
||||||
|
|
||||||
|
#***************
|
||||||
|
# iSCSI settings
|
||||||
|
#***************
|
||||||
|
|
||||||
|
# To enable R2T flow control (i.e., the initiator must wait for an R2T
|
||||||
|
# command before sending any data), uncomment the following line:
|
||||||
|
#
|
||||||
|
#node.session.iscsi.InitialR2T = Yes
|
||||||
|
#
|
||||||
|
# To disable R2T flow control (i.e., the initiator has an implied
|
||||||
|
# initial R2T of "FirstBurstLength" at offset 0), uncomment the following line:
|
||||||
|
#
|
||||||
|
# The defaults is No.
|
||||||
|
node.session.iscsi.InitialR2T = No
|
||||||
|
|
||||||
|
#
|
||||||
|
# To disable immediate data (i.e., the initiator does not send
|
||||||
|
# unsolicited data with the iSCSI command PDU), uncomment the following line:
|
||||||
|
#
|
||||||
|
#node.session.iscsi.ImmediateData = No
|
||||||
|
#
|
||||||
|
# To enable immediate data (i.e., the initiator sends unsolicited data
|
||||||
|
# with the iSCSI command packet), uncomment the following line:
|
||||||
|
#
|
||||||
|
# The default is Yes
|
||||||
|
node.session.iscsi.ImmediateData = Yes
|
||||||
|
|
||||||
|
# To specify the maximum number of unsolicited data bytes the initiator
|
||||||
|
# can send in an iSCSI PDU to a target, edit the following line.
|
||||||
|
#
|
||||||
|
# The value is the number of bytes in the range of 512 to (2^24-1) and
|
||||||
|
# the default is 262144
|
||||||
|
node.session.iscsi.FirstBurstLength = 262144
|
||||||
|
|
||||||
|
# To specify the maximum SCSI payload that the initiator will negotiate
|
||||||
|
# with the target for, edit the following line.
|
||||||
|
#
|
||||||
|
# The value is the number of bytes in the range of 512 to (2^24-1) and
|
||||||
|
# the defauls it 16776192
|
||||||
|
node.session.iscsi.MaxBurstLength = 16776192
|
||||||
|
|
||||||
|
# To specify the maximum number of data bytes the initiator can receive
|
||||||
|
# in an iSCSI PDU from a target, edit the following line.
|
||||||
|
#
|
||||||
|
# The value is the number of bytes in the range of 512 to (2^24-1) and
|
||||||
|
# the default is 262144
|
||||||
|
node.conn[0].iscsi.MaxRecvDataSegmentLength = 262144
|
||||||
|
|
||||||
|
# To specify the maximum number of data bytes the initiator will send
|
||||||
|
# in an iSCSI PDU to the target, edit the following line.
|
||||||
|
#
|
||||||
|
# The value is the number of bytes in the range of 512 to (2^24-1).
|
||||||
|
# Zero is a special case. If set to zero, the initiator will use
|
||||||
|
# the target's MaxRecvDataSegmentLength for the MaxXmitDataSegmentLength.
|
||||||
|
# The default is 0.
|
||||||
|
node.conn[0].iscsi.MaxXmitDataSegmentLength = 0
|
||||||
|
|
||||||
|
# To specify the maximum number of data bytes the initiator can receive
|
||||||
|
# in an iSCSI PDU from a target during a discovery session, edit the
|
||||||
|
# following line.
|
||||||
|
#
|
||||||
|
# The value is the number of bytes in the range of 512 to (2^24-1) and
|
||||||
|
# the default is 32768
|
||||||
|
discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768
|
||||||
|
|
||||||
|
# To allow the targets to control the setting of the digest checking,
|
||||||
|
# with the initiator requesting a preference of enabling the checking, uncomment
|
||||||
|
# the following lines (Data digests are not supported.):
|
||||||
|
#node.conn[0].iscsi.HeaderDigest = CRC32C,None
|
||||||
|
|
||||||
|
#
|
||||||
|
# To allow the targets to control the setting of the digest checking,
|
||||||
|
# with the initiator requesting a preference of disabling the checking,
|
||||||
|
# uncomment the following line:
|
||||||
|
#node.conn[0].iscsi.HeaderDigest = None,CRC32C
|
||||||
|
#
|
||||||
|
# To enable CRC32C digest checking for the header and/or data part of
|
||||||
|
# iSCSI PDUs, uncomment the following line:
|
||||||
|
#node.conn[0].iscsi.HeaderDigest = CRC32C
|
||||||
|
#
|
||||||
|
# To disable digest checking for the header and/or data part of
|
||||||
|
# iSCSI PDUs, uncomment the following line:
|
||||||
|
#node.conn[0].iscsi.HeaderDigest = None
|
||||||
|
#
|
||||||
|
# The default is to never use DataDigests or HeaderDigests.
|
||||||
|
#
|
||||||
|
node.conn[0].iscsi.HeaderDigest = None
|
||||||
|
|
||||||
|
# For multipath configurations, you may want more than one session to be
|
||||||
|
# created on each iface record. If node.session.nr_sessions is greater
|
||||||
|
# than 1, performing a 'login' for that node will ensure that the
|
||||||
|
# appropriate number of sessions is created.
|
||||||
|
node.session.nr_sessions = 1
|
||||||
|
|
||||||
|
#************
|
||||||
|
# Workarounds
|
||||||
|
#************
|
||||||
|
|
||||||
|
# Some targets like IET prefer after an initiator has sent a task
|
||||||
|
# management function like an ABORT TASK or LOGICAL UNIT RESET, that
|
||||||
|
# it does not respond to PDUs like R2Ts. To enable this behavior uncomment
|
||||||
|
# the following line (The default behavior is Yes):
|
||||||
|
node.session.iscsi.FastAbort = Yes
|
||||||
|
|
||||||
|
# Some targets like Equalogic prefer that after an initiator has sent
|
||||||
|
# a task management function like an ABORT TASK or LOGICAL UNIT RESET, that
|
||||||
|
# it continue to respond to R2Ts. To enable this uncomment this line
|
||||||
|
# node.session.iscsi.FastAbort = No
|
|
@ -0,0 +1,49 @@
|
||||||
|
blacklist {
|
||||||
|
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
|
||||||
|
devnode "^hd[a-z][0-9]*"
|
||||||
|
devnode "^cciss!c[0-9]d[0-9]*[p[0-9]*]"
|
||||||
|
device {
|
||||||
|
vendor "DGC"
|
||||||
|
product "LUNZ"
|
||||||
|
}
|
||||||
|
device {
|
||||||
|
vendor "HP"
|
||||||
|
product "LOGICAL VOLUME"
|
||||||
|
}
|
||||||
|
device {
|
||||||
|
vendor "HP iLO"
|
||||||
|
product "Internal SD-CARD"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
defaults {
|
||||||
|
path_grouping_policy multibus
|
||||||
|
failback immediate
|
||||||
|
}
|
||||||
|
devices {
|
||||||
|
device {
|
||||||
|
vendor "HP"
|
||||||
|
product "LOGICAL VOLUME.*"
|
||||||
|
path_grouping_policy multibus
|
||||||
|
getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
|
||||||
|
path_selector "round-robin 0"
|
||||||
|
path_checker directio
|
||||||
|
}
|
||||||
|
device {
|
||||||
|
vendor "HP iLO"
|
||||||
|
product "Internal SD-CARD"
|
||||||
|
# generate a fake path id for a SD-CARD because scsi_id does not work:
|
||||||
|
getuid_callout "/bin/echo 111111111111111111111111111111111"
|
||||||
|
}
|
||||||
|
device {
|
||||||
|
vendor "DGC"
|
||||||
|
product ".*"
|
||||||
|
path_grouping_policy group_by_prio
|
||||||
|
getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
|
||||||
|
path_checker emc_clariion
|
||||||
|
path_selector "round-robin 0"
|
||||||
|
no_path_retry fail
|
||||||
|
hardware_handler "1 emc"
|
||||||
|
prio emc
|
||||||
|
failback immediate
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,351 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# OpenStack Cinder Volume (cinder-volume)
|
||||||
|
#
|
||||||
|
# Description: Manages an OpenStack Volumes (cinder-volume) process as an HA resource
|
||||||
|
#
|
||||||
|
# Authors: Sébastien Han
|
||||||
|
# Mainly inspired by the Glance API resource agent written by Martin Gerhard Loschwitz from Hastexo: http://goo.gl/whLpr
|
||||||
|
#
|
||||||
|
# Support: openstack@lists.launchpad.net
|
||||||
|
# License: Apache Software License (ASL) 2.0
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# See usage() function below for more details ...
|
||||||
|
#
|
||||||
|
# OCF instance parameters:
|
||||||
|
# OCF_RESKEY_binary
|
||||||
|
# OCF_RESKEY_config
|
||||||
|
# OCF_RESKEY_user
|
||||||
|
# OCF_RESKEY_pid
|
||||||
|
# OCF_RESKEY_amqp_server_port
|
||||||
|
# OCF_RESKEY_additional_parameters
|
||||||
|
#######################################################################
|
||||||
|
# Initialization:
|
||||||
|
|
||||||
|
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
|
||||||
|
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
# Fill in some defaults if no values are specified
|
||||||
|
|
||||||
|
OCF_RESKEY_binary_default="cinder-volume"
|
||||||
|
OCF_RESKEY_config_default="/etc/cinder/cinder.conf"
|
||||||
|
OCF_RESKEY_user_default="cinder"
|
||||||
|
OCF_RESKEY_pid_default="$HA_RSCTMP/$OCF_RESOURCE_INSTANCE.pid"
|
||||||
|
OCF_RESKEY_amqp_server_port_default="5672"
|
||||||
|
OCF_RESKEY_multibackend_default="false"
|
||||||
|
|
||||||
|
: ${OCF_RESKEY_binary=${OCF_RESKEY_binary_default}}
|
||||||
|
: ${OCF_RESKEY_config=${OCF_RESKEY_config_default}}
|
||||||
|
: ${OCF_RESKEY_user=${OCF_RESKEY_user_default}}
|
||||||
|
: ${OCF_RESKEY_pid=${OCF_RESKEY_pid_default}}
|
||||||
|
: ${OCF_RESKEY_amqp_server_port=${OCF_RESKEY_amqp_server_port_default}}
|
||||||
|
: ${OCF_RESKEY_multibackend=${OCF_RESKEY_multibackend_default}}
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
cat <<UEND
|
||||||
|
usage: $0 (start|stop|validate-all|meta-data|status|monitor)
|
||||||
|
|
||||||
|
$0 manages an OpenStack Cinder Volume (cinder-volume) process as an HA resource
|
||||||
|
|
||||||
|
The 'start' operation starts the volume service.
|
||||||
|
The 'stop' operation stops the volume service.
|
||||||
|
The 'validate-all' operation reports whether the parameters are valid
|
||||||
|
The 'meta-data' operation reports this RA's meta-data information
|
||||||
|
The 'status' operation reports whether the volume service is running
|
||||||
|
The 'monitor' operation reports whether the volume service seems to be working
|
||||||
|
|
||||||
|
UEND
|
||||||
|
}
|
||||||
|
|
||||||
|
meta_data() {
|
||||||
|
cat <<END
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd">
|
||||||
|
<resource-agent name="cinder-volume">
|
||||||
|
<version>1.0</version>
|
||||||
|
|
||||||
|
<longdesc lang="en">
|
||||||
|
Resource agent for the OpenStack Cinder Volume (cinder-volume)
|
||||||
|
May manage a cinder-volume instance or a clone set that
|
||||||
|
creates a distributed cinder-volume cluster.
|
||||||
|
</longdesc>
|
||||||
|
<shortdesc lang="en">Manages the OpenStack Cinder Volume (cinder-volume)</shortdesc>
|
||||||
|
<parameters>
|
||||||
|
|
||||||
|
<parameter name="binary" unique="0" required="0">
|
||||||
|
<longdesc lang="en">
|
||||||
|
Location of the OpenStack Cinder Volume server binary (cinder-volume)
|
||||||
|
</longdesc>
|
||||||
|
<shortdesc lang="en">OpenStack Cinder Volume server binary (cinder-volume)</shortdesc>
|
||||||
|
<content type="string" default="${OCF_RESKEY_binary_default}" />
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
<parameter name="config" unique="0" required="0">
|
||||||
|
<longdesc lang="en">
|
||||||
|
Location of the OpenStack Cinder Volume (cinder-volume) configuration file
|
||||||
|
</longdesc>
|
||||||
|
<shortdesc lang="en">OpenStack Cinder Volume (cinder-volume) config file</shortdesc>
|
||||||
|
<content type="string" default="${OCF_RESKEY_config_default}" />
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
<parameter name="user" unique="0" required="0">
|
||||||
|
<longdesc lang="en">
|
||||||
|
User running OpenStack Cinder Volume (cinder-volume)
|
||||||
|
</longdesc>
|
||||||
|
<shortdesc lang="en">OpenStack Cinder Volume (cinder-volume) user</shortdesc>
|
||||||
|
<content type="string" default="${OCF_RESKEY_user_default}" />
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
<parameter name="pid" unique="0" required="0">
|
||||||
|
<longdesc lang="en">
|
||||||
|
The pid file to use for this OpenStack Cinder Volume (cinder-volume) instance
|
||||||
|
</longdesc>
|
||||||
|
<shortdesc lang="en">OpenStack Cinder Volume (cinder-volume) pid file</shortdesc>
|
||||||
|
<content type="string" default="${OCF_RESKEY_pid_default}" />
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
<parameter name="amqp_server_port" unique="0" required="0">
|
||||||
|
<longdesc lang="en">
|
||||||
|
The listening port number of the AMQP server. Mandatory to perform a monitor check
|
||||||
|
</longdesc>
|
||||||
|
<shortdesc lang="en">AMQP listening port</shortdesc>
|
||||||
|
<content type="integer" default="${OCF_RESKEY_amqp_server_port_default}" />
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
<parameter name="multibackend" unique="0" required="0">
|
||||||
|
<longdesc lang="en">
|
||||||
|
If the multi-backend is enabled, the monitor check is slightly different since cinder-volume spawns one thread for each backend.
|
||||||
|
</longdesc>
|
||||||
|
<shortdesc lang="en">Multi Backend usage</shortdesc>
|
||||||
|
<content type="boolean" default="${OCF_RESKEY_multibackend_default}" />
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
<parameter name="additional_parameters" unique="0" required="0">
|
||||||
|
<longdesc lang="en">
|
||||||
|
Additional parameters to pass on to the OpenStack Cinder Volume (cinder-volume)
|
||||||
|
</longdesc>
|
||||||
|
<shortdesc lang="en">Additional parameters for cinder-volume</shortdesc>
|
||||||
|
<content type="string" />
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
</parameters>
|
||||||
|
|
||||||
|
<actions>
|
||||||
|
<action name="start" timeout="10" />
|
||||||
|
<action name="stop" timeout="10" />
|
||||||
|
<action name="status" timeout="10" />
|
||||||
|
<action name="monitor" timeout="5" interval="10" />
|
||||||
|
<action name="validate-all" timeout="5" />
|
||||||
|
<action name="meta-data" timeout="5" />
|
||||||
|
</actions>
|
||||||
|
</resource-agent>
|
||||||
|
END
|
||||||
|
}
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
# Functions invoked by resource manager actions
|
||||||
|
|
||||||
|
cinder_volume_validate() {
|
||||||
|
local rc
|
||||||
|
|
||||||
|
check_binary $OCF_RESKEY_binary
|
||||||
|
check_binary netstat
|
||||||
|
|
||||||
|
# A config file on shared storage that is not available
|
||||||
|
# during probes is OK.
|
||||||
|
if [ ! -f $OCF_RESKEY_config ]; then
|
||||||
|
if ! ocf_is_probe; then
|
||||||
|
ocf_log err "Config $OCF_RESKEY_config doesn't exist"
|
||||||
|
return $OCF_ERR_INSTALLED
|
||||||
|
fi
|
||||||
|
ocf_log_warn "Config $OCF_RESKEY_config not available during a probe"
|
||||||
|
fi
|
||||||
|
|
||||||
|
getent passwd $OCF_RESKEY_user >/dev/null 2>&1
|
||||||
|
rc=$?
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
ocf_log err "User $OCF_RESKEY_user doesn't exist"
|
||||||
|
return $OCF_ERR_INSTALLED
|
||||||
|
fi
|
||||||
|
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
|
cinder_volume_status() {
|
||||||
|
local pid
|
||||||
|
local rc
|
||||||
|
|
||||||
|
if [ ! -f $OCF_RESKEY_pid ]; then
|
||||||
|
ocf_log info "OpenStack Cinder Volume (cinder-volume) is not running"
|
||||||
|
return $OCF_NOT_RUNNING
|
||||||
|
else
|
||||||
|
pid=`cat $OCF_RESKEY_pid`
|
||||||
|
fi
|
||||||
|
|
||||||
|
ocf_run -warn kill -s 0 $pid
|
||||||
|
rc=$?
|
||||||
|
if [ $rc -eq 0 ]; then
|
||||||
|
return $OCF_SUCCESS
|
||||||
|
else
|
||||||
|
ocf_log info "Old PID file found, but OpenStack Cinder Volume (cinder-volume) is not running"
|
||||||
|
return $OCF_NOT_RUNNING
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
cinder_volume_monitor() {
|
||||||
|
local rc
|
||||||
|
local pid
|
||||||
|
local volume_amqp_check
|
||||||
|
|
||||||
|
cinder_volume_status
|
||||||
|
rc=$?
|
||||||
|
|
||||||
|
# If status returned anything but success, return that immediately
|
||||||
|
if [ $rc -ne $OCF_SUCCESS ]; then
|
||||||
|
return $rc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Grab cinder-volume PID
|
||||||
|
pid=`cat $OCF_RESKEY_pid`
|
||||||
|
|
||||||
|
if ocf_is_true "$OCF_RESKEY_multibackend"; then
|
||||||
|
# Grab the child's PIDs
|
||||||
|
for i in `ps -o pid --no-headers --ppid $pid`
|
||||||
|
do
|
||||||
|
volume_amqp_check=`netstat -punt | grep -s "$OCF_RESKEY_amqp_server_port" | grep -s "$i" | grep -qs "ESTABLISHED"`
|
||||||
|
rc=$?
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
ocf_log err "This child process from Cinder Volume is not connected to the AMQP server: $rc"
|
||||||
|
return $OCF_NOT_RUNNING
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
# Check the connections according to the PID
|
||||||
|
# We are sure to hit the scheduler process and not other nova process with the same connection behavior (for example nova-cert)
|
||||||
|
# check the connections according to the PID
|
||||||
|
volume_amqp_check=`netstat -punt | grep -s "$OCF_RESKEY_amqp_server_port" | grep -s "$pid" | grep -qs "ESTABLISHED"`
|
||||||
|
rc=$?
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
ocf_log err "Cinder Volume is not connected to the AMQP server: $rc"
|
||||||
|
return $OCF_NOT_RUNNING
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
ocf_log debug "OpenStack Cinder Volume (cinder-volume) monitor succeeded"
|
||||||
|
return $OCF_SUCCESS
|
||||||
|
}
|
||||||
|
|
||||||
|
cinder_volume_start() {
|
||||||
|
local rc
|
||||||
|
|
||||||
|
cinder_volume_status
|
||||||
|
rc=$?
|
||||||
|
if [ $rc -eq $OCF_SUCCESS ]; then
|
||||||
|
ocf_log info "OpenStack Cinder Volume (cinder-volume) already running"
|
||||||
|
return $OCF_SUCCESS
|
||||||
|
fi
|
||||||
|
|
||||||
|
# run the actual cinder-volume daemon. Don't use ocf_run as we're sending the tool's output
|
||||||
|
# straight to /dev/null anyway and using ocf_run would break stdout-redirection here.
|
||||||
|
su ${OCF_RESKEY_user} -s /bin/sh -c "${OCF_RESKEY_binary} --config-file=$OCF_RESKEY_config \
|
||||||
|
$OCF_RESKEY_additional_parameters"' >> /dev/null 2>&1 & echo $!' > $OCF_RESKEY_pid
|
||||||
|
|
||||||
|
# Spin waiting for the server to come up.
|
||||||
|
# Let the CRM/LRM time us out if required
|
||||||
|
while true; do
|
||||||
|
cinder_volume_monitor
|
||||||
|
rc=$?
|
||||||
|
[ $rc -eq $OCF_SUCCESS ] && break
|
||||||
|
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||||
|
ocf_log err "OpenStack Cinder Volume (cinder-volume) start failed"
|
||||||
|
exit $OCF_ERR_GENERIC
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
ocf_log info "OpenStack Cinder Volume (cinder-volume) started"
|
||||||
|
return $OCF_SUCCESS
|
||||||
|
}
|
||||||
|
|
||||||
|
cinder_volume_stop() {
|
||||||
|
local rc
|
||||||
|
local pid
|
||||||
|
|
||||||
|
cinder_volume_status
|
||||||
|
rc=$?
|
||||||
|
if [ $rc -eq $OCF_NOT_RUNNING ]; then
|
||||||
|
ocf_log info "OpenStack Cinder Volume (cinder-volume) already stopped"
|
||||||
|
return $OCF_SUCCESS
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Try SIGTERM
|
||||||
|
pid=`cat $OCF_RESKEY_pid`
|
||||||
|
ocf_run kill -s TERM $pid
|
||||||
|
rc=$?
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
ocf_log err "OpenStack Cinder Volume (cinder-volume) couldn't be stopped"
|
||||||
|
exit $OCF_ERR_GENERIC
|
||||||
|
fi
|
||||||
|
|
||||||
|
# stop waiting
|
||||||
|
shutdown_timeout=15
|
||||||
|
if [ -n "$OCF_RESKEY_CRM_meta_timeout" ]; then
|
||||||
|
shutdown_timeout=$((($OCF_RESKEY_CRM_meta_timeout/1000)-5))
|
||||||
|
fi
|
||||||
|
count=0
|
||||||
|
while [ $count -lt $shutdown_timeout ]; do
|
||||||
|
cinder_volume_status
|
||||||
|
rc=$?
|
||||||
|
if [ $rc -eq $OCF_NOT_RUNNING ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
count=`expr $count + 1`
|
||||||
|
sleep 1
|
||||||
|
ocf_log debug "OpenStack Cinder Volume (cinder-volume) still hasn't stopped yet. Waiting ..."
|
||||||
|
done
|
||||||
|
|
||||||
|
cinder_volume_status
|
||||||
|
rc=$?
|
||||||
|
if [ $rc -ne $OCF_NOT_RUNNING ]; then
|
||||||
|
# SIGTERM didn't help either, try SIGKILL
|
||||||
|
ocf_log info "OpenStack Cinder Volume (cinder-volume) failed to stop after ${shutdown_timeout}s \
|
||||||
|
using SIGTERM. Trying SIGKILL ..."
|
||||||
|
ocf_run kill -s KILL $pid
|
||||||
|
fi
|
||||||
|
|
||||||
|
ocf_log info "OpenStack Cinder Volume (cinder-volume) stopped"
|
||||||
|
|
||||||
|
rm -f $OCF_RESKEY_pid
|
||||||
|
|
||||||
|
return $OCF_SUCCESS
|
||||||
|
}
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
meta-data) meta_data
|
||||||
|
exit $OCF_SUCCESS;;
|
||||||
|
usage|help) usage
|
||||||
|
exit $OCF_SUCCESS;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Anything except meta-data and help must pass validation
|
||||||
|
cinder_volume_validate || exit $?
|
||||||
|
|
||||||
|
# What kind of method was invoked?
|
||||||
|
case "$1" in
|
||||||
|
start) cinder_volume_start;;
|
||||||
|
stop) cinder_volume_stop;;
|
||||||
|
status) cinder_volume_status;;
|
||||||
|
monitor) cinder_volume_monitor;;
|
||||||
|
validate-all) ;;
|
||||||
|
*) usage
|
||||||
|
exit $OCF_ERR_UNIMPLEMENTED;;
|
||||||
|
esac
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
#
|
||||||
|
# Copyright 2015 Mirantis, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
#
|
||||||
|
class plugin_emc_vnx::common {
|
||||||
|
|
||||||
|
include plugin_emc_vnx::params
|
||||||
|
|
||||||
|
package {$plugin_emc_vnx::params::iscsi_package_name:
|
||||||
|
ensure => 'installed'
|
||||||
|
}
|
||||||
|
case $::osfamily {
|
||||||
|
'Debian': {
|
||||||
|
service {$plugin_emc_vnx::params::iscsi_service_name:
|
||||||
|
ensure => 'running',
|
||||||
|
enable => true,
|
||||||
|
hasrestart => true,
|
||||||
|
require => Package[$plugin_emc_vnx::params::iscsi_package_name],
|
||||||
|
}
|
||||||
|
file {'iscsid.conf':
|
||||||
|
path => '/etc/iscsi/iscsid.conf',
|
||||||
|
mode => '0644',
|
||||||
|
owner => root,
|
||||||
|
group => root,
|
||||||
|
source => 'puppet:///modules/plugin_emc_vnx/iscsid.conf',
|
||||||
|
require => Package[$plugin_emc_vnx::params::iscsi_package_name],
|
||||||
|
notify => Service[$plugin_emc_vnx::params::iscsi_service_name],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'RedHat': {
|
||||||
|
file {'iscsid.conf':
|
||||||
|
path => '/etc/iscsi/iscsid.conf',
|
||||||
|
mode => '0644',
|
||||||
|
owner => root,
|
||||||
|
group => root,
|
||||||
|
source => 'puppet:///modules/plugin_emc_vnx/iscsid.conf-centos',
|
||||||
|
require => Package[$plugin_emc_vnx::params::iscsi_package_name],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
fail("unsuported osfamily ${::osfamily}, currently Debian and Redhat are the only supported platforms")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
package {$plugin_emc_vnx::params::multipath_package_name:
|
||||||
|
ensure => 'installed'
|
||||||
|
}
|
||||||
|
service {$plugin_emc_vnx::params::multipath_service_name:
|
||||||
|
ensure => 'running',
|
||||||
|
enable => true,
|
||||||
|
hasrestart => true,
|
||||||
|
hasstatus => false,
|
||||||
|
status => 'pgrep multipathd',
|
||||||
|
require => Package[$plugin_emc_vnx::params::multipath_package_name],
|
||||||
|
}
|
||||||
|
file {'multipath.conf':
|
||||||
|
path => '/etc/multipath.conf',
|
||||||
|
mode => '0644',
|
||||||
|
owner => root,
|
||||||
|
group => root,
|
||||||
|
source => 'puppet:///modules/plugin_emc_vnx/multipath.conf',
|
||||||
|
require => Package[$plugin_emc_vnx::params::multipath_package_name],
|
||||||
|
notify => Service[$plugin_emc_vnx::params::multipath_service_name],
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
#
|
||||||
|
# Copyright 2015 Mirantis, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
#
|
||||||
|
class plugin_emc_vnx::compute {
|
||||||
|
|
||||||
|
include plugin_emc_vnx::common
|
||||||
|
include ::nova::params
|
||||||
|
|
||||||
|
service { 'nova-compute':
|
||||||
|
ensure => 'running',
|
||||||
|
name => $::nova::params::compute_service_name,
|
||||||
|
enable => true,
|
||||||
|
hasstatus => true,
|
||||||
|
hasrestart => true,
|
||||||
|
}
|
||||||
|
|
||||||
|
nova_config { 'libvirt/iscsi_use_multipath': value => 'True' }
|
||||||
|
|
||||||
|
Nova_config<||> ~> Service['nova-compute']
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,86 @@
|
||||||
|
#
|
||||||
|
# Copyright 2015 Mirantis, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
#
|
||||||
|
class plugin_emc_vnx::controller {
|
||||||
|
|
||||||
|
include plugin_emc_vnx::common
|
||||||
|
include ::cinder::params
|
||||||
|
|
||||||
|
$plugin_settings = hiera('emc_vnx')
|
||||||
|
|
||||||
|
package {$::plugin_emc_vnx::params::navicli_package_name:
|
||||||
|
ensure => present,
|
||||||
|
}
|
||||||
|
|
||||||
|
if $::cinder::params::volume_package {
|
||||||
|
package { $::cinder::params::volume_package:
|
||||||
|
ensure => present,
|
||||||
|
}
|
||||||
|
Package[$::cinder::params::volume_package] -> Cinder_config<||>
|
||||||
|
}
|
||||||
|
|
||||||
|
cinder_config {
|
||||||
|
'DEFAULT/volume_driver': value => 'cinder.volume.drivers.emc.emc_cli_iscsi.EMCCLIISCSIDriver';
|
||||||
|
'DEFAULT/san_ip': value => $plugin_settings['emc_sp_a_ip'];
|
||||||
|
'DEFAULT/san_secondary_ip': value => $plugin_settings['emc_sp_b_ip'];
|
||||||
|
'DEFAULT/san_login': value => $plugin_settings['emc_username'];
|
||||||
|
'DEFAULT/san_password': value => $plugin_settings['emc_password'];
|
||||||
|
'DEFAULT/storage_vnx_authentication_type': value => 'global';
|
||||||
|
'DEFAULT/destroy_empty_storage_group': value => 'True';
|
||||||
|
'DEFAULT/attach_detach_batch_interval': value => '-1';
|
||||||
|
'DEFAULT/naviseccli_path': value => '/opt/Navisphere/bin/naviseccli';
|
||||||
|
'DEFAULT/initiator_auto_registration': value => 'True';
|
||||||
|
'DEFAULT/default_timeout': value => '10';
|
||||||
|
'DEFAULT/use_multipath_for_image_xfer': value => 'True';
|
||||||
|
'DEFAULT/host': value => 'cinder';
|
||||||
|
}
|
||||||
|
|
||||||
|
if $plugin_settings['emc_pool_name'] {
|
||||||
|
cinder_config {
|
||||||
|
'DEFAULT/storage_vnx_pool_name': value => $plugin_settings['emc_pool_name'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Cinder_config<||> ~> Service['cinder_volume']
|
||||||
|
|
||||||
|
file {'cinder-volume-agent-ocf':
|
||||||
|
path =>'/usr/lib/ocf/resource.d/fuel/cinder-volume',
|
||||||
|
mode => '0755',
|
||||||
|
owner => root,
|
||||||
|
group => root,
|
||||||
|
source => 'puppet:///modules/plugin_emc_vnx/ocf/cinder-volume',
|
||||||
|
before => Service['cinder_volume'],
|
||||||
|
}
|
||||||
|
|
||||||
|
service { 'cinder_volume-init_stopped':
|
||||||
|
ensure => stopped,
|
||||||
|
name => $::cinder::params::volume_service,
|
||||||
|
enable => false,
|
||||||
|
hasstatus => true,
|
||||||
|
hasrestart => true,
|
||||||
|
before => Service['cinder_volume'],
|
||||||
|
}
|
||||||
|
|
||||||
|
service { 'cinder_volume':
|
||||||
|
ensure => running,
|
||||||
|
name => "p_${::cinder::params::volume_service}",
|
||||||
|
enable => true,
|
||||||
|
hasstatus => true,
|
||||||
|
hasrestart => true,
|
||||||
|
provider => 'pacemaker',
|
||||||
|
require => Package[$::plugin_emc_vnx::params::navicli_package_name],
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
#
|
||||||
|
# Copyright 2015 Mirantis, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
#
|
||||||
|
class plugin_emc_vnx {}
|
|
@ -0,0 +1,37 @@
|
||||||
|
#
|
||||||
|
# Copyright 2015 Mirantis, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
#
|
||||||
|
class plugin_emc_vnx::params {
|
||||||
|
|
||||||
|
case $::osfamily {
|
||||||
|
'Debian': {
|
||||||
|
$navicli_package_name = 'navicli-linux-64-x86-en-us'
|
||||||
|
$iscsi_package_name = 'open-iscsi'
|
||||||
|
$iscsi_service_name = 'open-iscsi'
|
||||||
|
$multipath_package_name = 'multipath-tools'
|
||||||
|
$multipath_service_name = 'multipath-tools'
|
||||||
|
}
|
||||||
|
'RedHat': {
|
||||||
|
$navicli_package_name = 'NaviCLI-Linux-64-x86-en_US'
|
||||||
|
$iscsi_package_name = 'iscsi-initiator-utils'
|
||||||
|
$iscsi_service_name = false
|
||||||
|
$multipath_package_name = 'device-mapper-multipath'
|
||||||
|
$multipath_service_name = 'multipathd'
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
fail("unsuported osfamily ${::osfamily}, currently Debian and Redhat are the only supported platforms")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
#
|
||||||
|
# Copyright 2015 Mirantis, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
#
|
||||||
|
class plugin_emc_vnx::primary_controller {
|
||||||
|
|
||||||
|
include plugin_emc_vnx::controller
|
||||||
|
|
||||||
|
cs_resource { "p_${::cinder::params::volume_service}":
|
||||||
|
ensure => present,
|
||||||
|
require => File['cinder-volume-agent-ocf'],
|
||||||
|
primitive_class => 'ocf',
|
||||||
|
provided_by => 'fuel',
|
||||||
|
primitive_type => 'cinder-volume',
|
||||||
|
metadata => { 'resource-stickiness' => '100' },
|
||||||
|
parameters => {
|
||||||
|
'amqp_server_port' => hiera('amqp_port'),
|
||||||
|
'multibackend' => true,
|
||||||
|
},
|
||||||
|
operations => {
|
||||||
|
'monitor' => {
|
||||||
|
'interval' => '20',
|
||||||
|
'timeout' => '10'
|
||||||
|
}
|
||||||
|
,
|
||||||
|
'start' => {
|
||||||
|
'timeout' => '60'
|
||||||
|
}
|
||||||
|
,
|
||||||
|
'stop' => {
|
||||||
|
'timeout' => '60'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
Service['cinder_volume-init_stopped'] ->
|
||||||
|
Cs_resource["p_${::cinder::params::volume_service}"] ->
|
||||||
|
Service['cinder_volume']
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
attributes:
|
||||||
|
emc_username:
|
||||||
|
value: "username"
|
||||||
|
label: "EMC VNX username"
|
||||||
|
description: "EMC VNX username."
|
||||||
|
weight: 75
|
||||||
|
type: "text"
|
||||||
|
regex:
|
||||||
|
source: '\S'
|
||||||
|
error: "Username field cannot be empty"
|
||||||
|
emc_password:
|
||||||
|
value: "password"
|
||||||
|
label: "EMC VNX password"
|
||||||
|
description: "EMC VNX password."
|
||||||
|
weight: 80
|
||||||
|
type: "password"
|
||||||
|
regex:
|
||||||
|
source: '\S'
|
||||||
|
error: "Password field cannot be empty"
|
||||||
|
emc_sp_a_ip:
|
||||||
|
value: ""
|
||||||
|
label: "EMC VNX SP A IP"
|
||||||
|
description: "EMC VNX Service Processor A IP address."
|
||||||
|
weight: 90
|
||||||
|
type: "text"
|
||||||
|
regex:
|
||||||
|
source: '^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'
|
||||||
|
error: "Specify valid IPv4 address"
|
||||||
|
emc_sp_b_ip:
|
||||||
|
value: ""
|
||||||
|
label: "EMC VNX SP B IP"
|
||||||
|
description: "EMC VNX Service Processor B IP address."
|
||||||
|
weight: 90
|
||||||
|
type: "text"
|
||||||
|
regex:
|
||||||
|
source: '^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'
|
||||||
|
error: "Specify valid IPv4 address"
|
||||||
|
emc_pool_name:
|
||||||
|
value: ""
|
||||||
|
label: "EMC VNX pool name"
|
||||||
|
description: "EMC VNX pool name (optional)"
|
||||||
|
weight: 95
|
||||||
|
type: "text"
|
|
@ -0,0 +1,33 @@
|
||||||
|
# Plugin name
|
||||||
|
name: emc_vnx
|
||||||
|
title: EMC VNX driver for Cinder
|
||||||
|
# Plugin version
|
||||||
|
version: 1.0.0
|
||||||
|
# Description
|
||||||
|
description: Enables EMC VNX driver in Cinder
|
||||||
|
# Required fuel version
|
||||||
|
fuel_version: ['6.1']
|
||||||
|
# Groups
|
||||||
|
groups: ['storage::cinder']
|
||||||
|
# Licenses
|
||||||
|
licenses: ['Apache License, Version 2.0']
|
||||||
|
# Homepage
|
||||||
|
homepage: 'https://github.com/stackforge/fuel-plugin-external-emc'
|
||||||
|
# Authors
|
||||||
|
authors: ['Dmitry Klenov <dklenov@mirantis.com>', 'Piotr Misiak <pmisiak@mirantis.com>', 'Szymon Banka <sbanka@mirantis.com>', 'Dmitry Kalashnik <dkalashnik@mirantis.com>']
|
||||||
|
|
||||||
|
# The plugin is compatible with releases in the list
|
||||||
|
releases:
|
||||||
|
- os: ubuntu
|
||||||
|
version: 2014.2-6.1
|
||||||
|
mode: ['ha']
|
||||||
|
deployment_scripts_path: deployment_scripts/
|
||||||
|
repository_path: repositories/ubuntu
|
||||||
|
- os: centos
|
||||||
|
version: 2014.2-6.1
|
||||||
|
mode: ['ha']
|
||||||
|
deployment_scripts_path: deployment_scripts/
|
||||||
|
repository_path: repositories/centos
|
||||||
|
|
||||||
|
# Version of plugin package
|
||||||
|
package_version: '2.0.0'
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
ROOT="$(dirname `readlink -f $0`)"
|
||||||
|
RPM_REPO="${ROOT}"/repositories/centos/
|
||||||
|
DEB_REPO="${ROOT}"/repositories/ubuntu/
|
||||||
|
mkdir -p $RPM_REPO
|
||||||
|
mkdir -p $DEB_REPO
|
||||||
|
|
||||||
|
# Downloads needed RPM or DEB packages
|
||||||
|
function download {
|
||||||
|
case "$1" in
|
||||||
|
deb) REPO=$DEB_REPO;;
|
||||||
|
rpm) REPO=$RPM_REPO;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
FILE=$(basename "$1")
|
||||||
|
wget -qO - $1 > "$REPO/$FILE"
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
download deb http://mirrors.kernel.org/ubuntu/pool/main/m/multipath-tools/multipath-tools_0.4.9-3ubuntu5_amd64.deb \
|
||||||
|
http://fuel-repository.mirantis.com/fuel-plugins/emc/ubuntu/navicli-linux-64-x86-en-us_7.33.2.0.51-1_all.deb
|
||||||
|
|
||||||
|
download rpm http://mirror.centos.org/centos/6/os/x86_64/Packages/device-mapper-multipath-0.4.9-80.el6.x86_64.rpm \
|
||||||
|
http://mirror.centos.org/centos/6/os/x86_64/Packages/device-mapper-multipath-libs-0.4.9-80.el6.x86_64.rpm \
|
||||||
|
http://mirror.centos.org/centos/6/os/x86_64/Packages/kpartx-0.4.9-80.el6.x86_64.rpm \
|
||||||
|
http://fuel-repository.mirantis.com/fuel-plugins/emc/centos/NaviCLI-Linux-64-x86-en_US-7.33.3.0.72-1.x86_64.rpm
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
- role: ['primary-controller']
|
||||||
|
stage: post_deployment/6100
|
||||||
|
type: puppet
|
||||||
|
parameters:
|
||||||
|
puppet_manifest: puppet/manifests/primary_controller.pp
|
||||||
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||||
|
timeout: 360
|
||||||
|
- role: ['controller']
|
||||||
|
stage: post_deployment/6101
|
||||||
|
type: puppet
|
||||||
|
parameters:
|
||||||
|
puppet_manifest: puppet/manifests/controller.pp
|
||||||
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||||
|
timeout: 360
|
||||||
|
- role: ['compute']
|
||||||
|
stage: post_deployment/6102
|
||||||
|
type: puppet
|
||||||
|
parameters:
|
||||||
|
puppet_manifest: puppet/manifests/compute.pp
|
||||||
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||||
|
timeout: 360
|
Loading…
Reference in New Issue