File ardana-cinder-8.0+git.1596129856.263f430.obscpio of Package ardana-cinder
07070100000000000081A40000000000000000000000015F230240000000B3000000000000000000000000000000000000003A00000000ardana-cinder-8.0+git.1596129856.263f430/.copyrightignoreardana-ci/tests/cinder_volume_run_location_ccp.fact
ardana-ci/tests/cinder_backend_assignment.fact
roles/CND-API/templates/api-paste.ini.j2
roles/CND-API/templates/policy.json.j2
07070100000001000081A40000000000000000000000015F23024000000082000000000000000000000000000000000000003400000000ardana-cinder-8.0+git.1596129856.263f430/.gitreview[gerrit]
host=gerrit.suse.provo.cloud
port=29418
project=ardana/cinder-ansible.git
defaultremote=ardana
defaultbranch=stable/pike
07070100000002000081A40000000000000000000000015F2302400000000C000000000000000000000000000000000000003700000000ardana-cinder-8.0+git.1596129856.263f430/.rsync-filter- ardana-ci
07070100000003000081A40000000000000000000000015F2302400000279F000000000000000000000000000000000000003100000000ardana-cinder-8.0+git.1596129856.263f430/LICENSE
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.
07070100000004000081A40000000000000000000000015F23024000000BB1000000000000000000000000000000000000003300000000ardana-cinder-8.0+git.1596129856.263f430/README.md
(c) Copyright 2015 Hewlett Packard Enterprise Development LP
(c) Copyright 2017 SUSE LLC
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.
README
======
The cinder repo will have the following roles:
- CND-VOL
- CND-API
- CND-SCH
- CND-BCK
In time the role names, specified in the configuration processor will change
to: cinder-volume, cinder-api, cinder-scheduler and cinder-backup.
The service verbs are:
- install
- configure
- start
- stop
An example of the cinder-ansible structure:
```
└── cinder-ansible
├── filter_plugins
├── library
├── README.md
└── roles
├── cinder
│ ├── defaults
│ ├── files
│ ├── handlers
│ ├── meta
│ ├── tasks
│ │ └── cinder-deploy.yml
│ ├── templates
│ └── vars
├── cinder-volume
│ ├── defaults
│ ├── files
│ ├── handlers
│ ├── meta
│ ├── tasks
│ │ ├── configure.yml
│ │ ├── install.yml
│ │ └── start.yml
│ ├── templates
│ └── vars
├── cinder-api
│ ├── defaults
│ ├── files
│ ├── handlers
│ ├── meta
│ ├── tasks
│ │ ├── configure.yml
│ │ ├── install.yml
│ │ └── start.yml
│ ├── templates
│ └── vars
├── cinder-scheduler
│ ├── defaults
│ ├── files
│ ├── handlers
│ ├── meta
│ ├── tasks
│ │ ├── configure.yml
│ │ ├── install.yml
│ │ └── start.yml
│ ├── templates
│ └── vars
└── cinder-backup
├── defaults
├── files
├── handlers
├── meta
├── tasks
│ ├── configure.yml
│ ├── install.yml
│ └── start.yml
├── templates
└── vars
```
07070100000005000081A40000000000000000000000015F23024000000736000000000000000000000000000000000000003F00000000ardana-cinder-8.0+git.1596129856.263f430/_cinder-configure.yml#
# (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- hosts: CND-VOL:CND-API:CND-SCH:CND-BCK
roles:
- CND-VOL
tasks:
- include: roles/CND-VOL/tasks/validate-config.yml
- hosts: CND-VOL:CND-API:CND-SCH:CND-BCK:!LOG-PRO
roles:
- _CND-CMN
tasks:
- include: roles/_CND-CMN/tasks/logrotate-configure.yml
- hosts: CND-API
become: yes
roles:
- CND-API
tasks:
- include: roles/CND-API/tasks/keystone_conf.yml
ansible_python_interpreter: >
{{ KEY_CLI.vars.keystone_client_python_interpreter }}
- include: roles/CND-API/tasks/keystone_get_conf.yml
ansible_python_interpreter: >
{{ KEY_CLI.vars.keystone_client_python_interpreter }}
- hosts: CND-API
roles:
- CND-API
tasks:
- include: roles/CND-API/tasks/configure.yml
- hosts: CND-API
become: yes
roles:
- CND-API
tasks:
- include: roles/CND-API/tasks/db_configure.yml
- hosts: CND-SCH
become: yes
roles:
- CND-SCH
tasks:
- include: roles/CND-SCH/tasks/configure.yml
- hosts: CND-VOL
become: yes
roles:
- CND-VOL
tasks:
- include: roles/CND-VOL/tasks/configure.yml
- hosts: CND-BCK
become: yes
roles:
- CND-BCK
tasks:
- include: roles/CND-BCK/tasks/configure.yml
07070100000006000081A40000000000000000000000015F230240000004B6000000000000000000000000000000000000003D00000000ardana-cinder-8.0+git.1596129856.263f430/_cinder-install.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- hosts: CND-API
become: yes
roles:
- CND-API
tasks:
- include: roles/CND-API/tasks/install.yml
- hosts: CND-SCH
become: yes
roles:
- CND-SCH
tasks:
- include: roles/CND-SCH/tasks/install.yml
- hosts: CND-VOL
become: yes
roles:
- CND-VOL
tasks:
- include: roles/CND-VOL/tasks/install.yml
- hosts: CND-BCK
become: yes
roles:
- CND-BCK
tasks:
- include: roles/CND-BCK/tasks/install.yml
- hosts: CND-VOL:NOV-CMP
become: yes
roles:
- CND-SVC
tasks:
- include: roles/CND-SVC/tasks/install.yml
07070100000007000081A40000000000000000000000015F23024000000471000000000000000000000000000000000000003E00000000ardana-cinder-8.0+git.1596129856.263f430/_cinder-populate.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- hosts: CND-API
become: yes
roles:
- CND-API
tasks:
- include: roles/CND-API/tasks/populate.yml
- hosts: CND-SCH
become: yes
roles:
- CND-SCH
tasks:
- include: roles/CND-SCH/tasks/populate.yml
- hosts: CND-VOL
become: yes
roles:
- CND-VOL
tasks:
- include: roles/CND-VOL/tasks/populate.yml
- hosts: CND-BCK
become: yes
roles:
- CND-BCK
tasks:
- include: roles/CND-BCK/tasks/populate.yml
- include: cinder-configure-monasca.yml
07070100000008000081A40000000000000000000000015F230240000002E1000000000000000000000000000000000000004600000000ardana-cinder-8.0+git.1596129856.263f430/_cinder-schedule-restart.yml#
# (c) Copyright 2018 SUSE LLC
#
# 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.
#
---
# Schedule a restart of all cinder services using ardana_notify_... variables
- hosts: all
tasks:
- include: roles/_CND-CMN/tasks/_schedule_restart.yml07070100000009000081A40000000000000000000000015F230240000002F7000000000000000000000000000000000000004000000000ardana-cinder-8.0+git.1596129856.263f430/_cinder_post_check.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- hosts: CND-API[0]
become: yes
roles:
- _CND-CMN
tasks:
- include: roles/_CND-CMN/tasks/api_status.yml
0707010000000A000041ED0000000000000000000000065F23024000000000000000000000000000000000000000000000003300000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci0707010000000B000041ED0000000000000000000000035F23024000000000000000000000000000000000000000000000005400000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/cp1-shared-cp2-cinder-cp3-cinder0707010000000C000041ED0000000000000000000000035F23024000000000000000000000000000000000000000000000006000000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/cp1-shared-cp2-cinder-cp3-cinder/input-model0707010000000D000041ED0000000000000000000000035F23024000000000000000000000000000000000000000000000006500000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/cp1-shared-cp2-cinder-cp3-cinder/input-model/data0707010000000E000081A40000000000000000000000015F23024000001637000000000000000000000000000000000000007700000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/cp1-shared-cp2-cinder-cp3-cinder/input-model/data/control_plane.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
control-planes:
- name: cp1
control-plane-prefix: cp1
failure-zones:
- AZ1
- AZ2
- AZ3
configuration-data:
- SWIFT-CONFIG-CP1
common-service-components:
- lifecycle-manager-target
load-balancers:
- name: lb
provider: ip-cluster
tls-components:
- default
components:
- rabbitmq
- mysql
roles:
- internal
- admin
- name: extlb
provider: ip-cluster
external-name: myardana-cp1.test
cert-file: my-public-cp1-cert
tls-components:
- default
roles:
- public
clusters:
- name: ctrl-cp1
cluster-prefix: c1
server-role:
- CP1-CONTROLLER-ROLE
member-count: 1
allocation-policy: strict
service-components:
- lifecycle-manager
- lifecycle-manager-target
- ntp-server
- mysql
- ip-cluster
- keystone-api
- rabbitmq
- memcached
- cinder-client
- swift-proxy
- swift-account
- swift-container
- swift-object
- swift-ring-builder
- swift-client
- glance-api:
ha_mode: false
glance_stores: 'file'
glance_default_store: 'file'
- glance-registry
- name: cp2
control-plane-prefix: cp2
uses:
- from: cp1
service-components:
- all
failure-zones:
- AZ1
- AZ2
- AZ3
common-service-components:
- lifecycle-manager-target
- ntp-client
load-balancers:
- name: lb
provider: ip-cluster
tls-components:
- default
components:
- rabbitmq
- mysql
- nova-metadata
roles:
- internal
- admin
- name: extlb
provider: ip-cluster
external-name: myardana-cp2.test
cert-file: my-public-cp2-cert
tls-components:
- default
roles:
- public
clusters:
- name: ctrl-cp2
cluster-prefix: c2
server-role:
- CP2-CONTROLLER-ROLE
member-count: 3
allocation-policy: strict
service-components:
- mysql
- rabbitmq
- ip-cluster
- cinder-api
- cinder-scheduler
- cinder-volume
- cinder-backup
- cinder-client
- nova-api
- nova-scheduler
- nova-conductor
- nova-console-auth
- nova-novncproxy
- neutron-server
- neutron-ml2-plugin
- neutron-vpn-agent
- neutron-dhcp-agent
- neutron-metadata-agent
- neutron-openvswitch-agent
resources:
- name: compute
resource-prefix: comp
server-role: CP2-COMPUTE-ROLE
allocation-policy: any
service-components:
- nova-compute-kvm
- nova-compute
- neutron-l3-agent
- neutron-metadata-agent
- neutron-openvswitch-agent
- neutron-lbaasv2-agent
- name: cp3
control-plane-prefix: cp3
uses:
- from: cp1
service-components:
- all
failure-zones:
- AZ1
- AZ2
- AZ3
common-service-components:
- lifecycle-manager-target
- ntp-client
load-balancers:
- name: lb
provider: ip-cluster
tls-components:
- default
components:
- rabbitmq
- mysql
- nova-metadata
roles:
- internal
- admin
- name: extlb
provider: ip-cluster
external-name: myardana-cp3.test
cert-file: my-public-cp3-cert
tls-components:
- default
roles:
- public
clusters:
- name: ctrl-cp3
cluster-prefix: c3
server-role:
- CP3-CONTROLLER-ROLE
member-count: 2
allocation-policy: strict
service-components:
- mysql
- rabbitmq
- ip-cluster
- cinder-api
- cinder-scheduler
- cinder-volume
- cinder-backup
- cinder-client
- nova-api
- nova-scheduler
- nova-conductor
- nova-console-auth
- nova-novncproxy
- neutron-server
- neutron-ml2-plugin
- neutron-vpn-agent
- neutron-dhcp-agent
- neutron-metadata-agent
- neutron-openvswitch-agent
0707010000000F000081A40000000000000000000000015F23024000000B06000000000000000000000000000000000000006F00000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/cp1-shared-cp2-cinder-cp3-cinder/input-model/data/disks.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
disk-models:
- name: CONTROLLER-DISKS
volume-groups:
# The policy is not to consume 100% of the space of each volume group.
# 5% should be left free for snapshots and to allow for some flexibility.
# sda_root is a templated value to align with whatever partition is really used
# This value is checked in os config and replaced by the partition actually used
# on sda e.g. sda1 or sda5
- name: ardana-vg
physical-volumes:
- /dev/sda_root
logical-volumes:
- name: root
size: 75%
fstype: ext4
mount: /
- name: log
size: 15%
mount: /var/log
fstype: ext4
mkfs-opts: -O large_file
- name: crash
size: 2%
mount: /var/crash
fstype: ext4
mkfs-opts: -O large_file
device-groups:
- name: swiftobj
devices:
- name: /dev/sdb
- name: /dev/sdc
- name: /dev/sdd
consumer:
name: swift
attrs:
rings:
- account
- container
- object-0
- name: cinder-volume
devices:
- name: /dev/sde
consumer:
name: cinder
- name: COMPUTE-DISKS
volume-groups:
# The policy is not to consume 100% of the space of each volume group.
# 5% should be left free for snapshots and to allow for some flexibility.
# sda_root is a templated value to align with whatever partition is really used
# This value is checked in os config and replaced by the partition actually used
# on sda e.g. sda1 or sda5
- name: ardana-vg
physical-volumes:
- /dev/sda_root
logical-volumes:
- name: root
size: 65%
fstype: ext4
mount: /
- name: log
size: 15%
mount: /var/log
fstype: ext4
mkfs-opts: -O large_file
- name: crash
size: 15%
mount: /var/crash
fstype: ext4
mkfs-opts: -O large_file
07070100000010000081A40000000000000000000000015F23024000000519000000000000000000000000000000000000007800000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/cp1-shared-cp2-cinder-cp3-cinder/input-model/data/network_groups.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
network-groups:
- name: ARDANA
hostname-suffix: ardana
component-endpoints:
- lifecycle-manager
- lifecycle-manager-target
- name: MANAGEMENT
hostname-suffix: mgmt
hostname: true
tags:
- neutron.networks.vxlan
- neutron.networks.vlan:
provider-physical-network: physnet1
# tls-component-endpoints:
# - barbican-api
component-endpoints:
- default
# routes:
# - default
load-balancers:
- extlb
- lb
- name: EXTERNAL-VM
tags:
- neutron.l3_agent.external_network_bridge
07070100000011000081A40000000000000000000000015F230240000003FF000000000000000000000000000000000000007100000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/cp1-shared-cp2-cinder-cp3-cinder/input-model/data/regions.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
regions:
- name: region1
includes:
- control-plane: cp1
services:
- all
- control-plane: cp2
services:
- all
- name: region2
includes:
- control-plane: cp1
services:
- all
- control-plane: cp3
services:
- all
07070100000012000081A40000000000000000000000015F230240000004B4000000000000000000000000000000000000007600000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/cp1-shared-cp2-cinder-cp3-cinder/input-model/data/server_roles.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
server-roles:
- name: CP1-CONTROLLER-ROLE
interface-model: NET-INTERFACES
disk-model: CONTROLLER-DISKS
- name: CP2-CONTROLLER-ROLE
interface-model: NET-INTERFACES
disk-model: CONTROLLER-DISKS
- name: CP3-CONTROLLER-ROLE
interface-model: NET-INTERFACES
disk-model: CONTROLLER-DISKS
- name: CP2-COMPUTE-ROLE
interface-model: NET-INTERFACES
disk-model: COMPUTE-DISKS
- name: CP3-COMPUTE-ROLE
interface-model: NET-INTERFACES
disk-model: COMPUTE-DISKS
07070100000013000081A40000000000000000000000015F230240000009C0000000000000000000000000000000000000007100000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/cp1-shared-cp2-cinder-cp3-cinder/input-model/data/servers.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
baremetal:
netmask: 255.255.255.0
subnet: 192.168.110.0
server-interface: eth2
servers:
- id: server1
ip-addr: 192.168.110.3
role: CP1-CONTROLLER-ROLE
server-group: RACK1
mac-addr: a4:93:0c:4f:7c:73
nic-mapping: VAGRANT
ilo-ip: 192.168.109.3
ilo-password: password
ilo-user: admin
- id: server2
ip-addr: 192.168.110.4
role: CP2-CONTROLLER-ROLE
server-group: RACK1
mac-addr: b2:72:8d:ac:7c:6f
nic-mapping: VAGRANT
ilo-ip: 192.168.109.4
ilo-password: password
ilo-user: admin
- id: server3
ip-addr: 192.168.110.5
role: CP2-CONTROLLER-ROLE
server-group: RACK2
mac-addr: 8a:8e:64:55:43:76
nic-mapping: VAGRANT
ilo-ip: 192.168.109.5
ilo-password: password
ilo-user: admin
- id: server4
ip-addr: 192.168.110.6
role: CP2-CONTROLLER-ROLE
server-group: RACK3
mac-addr: 8a:8e:64:55:43:77
nic-mapping: VAGRANT
ilo-ip: 192.168.109.6
ilo-password: password
ilo-user: admin
- id: server5
ip-addr: 192.168.110.7
role: CP3-CONTROLLER-ROLE
server-group: RACK1
mac-addr: 8a:8e:64:55:43:78
nic-mapping: VAGRANT
ilo-ip: 192.168.109.7
ilo-password: password
ilo-user: admin
- id: server6
ip-addr: 192.168.110.8
role: CP3-CONTROLLER-ROLE
server-group: RACK2
mac-addr: 8a:8e:64:55:43:79
nic-mapping: VAGRANT
ilo-ip: 192.168.109.8
ilo-password: password
ilo-user: admin
- id: server7
ip-addr: 192.168.110.30
role: CP2-COMPUTE-ROLE
server-group: RACK1
nic-mapping: VAGRANT
mac-addr: a0:00:00:00:00:30
ilo-ip: 192.168.109.12
ilo-user: admin
ilo-password: password
07070100000014000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000006B00000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/cp1-shared-cp2-cinder-cp3-cinder/input-model/data/swift07070100000015000081A40000000000000000000000015F23024000000609000000000000000000000000000000000000007C00000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/cp1-shared-cp2-cinder-cp3-cinder/input-model/data/swift/swift_config.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
configuration-data:
- name: SWIFT-CONFIG-CP1
services:
- swift
data:
control_plane_rings:
swift-zones:
- id: 1
server-groups:
- CLOUD
rings:
- name: account
display-name: Account Ring
min-part-hours: 16
partition-power: 12
replication-policy:
replica-count: 3
- name: container
display-name: Container Ring
min-part-hours: 16
partition-power: 12
replication-policy:
replica-count: 3
- name: object-0
display-name: General
default: yes
min-part-hours: 16
partition-power: 12
replication-policy:
replica-count: 3
07070100000016000041ED0000000000000000000000035F23024000000000000000000000000000000000000000000000003B00000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/project07070100000017000041ED0000000000000000000000035F23024000000000000000000000000000000000000000000000004700000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/project/input-model07070100000018000041ED0000000000000000000000045F23024000000000000000000000000000000000000000000000004C00000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/project/input-model/data07070100000019000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000005300000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/project/input-model/data/cinder0707010000001A000081A40000000000000000000000015F230240000006D6000000000000000000000000000000000000006500000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/project/input-model/data/cinder/cinder_config.yml#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
configuration-data:
- name: CINDER-CONFIG-CP1
services:
- cinder
data:
LVM1-CONFIG-CP1:
volume-types:
- thin
failure-zone:
- AZ1
backend-config:
volume_group: cinder-volumes
lvm_type: thin
volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver
volume_backend_name: LVM_iSCSI_1
LVM2-CONFIG-CP1:
volume-types:
- thin
failure-zone:
- AZ2
backend-config:
volume_group: cinder-volumes
lvm_type: thin
volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver
volume_backend_name: LVM_iSCSI_2
LVM3-CONFIG-CP1:
volume-types:
- thin
failure-zone:
- AZ3
backend-config:
volume_group: cinder-volumes
lvm_type: thin
volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver
volume_backend_name: LVM_iSCSI_3
0707010000001B000081A40000000000000000000000015F23024000000AB5000000000000000000000000000000000000005E00000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/project/input-model/data/control_plane.yml#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
control-planes:
- name: ccp
control-plane-prefix: ccp
region-name: region1
failure-zones:
- AZ1
- AZ2
- AZ3
configuration-data:
- CINDER-CONFIG-CP1
common-service-components:
- lifecycle-manager-target
- monasca-agent
clusters:
- name: cluster0
cluster-prefix: deployer
server-role:
- DEPLOYER-ROLE
member-count: 1
allocation-policy: strict
service-components:
- lifecycle-manager
- ntp-client
- openstack-client
- tempest
- cinder-client
- swift-client
- monasca-client
- name: cluster1
cluster-prefix: monasca
server-role:
- MONASCA-ROLE
member-count: 1
allocation-policy: strict
service-components:
- ntp-client
# monasca
- kafka
- zookeeper
- vertica
- monasca-api
- monasca-persister
# memcached required for swift
- memcached
- name: cluster2
cluster-prefix: db-rmq-key
server-role:
- MYSQL-RMQ-KEYSTONE-ROLE
member-count: 1
allocation-policy: strict
service-components:
- ntp-server
- mysql
- rabbitmq
- keystone-client
- keystone-api
- name: cluster3
cluster-prefix: controller
server-role:
- CONTROLLER-ROLE
member-count: 3
allocation-policy: strict
service-components:
- ntp-client
- cinder-api
- cinder-scheduler
- cinder-volume
- cinder-backup
- cinder-client
- ip-cluster
- swift-ring-builder
- swift-proxy
- swift-account
- swift-container
- swift-object
- swift-client
0707010000001C000081A40000000000000000000000015F23024000000789000000000000000000000000000000000000005600000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/project/input-model/data/disks.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
disk-models:
- name: DISKS
volume-groups:
# The policy is not to consume 100% of the space of each volume group.
# 5% should be left free for snapshots and to allow for some flexibility.
# sda_root is a templated value to align with whatever partition is really used
# This value is checked in os config and replaced by the partition actually used
# on sda e.g. sda1 or sda5
- name: ardana-vg
physical-volumes:
- /dev/sda_root
logical-volumes:
- name: root
size: 75%
fstype: ext4
mount: /
- name: log
size: 15%
mount: /var/log
fstype: ext4
mkfs-opts: -O large_file
- name: crash
size: 2%
mount: /var/crash
fstype: ext4
mkfs-opts: -O large_file
device-groups:
- name: swiftobj
devices:
- name: /dev/sdc
- name: /dev/sdd
consumer:
name: swift
attrs:
rings:
- account
- container
- object-0
- name: cinder-volume
devices:
- name: /dev/sde
consumer:
name: cinder
0707010000001D000081A40000000000000000000000015F23024000000404000000000000000000000000000000000000005D00000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/project/input-model/data/server_roles.yml#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
server-roles:
- name: DEPLOYER-ROLE
interface-model: NET-INTERFACES
disk-model: DISKS
- name: MONASCA-ROLE
interface-model: NET-INTERFACES
disk-model: DISKS
- name: MYSQL-RMQ-KEYSTONE-ROLE
interface-model: NET-INTERFACES
disk-model: DISKS
- name: CONTROLLER-ROLE
interface-model: NET-INTERFACES
disk-model: DISKS
0707010000001E000081A40000000000000000000000015F230240000008BB000000000000000000000000000000000000005800000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/project/input-model/data/servers.yml#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
baremetal:
netmask: 255.255.255.0
subnet: 192.168.110.0
server-interface: eth2
servers:
- id: server1
ip-addr: 192.168.110.3
role: DEPLOYER-ROLE
server-group: RACK1
mac-addr: a4:93:0c:4f:7c:73
nic-mapping: VAGRANT
ilo-ip: 192.168.109.3
ilo-password: password
ilo-user: admin
- id: server2
ip-addr: 192.168.110.4
role: MONASCA-ROLE
server-group: RACK1
mac-addr: b2:72:8d:ac:7c:6f
nic-mapping: VAGRANT
ilo-ip: 192.168.109.4
ilo-password: password
ilo-user: admin
- id: server3
ip-addr: 192.168.110.5
role: MYSQL-RMQ-KEYSTONE-ROLE
server-group: RACK2
mac-addr: 8a:8e:64:55:43:76
nic-mapping: VAGRANT
ilo-ip: 192.168.109.5
ilo-password: password
ilo-user: admin
- id: server4
ip-addr: 192.168.110.6
role: CONTROLLER-ROLE
server-group: RACK3
mac-addr: 26:67:3e:49:5a:a7
nic-mapping: VAGRANT
ilo-ip: 192.168.109.6
ilo-password: password
ilo-user: admin
- id: server5
ip-addr: 192.168.110.7
role: CONTROLLER-ROLE
server-group: RACK1
mac-addr: d6:70:c1:36:43:f7
nic-mapping: VAGRANT
ilo-ip: 192.168.109.7
ilo-password: password
ilo-user: admin
- id: server6
ip-addr: 192.168.110.8
role: CONTROLLER-ROLE
server-group: RACK2
mac-addr: 8e:8e:62:a6:ce:76
nic-mapping: VAGRANT
ilo-ip: 192.168.109.8
ilo-password: password
ilo-user: admin
0707010000001F000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000005200000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/project/input-model/data/swift07070100000020000081A40000000000000000000000015F2302400000055C000000000000000000000000000000000000005C00000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/project/input-model/data/swift/rings.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
ring-specifications:
- region-name: region1
swift-zones:
- id: 1
server-groups:
- CLOUD
rings:
- name: account
display-name: Account Ring
min-part-hours: 16
partition-power: 12
replication-policy:
replica-count: 3
- name: container
display-name: Container Ring
min-part-hours: 16
partition-power: 12
replication-policy:
replica-count: 3
- name: object-0
display-name: General
default: yes
min-part-hours: 16
partition-power: 12
replication-policy:
replica-count: 3
07070100000021000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003900000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests07070100000022000081A40000000000000000000000015F23024000000679000000000000000000000000000000000000004300000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/README.md
(c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
(c) Copyright 2017 SUSE LLC
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.
README
======
This directory contains the test-plan that executes the playbooks and test
scripts during the project specific CI job for cinder-ansible.
To run test-plan.yml locally on your own test environment:
cd ~/ardana-dev-tools/ardana-vagrant-models/project-vagrant
../../bin/test-project-stack.sh --ci ardana/cinder-ansible
The cinder-ansible playbooks are tested with two different storage
backend configurations:
- New Storage Input Model
- Jinja2 Configuration
After test-plan.yml has completed, the storage backends will be
configured with Jinja2. To revert back to the original Storage Input
Model configuration, ssh to the deployer (server1) and run the
revert-to-storage-input-model.bash script in ~/ardana-ci-tests/.
Node Hostname Reference:
- server1 project-ccp-deployer-m1-ardana
- server2 project-ccp-monasca-m1-ardana
- server3 project-ccp-db-rmq-key-m1-ardana
- server4 project-ccp-controller-m3-ardana
- server5 project-ccp-controller-m1-ardana
- server6 project-ccp-controller-m2-ardana
07070100000023000081A40000000000000000000000015F23024000003CD1000000000000000000000000000000000000004800000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/cinder.conf.j2{#
#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
#}
[DEFAULT]
# Print debugging output (set logging level to DEBUG instead
# of default WARNING level). (boolean value)
debug={{ cinder_debug }}
enable_v3_api=True
osapi_volume_listen = {{ cinder_osapi_volume_listen }}
osapi_volume_listen_port = {{ cinder_osapi_volume_listen_port }}
{% if cinder_glance_url is defined %}
glance_api_servers = {{ cinder_glance_url }}
{% endif %}
{% if cinder_backup_swift_url is defined and cinder_backup_swift_url %}
backup_swift_url = {{ cinder_backup_swift_url }}
swift_catalog_info = object-store:swift:internalURL
{% endif %}
{% if cinder_volume_nova_url is defined %}
nova_endpoint_template = {{ cinder_volume_nova_url }}/%(project_id)s
nova_endpoint_admin_template = {{ cinder_volume_nova_url }}/%(project_id)s
os_region_name = {{ cinder_keystone.region_name }}
nova_catalog_info = compute:nova:internalURL
nova_catalog_admin_info = compute:nova:adminURL
{% endif %}
{% block api_paste_config %}
# Versioned api-paste.ini specified where appropriate.
#api_paste_config = /etc/cinder/api-paste.ini
{% endblock api_paste_config %}
auth_strategy = keystone
state_path = {{ cinder_state_path }}
{% if cinder_image_conversion_dir is defined %}
image_conversion_dir={{ cinder_image_conversion_dir }}
{% endif %}
iscsi_helper={{ cinder_iscsi_helper }}
{% if cinder_public_endpoint is defined %}
# Uncomment to set the public API in the links responses
#public_endpoint = {{ cinder_public_endpoint }}
#osapi_volume_base_URL = {{ cinder_public_endpoint }}
{% endif %}
# behind haproxy record the X-Forward-For source in the logfile
use_forwarded_for = True
control_exchange = {{ cinder_control_exchange }}
rpc_response_timeout = 120
# Common hostname to avoid singleton limitation of Cinder volume manager
host = ha-volume-manager
{% if ((cinderinternal_project_id is defined) and (cinderinternal_user_id is defined)) %}
# Cinder internal project id and user id for volume image cache
cinder_internal_tenant_project_id = {{ cinderinternal_project_id }}
cinder_internal_tenant_user_id = {{ cinderinternal_user_id }}
# To enable volume image caching the image_volume_cache_enabled flag needs to
# be set to True in the relevant backend section in cinder.conf
{% endif %}
{% if my_enabled_backends.cinder_enabled_backends is not defined %}
# Configure the enabled backends
enabled_backends=lvm-1
[lvm-1]
volume-group = cinder-volumes
lvm_type = thin
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_backend_name = LVM_iSCSI
{%- if cinder_lvm_device_group %},lvm-1{% endif %}
{% endif %}
# Configure the enabled backends, above left for convenience, until upgrade
# process is finalised.
{% if my_enabled_backends.cinder_enabled_backends is defined %}
enabled_backends={{ my_enabled_backends.cinder_enabled_backends[inventory_hostname]|join(", ") }}
{% for be in my_enabled_backends.cinder_backend_configs %}
[{{ be['name'] }}]
{% for conf in be['config'] %}
{{ conf }}={{ be['config'][conf] }}
{% endfor %}
{% endfor %}
{% endif %}
{% if cinder_keymgr_fixed_key is defined %}
[keymgr]
fixed_key = {{ cinder_keymgr_fixed_key }}
{% elif cinder_keymgr_url is defined and cinder_keymgr_url != "" %}
[keymgr]
api_class = cinder.keymgr.barbican.BarbicanKeyManager
encryption_auth_url = {{ cinder_keystone.internal_url }}/v3
encryption_api_url = {{ cinder_keymgr_url }}/v1
{% endif %}
[keystone_authtoken]
auth_uri = {{ cinder_keystone.identity_admin_url }}
[database]
connection={{ cinder_db }}
max_overflow={{ cinder_max_overflow }}
max_pool_size={{ cinder_max_pool_size }}
min_pool_size={{ cinder_min_pool_size }}
[oslo_messaging_notifications]
driver = {{ cinder_notification_driver }}
[oslo_messaging_rabbit]
rabbit_ha_queues=False
rabbit_hosts = {{ cinder_rabbit_hosts }}
rabbit_password = {{ cinder_rabbit_password }}
rabbit_use_ssl = {{ cinder_rabbit_use_ssl }}
rabbit_userid = {{ cinder_rabbit_userid }}
[oslo_middleware]
enable_proxy_headers_parsing = true
[oslo_concurrency]
lock_path = /var/lib/cinder
{% block audit_middleware %}{% endblock audit_middleware %}
{% if cinder_lvm_device_group %}
# LVM thin provision. This way we don't dd the disk
[lvm-1]
volume-group = cinder-volumes
lvm_type = thin
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_backend_name = LVM_iSCSI
iscsi_ip_address = {{ cinder_osapi_volume_listen }}
{% endif %}
# Start of section for StoreVirtual (VSA) cluster
#
# If you have configured StoreVirtual backend storage for cinder you
# must uncomment this section, and replace all strings in angle
# brackets with the correct values for the cluster you have
# configured. You must also add the section name to the list of
# values in the 'enabled_backends' variable above.
#
# If you have more than one StoreVirtual cluster you must provide this
# whole section for each cluster and provide a unique section name for
# each cluster. For example, replace <unique-section-name> with
# VSA_CLUSTER_1 for one cluster and VSA_CLUSTER_2 for the other.
#
# Note, if you want to group more than one cluster under a single
# cinder backend then you can give the same value to <vsa-backend-name>
# in sections for several clusters.
#
# Use this model if the StoreVirtual Storage array is running LeftHand OS
# version 11 or higer
#
#[<unique-section-name>]
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
#hplefthand_password = {{ '<encrypted vsa-cluster-password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
#hplefthand_password = <vsa-cluster-password>
#hplefthand_clustername = <vsa-cluster-name>
#hplefthand_api_url = https://<vsa-cluster-vip>:8081/lhos
#hplefthand_username = <vsa-cluster-username>
#hplefthand_iscsi_chap_enabled = true
#volume_backend_name = <vsa-backend-name>
#volume_driver = cinder.volume.drivers.san.hp.hp_lefthand_iscsi.HPLeftHandISCSIDriver
#hplefthand_debug = false
#
#
# Use this model if the StoreVirtual Storage array is running LeftHand OS
# lower than version 11
#
# [<unique-section-name>]
# volume_driver=cinder.volume.drivers.san.hp.hp_lefthand_iscsi.HPLeftHandISCSIDriver
# volume_backend_name=lefthand-cliq
# san_ip=<san-ip>
# san_login=<san_username>
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
# san_password= {{ '<encrypted san_password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
# san_password=<san_password>
# san_ssh_port=16022
# san_clustername=<vsa-cluster-name>
#volume_backend_name = <vsa-backend-name>
#
#
# End of section for StoreVirtual (VSA) cluster
# Start of section for StoreServ (3par) iscsi cluster
#
# If you have configured StoreServ backend storage for cinder you must
# uncomment this section, and replace all strings in angle brackets
# with the correct values for the HP 3PAR you have configured. You
# must also add the section name to the list of values in the
# 'enabled_backends' variable above. You must provide unique section
# each time you configure a new backend for HP 3PAR.
#
# If you want to configure more than one CPG then you can do one of the
# following:
# 1) Create an unique section for each backend, or
# 2) Provide a comma separated list of CPGs for hpe3par_cpg
#
# In the second case, this set of CPGs will form a pool but will be seen as a
# single device by Cinder.
#
#[<unique-section-name>]
#hpe3par_iscsi_chap_enabled = true
#san_ip = <3par-san-ipaddr>
#san_login = <3par-san-username>
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
# san_password = {{ '<encrypted 3par-san-password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
# san_password = <3par-san-password>
#hpe3par_iscsi_ips = <3par-ip-address-1>[,<3par-ip-address-2>,<3par-ip-address-3>, ...]
#hpe3par_username = <3par-username>
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
#hpe3par_password = {{ '<encrypted hpe3par_password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
#hpe3par_password = <hpe3par_password>
#hpe3par_api_url = https://<3par-san-ipaddr>:8080/api/v1
#hpe3par_cpg = <3par-cpg-name-1>[,<3par-cpg-name-2>, ...]
#volume_backend_name = <3par-backend-name>
#volume_driver = cinder.volume.drivers.san.hp.hp_3par_iscsi.HP3PARISCSIDriver
#
# End of section for StoreServ (3par) iscsi cluster
# Start of section to enable a CPG as a backend for StoreServ (3par)
# using a fibre channel device
#
# If you have configured StoreServ backend storage for cinder you must
# uncomment this section, and replace all strings in angle brackets
# with the correct values for the cluster you have configured. You
# must also add the section name to the list of values in the
# 'enabled_backends' variable above.
#
# If you want to configure more than one CPG then you can do one of the
# following:
# 1) Create an unique section for each backend, or
# 2) Provide a comma separated list of CPGs for hpe3par_cpg
#
# In second case, these sets of CPGs will form a pool but will seen as a
# single device by Cinder.
#
#
#[<unique-section-name>]
#san_ip = <3par-san-ipaddr>
#san_login = <3par-san-username>
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
#san_password = {{ '<encrypted 3par-san-password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
#san_password = <3par-san-password>
#hpe3par_username = <3par-username>
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
#hpe3par_password = {{ '<encrypted 3par-password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
#hpe3par_password = <3par-password>
#hpe3par_api_url = https://<3par-san-ipaddr>:8080/api/v1
#hpe3par_cpg = <3par-cpg-name-1>[,<3par-cpg-name-2>,...]
#volume_backend_name = <3par-backend-name>
#volume_driver = cinder.volume.drivers.san.hp.hp_3par_fc.HP3PARFCDriver
#
# End of section for StoreServ (3par) fibre channel cluster
# Start of section for ceph
#
# If you have configured ceph backend storage for cinder you
# must uncomment this section, and replace all strings in angle
# brackets with the correct values for the ceph you have
# configured. You must also add the section name to the list of
# values in the 'enabled_backends' variable above.
#
# If you have more than one ceph backend you must provide this
# whole section for each ceph backend and provide a unique section name for
# each. For example, replace <unique-section-name> with CEPH_1 for
# one backend and CEPH_2 for the other.
#
#[<unique-section-name>]
#rbd_secret_uuid = <secret-uuid>
#rbd_user = <ceph-cinder-user>
#rbd_pool = <ceph-cinder-volume-pool>
#rbd_ceph_conf = <ceph-config-file>
#volume_driver = cinder.volume.drivers.rbd.RBDDriver
#volume_backend_name = <ceph-backend-name>
#
# End of section for ceph
# Start of section for vmdk
#
# If you have configured vmdk storage for cinder you
# must uncomment this section, and replace all strings in angle
# brackets with the correct values for the cluster you have
# configured. You must also add the section name to the list of
# values in the 'enabled_backends' variable above.
#
# If you have more than one vmdk backend you must provide this
# whole section for each vmdk backend and provide a unique section name for
# each. For example, replace <unique-section-name> with
# VMDK_1 for one backend and VMDK_2 for the other.
#
#[<unique-section-name>]
#vmware_host_ip = <vmware-host-ip>
#vmware_host_password = <vmware-host-password>
#vmware_host_username = <vmware-host-username>
#vmware_insecure = True
#volume_driver = cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver
#volume_backend_name=<vmdk-backend-name>
#
# End of section for vmdk
# Start of section for Broccade Fiber channel Zone Manager
#
# If you have configured Fibre Channel Volume Driver that supports Zone Manager for cinder you
# must uncomment this section, and replace all strings in angle
# brackets with the correct values you have configured.
# In the below configuration fc_fabric_names can be mutilple names,
# you have to define seperate section for each name with appropriate switch details
#[DEFAULT]
#zoning_mode=fabric
#[fc-zone-manager]
#brcd_sb_connector = cinder.zonemanager.drivers.brocade.brcd_fc_zone_client_cli.BrcdFCZoneClientCLI
#fc_san_lookup_service = cinder.zonemanager.drivers.brocade.brcd_fc_san_lookup_service.BrcdFCSanLookupService
#zone_driver = cinder.zonemanager.drivers.brocade.brcd_fc_zone_driver.BrcdFCZoneDriver
#fc_fabric_names = <unique-fabric-name>
#[<unique-fabric-name>]
#fc_fabric_address = <switch-ip-address>
#fc_fabric_user = <switch-user-name>
#fc_fabric_password = <switch-password>
#principal_switch_wwn = <switch-wwn>
#zoning_policy = initiator-target
#zone_activate = true
#zone_name_prefix = <zone-name-prefix>
# End of section for Broccade Fiber channel Zone Manager
# Start of section for ceph backup
#
# If you have configured ceph backup storage for cinder you
# must uncomment this section, and replace all strings in angle
# brackets with the correct values for the ceph you have
# configured.
#
#[DEFAULT]
#backup_driver = cinder.backup.drivers.ceph
#backup_ceph_conf = <ceph-config-file>
#backup_ceph_user = <ceph-backup-user>
#backup_ceph_pool = <ceph-backup-pool>
#
# End of section for ceph backup
07070100000024000081A40000000000000000000000015F23024000003C19000000000000000000000000000000000000005100000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/cinder.conf.j2.original{#
#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
#}
[DEFAULT]
# Print debugging output (set logging level to DEBUG instead
# of default WARNING level). (boolean value)
debug={{ cinder_debug }}
enable_v3_api=True
osapi_volume_listen = {{ cinder_osapi_volume_listen }}
osapi_volume_listen_port = {{ cinder_osapi_volume_listen_port }}
{% if cinder_glance_url is defined %}
glance_api_servers = {{ cinder_glance_url }}
{% endif %}
{% if cinder_backup_swift_url is defined and cinder_backup_swift_url %}
backup_swift_url = {{ cinder_backup_swift_url }}
swift_catalog_info = object-store:swift:internalURL
{% endif %}
{% if cinder_volume_nova_url is defined %}
nova_endpoint_template = {{ cinder_volume_nova_url }}/%(project_id)s
nova_endpoint_admin_template = {{ cinder_volume_nova_url }}/%(project_id)s
os_region_name = {{ cinder_keystone.region_name }}
nova_catalog_info = compute:nova:internalURL
nova_catalog_admin_info = compute:nova:adminURL
{% endif %}
{% block api_paste_config %}
# Versioned api-paste.ini specified where appropriate.
#api_paste_config = /etc/cinder/api-paste.ini
{% endblock api_paste_config %}
auth_strategy = keystone
state_path = {{ cinder_state_path }}
{% if cinder_image_conversion_dir is defined %}
image_conversion_dir={{ cinder_image_conversion_dir }}
{% endif %}
iscsi_helper={{ cinder_iscsi_helper }}
{% if cinder_public_endpoint is defined %}
# Uncomment to set the public API in the links responses
#public_endpoint = {{ cinder_public_endpoint }}
#osapi_volume_base_URL = {{ cinder_public_endpoint }}
{% endif %}
# behind haproxy record the X-Forward-For source in the logfile
use_forwarded_for = True
control_exchange = {{ cinder_control_exchange }}
rpc_response_timeout = 120
# Common hostname to avoid singleton limitation of Cinder volume manager
host = ha-volume-manager
{% if ((cinderinternal_project_id is defined) and (cinderinternal_user_id is defined)) %}
# Cinder internal project id and user id for volume image cache
cinder_internal_tenant_project_id = {{ cinderinternal_project_id }}
cinder_internal_tenant_user_id = {{ cinderinternal_user_id }}
# To enable volume image caching the image_volume_cache_enabled flag needs to
# be set to True in the relevant backend section in cinder.conf
{% endif %}
{% if my_enabled_backends.cinder_enabled_backends is not defined %}
# Configure the enabled backends
enabled_backends=
{%- if cinder_lvm_device_group %},lvm-1{% endif %}
{% endif %}
# Configure the enabled backends, above left for convenience, until upgrade
# process is finalised.
{% if my_enabled_backends.cinder_enabled_backends is defined %}
enabled_backends={{ my_enabled_backends.cinder_enabled_backends[inventory_hostname]|join(", ") }}
{% for be in my_enabled_backends.cinder_backend_configs %}
[{{ be['name'] }}]
{% for conf in be['config'] %}
{{ conf }}={{ be['config'][conf] }}
{% endfor %}
{% endfor %}
{% endif %}
{% if cinder_keymgr_fixed_key is defined %}
[keymgr]
fixed_key = {{ cinder_keymgr_fixed_key }}
{% elif cinder_keymgr_url is defined and cinder_keymgr_url != "" %}
[keymgr]
api_class = cinder.keymgr.barbican.BarbicanKeyManager
encryption_auth_url = {{ cinder_keystone.internal_url }}/v3
encryption_api_url = {{ cinder_keymgr_url }}/v1
{% endif %}
[keystone_authtoken]
auth_uri = {{ cinder_keystone.identity_admin_url }}
[database]
connection={{ cinder_db }}
max_overflow={{ cinder_max_overflow }}
max_pool_size={{ cinder_max_pool_size }}
min_pool_size={{ cinder_min_pool_size }}
[oslo_messaging_notifications]
driver = {{ cinder_notification_driver }}
[oslo_messaging_rabbit]
rabbit_ha_queues=False
rabbit_hosts = {{ cinder_rabbit_hosts }}
rabbit_password = {{ cinder_rabbit_password }}
rabbit_use_ssl = {{ cinder_rabbit_use_ssl }}
rabbit_userid = {{ cinder_rabbit_userid }}
[oslo_middleware]
enable_proxy_headers_parsing = true
[oslo_concurrency]
lock_path = /var/lib/cinder
{% block audit_middleware %}{% endblock audit_middleware %}
{% if cinder_lvm_device_group %}
# LVM thin provision. This way we don't dd the disk
[lvm-1]
volume-group = cinder-volumes
lvm_type = thin
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_backend_name = LVM_iSCSI
iscsi_ip_address = {{ cinder_osapi_volume_listen }}
{% endif %}
# Start of section for StoreVirtual (VSA) cluster
#
# If you have configured StoreVirtual backend storage for cinder you
# must uncomment this section, and replace all strings in angle
# brackets with the correct values for the cluster you have
# configured. You must also add the section name to the list of
# values in the 'enabled_backends' variable above.
#
# If you have more than one StoreVirtual cluster you must provide this
# whole section for each cluster and provide a unique section name for
# each cluster. For example, replace <unique-section-name> with
# VSA_CLUSTER_1 for one cluster and VSA_CLUSTER_2 for the other.
#
# Note, if you want to group more than one cluster under a single
# cinder backend then you can give the same value to <vsa-backend-name>
# in sections for several clusters.
#
# Use this model if the StoreVirtual Storage array is running LeftHand OS
# version 11 or higer
#
#[<unique-section-name>]
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
#hplefthand_password: {{ '<encrypted vsa-cluster-password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
#hplefthand_password: <vsa-cluster-password>
#hplefthand_clustername: <vsa-cluster-name>
#hplefthand_api_url: https://<vsa-cluster-vip>:8081/lhos
#hplefthand_username: <vsa-cluster-username>
#hplefthand_iscsi_chap_enabled: true
#volume_backend_name: <vsa-backend-name>
#volume_driver: cinder.volume.drivers.san.hp.hp_lefthand_iscsi.HPLeftHandISCSIDriver
#hplefthand_debug: false
#
#
# Use this model if the StoreVirtual Storage array is running LeftHand OS
# lower than version 11
#
# [<unique-section-name>]
# volume_driver=cinder.volume.drivers.san.hp.hp_lefthand_iscsi.HPLeftHandISCSIDriver
# volume_backend_name=lefthand-cliq
# san_ip=<san-ip>
# san_login=<san_username>
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
# san_password= {{ '<encrypted san_password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
# san_password=<san_password>
# san_ssh_port=16022
# san_clustername=<vsa-cluster-name>
#volume_backend_name: <vsa-backend-name>
#
#
# End of section for StoreVirtual (VSA) cluster
# Start of section for StoreServ (3par) iscsi cluster
#
# If you have configured StoreServ backend storage for cinder you must
# uncomment this section, and replace all strings in angle brackets
# with the correct values for the HP 3PAR you have configured. You
# must also add the section name to the list of values in the
# 'enabled_backends' variable above. You must provide unique section
# each time you configure a new backend for HP 3PAR.
#
# If you want to configure more than one CPG then you can do one of the
# following:
# 1) Create an unique section for each backend, or
# 2) Provide a comma separated list of CPGs for hpe3par_cpg
#
# In the second case, this set of CPGs will form a pool but will be seen as a
# single device by Cinder.
#
#[<unique-section-name>]
#hpe3par_iscsi_chap_enabled: true
#san_ip: <3par-san-ipaddr>
#san_login: <3par-san-username>
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
# san_password: {{ '<encrypted 3par-san-password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
# san_password: <3par-san-password>
#hpe3par_iscsi_ips: <3par-ip-address-1>[,<3par-ip-address-2>,<3par-ip-address-3>, ...]
#hpe3par_username: <3par-username>
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
#hpe3par_password: {{ '<encrypted hpe3par_password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
#hpe3par_password: <hpe3par_password>
#hpe3par_api_url: https://<3par-san-ipaddr>:8080/api/v1
#hpe3par_cpg: <3par-cpg-name-1>[,<3par-cpg-name-2>, ...]
#volume_backend_name: <3par-backend-name>
#volume_driver: cinder.volume.drivers.san.hp.hp_3par_iscsi.HP3PARISCSIDriver
#
# End of section for StoreServ (3par) iscsi cluster
# Start of section to enable a CPG as a backend for StoreServ (3par)
# using a fibre channel device
#
# If you have configured StoreServ backend storage for cinder you must
# uncomment this section, and replace all strings in angle brackets
# with the correct values for the cluster you have configured. You
# must also add the section name to the list of values in the
# 'enabled_backends' variable above.
#
# If you want to configure more than one CPG then you can do one of the
# following:
# 1) Create an unique section for each backend, or
# 2) Provide a comma separated list of CPGs for hpe3par_cpg
#
# In second case, these sets of CPGs will form a pool but will seen as a
# single device by Cinder.
#
#
#[<unique-section-name>]
#san_ip: <3par-san-ipaddr>
#san_login: <3par-san-username>
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
#san_password: {{ '<encrypted 3par-san-password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
#san_password: <3par-san-password>
#hpe3par_username: <3par-username>
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
#hpe3par_password: {{ '<encrypted 3par-password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
#hpe3par_password: <3par-password>
#hpe3par_api_url: https://<3par-san-ipaddr>:8080/api/v1
#hpe3par_cpg: <3par-cpg-name-1>[,<3par-cpg-name-2>,...]
#volume_backend_name: <3par-backend-name>
#volume_driver: cinder.volume.drivers.san.hp.hp_3par_fc.HP3PARFCDriver
#
# End of section for StoreServ (3par) fibre channel cluster
# Start of section for ceph
#
# If you have configured ceph backend storage for cinder you
# must uncomment this section, and replace all strings in angle
# brackets with the correct values for the ceph you have
# configured. You must also add the section name to the list of
# values in the 'enabled_backends' variable above.
#
# If you have more than one ceph backend you must provide this
# whole section for each ceph backend and provide a unique section name for
# each. For example, replace <unique-section-name> with CEPH_1 for
# one backend and CEPH_2 for the other.
#
#[<unique-section-name>]
#rbd_secret_uuid = <secret-uuid>
#rbd_user = <ceph-cinder-user>
#rbd_pool = <ceph-cinder-volume-pool>
#rbd_ceph_conf = <ceph-config-file>
#volume_driver = cinder.volume.drivers.rbd.RBDDriver
#volume_backend_name = <ceph-backend-name>
#
# End of section for ceph
# Start of section for vmdk
#
# If you have configured vmdk storage for cinder you
# must uncomment this section, and replace all strings in angle
# brackets with the correct values for the cluster you have
# configured. You must also add the section name to the list of
# values in the 'enabled_backends' variable above.
#
# If you have more than one vmdk backend you must provide this
# whole section for each vmdk backend and provide a unique section name for
# each. For example, replace <unique-section-name> with
# VMDK_1 for one backend and VMDK_2 for the other.
#
#[<unique-section-name>]
#vmware_host_ip = <vmware-host-ip>
#vmware_host_password = <vmware-host-password>
#vmware_host_username = <vmware-host-username>
#vmware_insecure = True
#volume_driver = cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver
#volume_backend_name=<vmdk-backend-name>
#
# End of section for vmdk
# Start of section for Broccade Fiber channel Zone Manager
#
# If you have configured Fibre Channel Volume Driver that supports Zone Manager for cinder you
# must uncomment this section, and replace all strings in angle
# brackets with the correct values you have configured.
# In the below configuration fc_fabric_names can be mutilple names,
# you have to define seperate section for each name with appropriate switch details
#[DEFAULT]
#zoning_mode=fabric
#[fc-zone-manager]
#brcd_sb_connector = cinder.zonemanager.drivers.brocade.brcd_fc_zone_client_cli.BrcdFCZoneClientCLI
#fc_san_lookup_service = cinder.zonemanager.drivers.brocade.brcd_fc_san_lookup_service.BrcdFCSanLookupService
#zone_driver = cinder.zonemanager.drivers.brocade.brcd_fc_zone_driver.BrcdFCZoneDriver
#fc_fabric_names = <unique-fabric-name>
#[<unique-fabric-name>]
#fc_fabric_address = <switch-ip-address>
#fc_fabric_user = <switch-user-name>
#fc_fabric_password = <switch-password>
#principal_switch_wwn = <switch-wwn>
#zoning_policy = initiator-target
#zone_activate = true
#zone_name_prefix = <zone-name-prefix>
# End of section for Broccade Fiber channel Zone Manager
# Start of section for ceph backup
#
# If you have configured ceph backup storage for cinder you
# must uncomment this section, and replace all strings in angle
# brackets with the correct values for the ceph you have
# configured.
#
#[DEFAULT]
#backup_driver = cinder.backup.drivers.ceph
#backup_ceph_conf = <ceph-config-file>
#backup_ceph_user = <ceph-backup-user>
#backup_ceph_pool = <ceph-backup-pool>
#
# End of section for ceph backup
07070100000025000081A40000000000000000000000015F23024000000035000000000000000000000000000000000000005800000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/cinder_backend_assignment.fact{
"LVM3-CONFIG-CP1": "project-ccp-controller-m1"
}
07070100000026000081A40000000000000000000000015F23024000000002000000000000000000000000000000000000005D00000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/cinder_volume_run_location_ccp.fact2
07070100000027000081ED0000000000000000000000015F230240000005F8000000000000000000000000000000000000005500000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/configure-using-jinja2.bash#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
# Rename original control_plane.yml and copy new one
mv ~/openstack/my_cloud/definition/data/control_plane.yml \
~/openstack/my_cloud/definition/data/control_plane.yml.backup
cp ~/ardana-ci-tests/control_plane.yml ~/openstack/my_cloud/definition/data/control_plane.yml
# Rename cinder config directory
mv ~/openstack/my_cloud/definition/data/cinder/ ~/openstack/my_cloud/definition/data/cinder.backup
# Copy cinder.conf.j2 with configured backend
cp ~/ardana-ci-tests/cinder.conf.j2 ~/openstack/my_cloud/config/cinder/cinder.conf.j2
pushd ~/openstack/ardana/ansible
git add -A
git commit --allow-empty -m "Stop Using New Storage Input Model"
ansible-playbook -i hosts/localhost config-processor-run.yml -e encrypt="" \
-e rekey=""
sleep 5
ansible-playbook -i hosts/localhost ready-deployment.yml
sleep 5
popd
07070100000028000081A40000000000000000000000015F23024000000A7F000000000000000000000000000000000000004B00000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/control_plane.yml#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
control-planes:
- name: ccp
control-plane-prefix: ccp
region-name: region1
failure-zones:
- AZ1
- AZ2
- AZ3
common-service-components:
- lifecycle-manager-target
- monasca-agent
clusters:
- name: cluster0
cluster-prefix: deployer
server-role:
- DEPLOYER-ROLE
member-count: 1
allocation-policy: strict
service-components:
- lifecycle-manager
- ntp-client
- openstack-client
- tempest
- cinder-client
- swift-client
- monasca-client
- name: cluster1
cluster-prefix: monasca
server-role:
- MONASCA-ROLE
member-count: 1
allocation-policy: strict
service-components:
- ntp-client
# monasca
- kafka
- zookeeper
- vertica
- monasca-api
- monasca-persister
# memcached required for swift
- memcached
- name: cluster2
cluster-prefix: db-rmq-key
server-role:
- MYSQL-RMQ-KEYSTONE-ROLE
member-count: 1
allocation-policy: strict
service-components:
- ntp-server
- mysql
- rabbitmq
- keystone-client
- keystone-api
- name: cluster3
cluster-prefix: controller
server-role:
- CONTROLLER-ROLE
member-count: 3
allocation-policy: strict
service-components:
- ntp-client
- cinder-api
- cinder-scheduler
- cinder-volume
- cinder-backup
- cinder-client
- ip-cluster
- swift-ring-builder
- swift-proxy
- swift-account
- swift-container
- swift-object
- swift-client
07070100000029000081ED0000000000000000000000015F23024000000305000000000000000000000000000000000000005600000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/copy-cinder-fact-file-1.bash#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
sudo cp ~/ardana-ci-tests/cinder_backend_assignment.fact \
/etc/ansible/facts.d/cinder_backend_assignment.fact
sleep 5
0707010000002A000081ED0000000000000000000000015F2302400000030F000000000000000000000000000000000000005600000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/copy-cinder-fact-file-2.bash#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
sudo cp ~/ardana-ci-tests/cinder_volume_run_location_ccp.fact \
/etc/ansible/facts.d/cinder_volume_run_location_ccp.fact
sleep 5
0707010000002B000081ED0000000000000000000000015F230240000007AA000000000000000000000000000000000000005C00000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/revert-to-storage-input-model.bash#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
# Run this script on the deployer (located in ~/ardana-ci-tests/) to revert the
# Project Stack cloud back to it's original state after running test-plan.yml.
# The storage backends will be configured with the Storage Input Model. This
# script is not executed during CI.
mv ~/openstack/my_cloud/definition/data/control_plane.yml.backup \
~/openstack/my_cloud/definition/data/control_plane.yml
mv ~/openstack/my_cloud/definition/data/cinder.backup/ \
~/openstack/my_cloud/definition/data/cinder
# Copy original cinder.conf.j2 without backend configuration
cp ~/ardana-ci-tests/cinder.conf.j2.original ~/openstack/my_cloud/config/cinder/cinder.conf.j2
sudo rm /etc/ansible/facts.d/cinder_backend_assignment.fact
sudo rm /etc/ansible/facts.d/cinder_volume_run_location_ccp.fact
pushd ~/openstack/ardana/ansible
git add -A
git commit --allow-empty -m "Revert Back To Using Storage Input Model"
ansible-playbook -i hosts/localhost config-processor-run.yml -e encrypt="" \
-e rekey=""
sleep 2
ansible-playbook -i hosts/localhost ready-deployment.yml
sleep 2
popd
pushd ~/scratch/ansible/next/ardana/ansible/
sleep 2
ansible-playbook -i hosts/verb_hosts cinder-deploy.yml
sleep 2
ansible-playbook -i hosts/verb_hosts cinder-status.yml
popd
0707010000002C000081A40000000000000000000000015F2302400000225E000000000000000000000000000000000000004800000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/test-plan.yaml#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
### Start Tests Whilst Using New Storage Input Model ###
- name: Test Cinder Status 1
logfile: test_cinder_status_1.log
prefix: Cinder-Status
exec:
- ansible-playbook -i hosts/verb_hosts cinder-status.yml
# Checks if cinder services are running on expected controllers
- name: Validate Cinder Status 1
logfile: validate_cinder_status_1.log
prefix: Validate-Status
exec:
- validate-cinder-status-1.bash
- name: Test Cinder Reconfigure 1
logfile: test_cinder_reconfigure_1.log
prefix: Cinder-Reconfigure
playbooks:
- cinder-reconfigure.yml
- name: Test Cinder Upgrade 1
logfile: test_cinder_upgrade_1.log
prefix: Cinder-Upgrade
playbooks:
- cinder-upgrade.yml
- name: Test Reconfigure Credentials Change 1
logfile: test_cinder_reconfigure_credentials_change_1.log
prefix: Reconfigure-Creds-Change
playbooks:
- cinder-reconfigure-credentials-change.yml
- name: Test Show Volume Hosts 1
logfile: test_cinder_show_vol_hosts_1.log
prefix: Show-Vol-Hosts
playbooks:
- cinder-show-volume-hosts.yml
- name: Validate Cinder Operations 1
logfile: validate_cinder_ops_1.log
prefix: Validate-Ops
exec:
- validate-cinder-operations.bash
- name: Test Cinder Stop 1
logfile: test_cinder_stop_1.log
prefix: Cinder-Stop
playbooks:
- cinder-stop.yml
- name: Test Cinder Start 1
logfile: test_cinder_start_1.log
prefix: Cinder-Start
playbooks:
- cinder-start.yml
- name: Test Cinder Status 2
logfile: test_cinder_status_2.log
prefix: Cinder-Status
exec:
- ansible-playbook -i hosts/verb_hosts cinder-status.yml
- name: Run tempest tests 1
logfile: cinder_tempest_tests_1.log
prefix: Tempest
tempest:
- "+tempest.api.volume"
- "-tempest.api.volume.admin.test_volume_quotas.BaseVolumeQuotasAdminV2TestJSON.test_delete_quota"
- "-tempest.api.volume.admin.test_volume_quotas.VolumeQuotasAdminV1TestJSON.test_delete_quota"
- "-tempest.api.volume.admin.test_volume_services.VolumesServicesV1TestJSON.test_get_service_by_host_name"
- "-tempest.api.volume.admin.test_volume_services.VolumesServicesV2TestJSON.test_get_service_by_host_name"
- "-tempest.api.volume.test_volumes_actions.VolumesV1ActionsTest"
- "-tempest.api.volume.test_volumes_actions.VolumesV2ActionsTest"
- "+tempest.api.object_storage"
- "+tempest.api.compute.volumes"
- "+tempest.scenario.test_object_storage_basic_ops"
- "+tempest.scenario.test_encrypted_cinder_volumes"
- "-tempest.api.volume.test_volumes_backup.VolumesBackupsV1Test.test_bootable_volume_backup_and_restore"
- "-tempest.api.volume.test_volumes_backup.VolumesBackupsV2Test.test_bootable_volume_backup_and_restore"
- "-tempest.api.volume.test_volumes_clone.VolumesV1CloneTest.test_create_from_bootable_volume"
- "-tempest.api.volume.test_volumes_clone.VolumesV2CloneTest.test_create_from_bootable_volume"
- "-tempest.api.volume.v2.test_image_metadata.VolumesV2ImageMetadata"
### Cinder Migrate With New Storage Input Model ###
- name: Validate Backends Before Migrate
logfile: validate_backends-1.log
prefix: Validate-Backends
exec:
- validate-backends-1.bash
# Copy cinder_backend_assignment.fact file for migrate
- name: Copy Cinder Fact File 1
logfile: copy_cinder_fact_file_1.log
prefix: Copy-Fact-File
exec:
- copy-cinder-fact-file-1.bash
- name: Test Cinder Migrate Volume 1
logfile: test_cinder_migrate_1.log
prefix: Cinder-Migrate
exec:
- ansible-playbook -i hosts/verb_hosts cinder-migrate-volume.yml
-e '{\"confirm_cinder_migrate\":false}'
- name: Validate Backends After Migrate
logfile: validate_backends-2.log
prefix: Validate-Backends
exec:
- validate-backends-2.bash
- name: Test Cinder Status 3
logfile: test_cinder_status_3.log
prefix: Cinder-Status
exec:
- ansible-playbook -i hosts/verb_hosts cinder-status.yml
# Checks if cinder services are running on expected controllers
- name: Validate Cinder Status 2
logfile: validate_cinder_status_2.log
prefix: Validate-Status
exec:
- validate-cinder-status-1.bash
### Stop Using Storage Input Model And Configure Using Jinja2 ###
- name: Configure Using Jinja2
logfile: configure_using_jinja2.log
prefix: Configure-Jinja2
exec:
- configure-using-jinja2.bash
- name: Deploy Cinder with Jinja2 Configuration
logfile: test_cinder_deploy.log
prefix: Cinder-Deploy
playbooks:
- cinder-deploy.yml
- name: Test Cinder Status 4
logfile: test_cinder_status_4.log
prefix: Cinder-Status
exec:
- ansible-playbook -i hosts/verb_hosts cinder-status.yml
# Checks if cinder services are running on expected controllers
- name: Validate Cinder Status 3
logfile: validate_cinder_status_3.log
prefix: Validate-Status
exec:
- validate-cinder-status-2.bash
### Cinder Migrate With Jinja2 Configuration ###
# Copy cinder_volume_run_location_ccp.fact for migrate
- name: Copy Cinder Fact File 2
logfile: copy_cinder_fact_file_2.log
prefix: Copy-Fact-File
exec:
- copy-cinder-fact-file-2.bash
- name: Test Cinder Migrate Volume 2
logfile: test_cinder_migrate_2.log
prefix: Cinder-Migrate
exec:
- ansible-playbook -i hosts/verb_hosts cinder-migrate-volume.yml
-e '{\"confirm_cinder_migrate\":false}'
- name: Test Cinder Status 5
logfile: test_cinder_status_5.log
prefix: Cinder-Status
playbooks:
- cinder-status.yml
# Checks if cinder services are running on expected controllers
- name: Validate Cinder Status 4
logfile: validate_cinder_status_4.log
prefix: Validate-Status
exec:
- validate-cinder-status-3.bash
- name: Test Cinder Reconfigure 2
logfile: test_cinder_reconfigure_2.log
prefix: Cinder-Reconfigure
playbooks:
- cinder-reconfigure.yml
- name: Test Cinder Upgrade 2
logfile: test_cinder_upgrade_2.log
prefix: Cinder-Upgrade
playbooks:
- cinder-upgrade.yml
- name: Test Reconfigure Credentials Change 2
logfile: test_cinder_reconfigure_credentials_change_2.log
prefix: Reconfigure-Creds-Change
playbooks:
- cinder-reconfigure-credentials-change.yml
- name: Test Show Volume Hosts 2
logfile: test_cinder_show_vol_hosts_2.log
prefix: Show-Vol-Hosts
playbooks:
- cinder-show-volume-hosts.yml
- name: Validate Cinder Operations 2
logfile: validate_cinder_ops_2.log
prefix: Validate-Ops
exec:
- validate-cinder-operations.bash
- name: Test Cinder Stop 2
logfile: test_cinder_stop_2.log
prefix: Cinder-Stop
playbooks:
- cinder-stop.yml
- name: Test Cinder Start 2
logfile: test_cinder_start_2.log
prefix: Cinder-Start
playbooks:
- cinder-start.yml
- name: Test Cinder Status 6
logfile: test_cinder_status_6.log
prefix: Cinder-Status
exec:
- ansible-playbook -i hosts/verb_hosts cinder-status.yml
- name: Run tempest tests 2
logfile: cinder_tempest_tests_2.log
prefix: Tempest
tempest:
- "+tempest.api.volume"
- "-tempest.api.volume.admin.test_volume_quotas.BaseVolumeQuotasAdminV2TestJSON.test_delete_quota"
- "-tempest.api.volume.admin.test_volume_quotas.VolumeQuotasAdminV1TestJSON.test_delete_quota"
- "-tempest.api.volume.admin.test_volume_services.VolumesServicesV1TestJSON.test_get_service_by_host_name"
- "-tempest.api.volume.admin.test_volume_services.VolumesServicesV2TestJSON.test_get_service_by_host_name"
- "-tempest.api.volume.test_volumes_actions.VolumesV1ActionsTest"
- "-tempest.api.volume.test_volumes_actions.VolumesV2ActionsTest"
- "+tempest.api.object_storage"
- "+tempest.api.compute.volumes"
- "+tempest.scenario.test_object_storage_basic_ops"
- "+tempest.scenario.test_encrypted_cinder_volumes"
- "-tempest.api.volume.test_volumes_backup.VolumesBackupsV1Test.test_bootable_volume_backup_and_restore"
- "-tempest.api.volume.test_volumes_backup.VolumesBackupsV2Test.test_bootable_volume_backup_and_restore"
- "-tempest.api.volume.test_volumes_clone.VolumesV1CloneTest.test_create_from_bootable_volume"
- "-tempest.api.volume.test_volumes_clone.VolumesV2CloneTest.test_create_from_bootable_volume"
- "-tempest.api.volume.v2.test_image_metadata.VolumesV2ImageMetadata"
0707010000002D000081ED0000000000000000000000015F2302400000071C000000000000000000000000000000000000005200000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/validate-backends-1.bash#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
result="pass"
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m1-ardana \
"sudo grep -q 'enabled_backends=LVM1-CONFIG-CP1' /etc/cinder/cinder.conf"
rc=$?
if [ "$rc" != "0" ]
then
echo "ERROR: Could not validate correct backends on first controller."
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m2-ardana \
"sudo grep -q 'enabled_backends=LVM2-CONFIG-CP1' /etc/cinder/cinder.conf"
rc=$?
if [ "$rc" != "0" ]
then
echo "ERROR: Could not validate correct backends on second controller."
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m3-ardana \
"sudo grep -q 'enabled_backends=LVM3-CONFIG-CP1' /etc/cinder/cinder.conf"
rc=$?
if [ "$rc" != "0" ]
then
echo "ERROR: Could not validate correct backends on third controller."
result="fail"
fi
if [ "$result" == "fail" ]
then
echo FAILURE: Could not validate correct backends on controllers, check error \
messages above for more details.
exit -1
else
echo SUCCESS: Validated correct backends on controllers before migrating cinder volume service.
exit 0
fi
0707010000002E000081ED0000000000000000000000015F2302400000072B000000000000000000000000000000000000005200000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/validate-backends-2.bash#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
result="pass"
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m1-ardana \
"sudo grep -q 'enabled_backends=LVM1-CONFIG-CP1, LVM3-CONFIG-CP1' /etc/cinder/cinder.conf"
rc=$?
if [ "$rc" != "0" ]
then
echo "ERROR: Could not validate correct backends on first controller."
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m2-ardana \
"sudo grep -q 'enabled_backends=LVM2-CONFIG-CP1' /etc/cinder/cinder.conf"
rc=$?
if [ "$rc" != "0" ]
then
echo "ERROR: Could not validate correct backends on second controller."
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m3-ardana \
"sudo grep -q '^enabled_backends=[[:space:]]*$' /etc/cinder/cinder.conf"
rc=$?
if [ "$rc" != "0" ]
then
echo "ERROR: Could not validate correct backends on third controller."
result="fail"
fi
if [ "$result" == "fail" ]
then
echo FAILURE: Could not validate correct backends on controllers, check error \
messages above for more details.
exit -1
else
echo SUCCESS: Validated correct backends on controllers after migrating cinder volume service.
exit 0
fi
0707010000002F000081ED0000000000000000000000015F230240000010A2000000000000000000000000000000000000005900000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/validate-cinder-operations.bash#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
#/bin/bash
source ~/service.osrc
function test_volume_count
{
EXPECTED=$1
COUNT=$(($(cinder list | wc -l) - 4))
if [ "${COUNT}" != "${EXPECTED}" ]
then
echo Invalid volume count ${COUNT}
exit -1
fi
}
function create_volume
{
echo Creating Volume...
VOLUME=$1
SIZE=$2
cinder create --name ${VOLUME} ${SIZE}
rc=$?
if [ "$rc" != "0" ]
then
print Volume create failed for ${VOLUME}
exit -1
fi
STATUS=""
TIME_OUT=0
while [ "${STATUS}" == "" ] && [ ${TIME_OUT} -lt 20 ]
do
sleep 1
STATUS=$(cinder list | grep ${VOLUME} | grep available | awk '{print $2}')
TIME_OUT=$((TIME_OUT + 1))
done
}
function delete_volume
{
echo Deleting Volume...
VOLUME=$1
BEFORE_COUNT=$(($(cinder list | wc -l) - 4))
cinder delete ${VOLUME}
rc=$?
if [ "$rc" != "0" ]
then
print Volume delete failed for ${VOLUME}
exit -1
fi
AFTER_COUNT=$(($(cinder list | wc -l) - 4))
TIME_OUT=0
while [ $((AFTER_COUNT)) -eq $((BEFORE_COUNT)) ] && [ ${TIME_OUT} -lt 20 ]
do
AFTER_COUNT=$(($(cinder list | wc -l) - 4))
sleep 1
TIME_OUT=$((TIME_OUT + 1))
done
}
function test_backup_count
{
EXPECTED=$1
COUNT=$(($(cinder backup-list | wc -l) - 4))
if [ "${COUNT}" != "${EXPECTED}" ]
then
echo Invalid backup count ${COUNT}
exit -1
fi
}
function create_backup
{
echo Creating Backup Volume...
BACKUP=$1
VOLUME=$2
cinder backup-create --name ${BACKUP} ${VOLUME}
rc=$?
if [ "$rc" != "0" ]
then
print Backup create failed for ${VOLUME}
exit -1
fi
STATUS=""
TIME_OUT=0
while [ "${STATUS}" == "" ] && [ ${TIME_OUT} -lt 60 ]
do
sleep 1
STATUS=$(cinder backup-list | grep ${BACKUP} | grep available | awk '{print $6}')
TIME_OUT=$((TIME_OUT + 1))
done
}
function restore_backup
{
echo Restoring Backup Volume...
VOLUME=$1
BACKUP=$2
ID=$(cinder backup-list | grep ${BACKUP} | awk '{print $2}')
cinder backup-restore --volume ${VOLUME} ${ID}
rc=$?
if [ "$rc" != "0" ]
then
print Backup restore failed for ${BACKUP}
exit -1
fi
STATUS=""
TIME_OUT=0
while [ "${STATUS}" == "" ] && [ ${TIME_OUT} -lt 40 ]
do
sleep 1
STATUS=$(cinder list | grep ${VOLUME} | grep available | awk '{print $2}')
TIME_OUT=$((TIME_OUT + 1))
done
STATUS=""
TIME_OUT=0
while [ "${STATUS}" == "" ] && [ ${TIME_OUT} -lt 40 ]
do
sleep 1
STATUS=$(cinder backup-list | grep ${BACKUP} | grep available | awk '{print $6}')
TIME_OUT=$((TIME_OUT + 1))
done
}
function delete_backup
{
echo Deleting Backup Volume...
BACKUP=$1
STATUS=""
BEFORE_COUNT=$(($(cinder backup-list | wc -l) - 4))
cinder backup-delete ${BACKUP}
rc=$?
if [ "$rc" != "0" ]
then
print Backup delete failed for ${BACKUP}
exit -1
fi
AFTER_COUNT=$(($(cinder backup-list | wc -l) - 4))
TIME_OUT=0
while [ $((AFTER_COUNT)) -eq $((BEFORE_COUNT)) ] && [ ${TIME_OUT} -lt 20 ]
do
AFTER_COUNT=$(($(cinder backup-list | wc -l) - 4))
sleep 1
TIME_OUT=$((TIME_OUT + 1))
done
}
test_volume_count 0
create_volume v1 1
test_volume_count 1
test_backup_count 0
create_backup b1 v1
test_backup_count 1
restore_backup v1 b1
delete_backup b1
test_backup_count 0
delete_volume v1
test_volume_count 0
echo ***VALIDATED CINDER OPERATIONS SUCCESSFULLY***
exit 0
07070100000030000081ED0000000000000000000000015F2302400000108C000000000000000000000000000000000000005700000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/validate-cinder-status-1.bash#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
result="pass"
### Check First Controller ###
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m1-ardana \
"ps auxww | grep cinder-volume | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Volume service should be running on the first controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m1-ardana \
"ps auxww | grep cinder-backup | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Backup service should be running on the first controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m1-ardana \
"ps auxww | grep cinder-api | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder API service should be running on the first controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m1-ardana \
"ps auxww | grep cinder-scheduler | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Scheduler service should be running on the first controller.
result="fail"
fi
### Check Second Controller ###
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m2-ardana \
"ps auxww | grep cinder-volume | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Volume service should be running on the second controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m2-ardana \
"ps auxww | grep cinder-backup | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Backup service should be running on the second controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m2-ardana \
"ps auxww | grep cinder-api | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder API service should be running on the second controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m2-ardana \
"ps auxww | grep cinder-scheduler | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Scheduler service should be running on the second controller.
result="fail"
fi
### Check Third Controller ###
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m3-ardana \
"ps auxww | grep cinder-volume | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Volume service should be running on the third controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m3-ardana \
"ps auxww | grep cinder-backup | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Backup service should be running on the third controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m3-ardana \
"ps auxww | grep cinder-api | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder API service should be running on the third controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m3-ardana \
"ps auxww | grep cinder-scheduler | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Scheduler service should be running on the third controller.
result="fail"
fi
if [ "$result" == "fail" ]
then
echo FAILURE: Could not validate cinder services running on controllers, check error \
messages above for more details.
exit -1
else
echo SUCCESS: Validated cinder services running on expected controllers.
exit 0
fi
07070100000031000081ED0000000000000000000000015F2302400000109E000000000000000000000000000000000000005700000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/validate-cinder-status-2.bash#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
result="pass"
### Check First Controller ###
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m1-ardana \
"ps auxww | grep cinder-volume | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Volume service should be running on the first controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m1-ardana \
"ps auxww | grep cinder-backup | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Backup service should be running on the first controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m1-ardana \
"ps auxww | grep cinder-api | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder API service should be running on the first controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m1-ardana \
"ps auxww | grep cinder-scheduler | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Scheduler service should be running on the first controller.
result="fail"
fi
### Check Second Controller ###
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m2-ardana \
"ps auxww | grep cinder-volume | grep -v grep"
rc=$?
if [ "$rc" != "1" ]
then
echo ERROR: Cinder Volume service should not be running on the second controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m2-ardana \
"ps auxww | grep cinder-backup | grep -v grep"
rc=$?
if [ "$rc" != "1" ]
then
echo ERROR: Cinder Backup service should not be running on the second controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m2-ardana \
"ps auxww | grep cinder-api | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder API service should be running on the second controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m2-ardana \
"ps auxww | grep cinder-scheduler | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Scheduler service should be running on the second controller.
result="fail"
fi
### Check Third Controller ###
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m3-ardana \
"ps auxww | grep cinder-volume | grep -v grep"
rc=$?
if [ "$rc" != "1" ]
then
echo ERROR: Cinder Volume service should not be running on the third controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m3-ardana \
"ps auxww | grep cinder-backup | grep -v grep"
rc=$?
if [ "$rc" != "1" ]
then
echo ERROR: Cinder Backup service should not be running on the third controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m3-ardana \
"ps auxww | grep cinder-api | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder API service should be running on the third controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m3-ardana \
"ps auxww | grep cinder-scheduler | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Scheduler service should be running on the third controller.
result="fail"
fi
if [ "$result" == "fail" ]
then
echo FAILURE: Could not validate cinder services running on controllers, check error \
messages above for more details.
exit -1
else
echo SUCCESS: Validated cinder services running on expected controllers.
exit 0
fi
07070100000032000081ED0000000000000000000000015F2302400000109E000000000000000000000000000000000000005700000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tests/validate-cinder-status-3.bash#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
result="pass"
### Check First Controller ###
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m1-ardana \
"ps auxww | grep cinder-volume | grep -v grep"
rc=$?
if [ "$rc" != "1" ]
then
echo ERROR: Cinder Volume service should not be running on the first controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m1-ardana \
"ps auxww | grep cinder-backup | grep -v grep"
rc=$?
if [ "$rc" != "1" ]
then
echo ERROR: Cinder Backup service should not be running on the first controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m1-ardana \
"ps auxww | grep cinder-api | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder API service should be running on the first controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m1-ardana \
"ps auxww | grep cinder-scheduler | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Scheduler service should be running on the first controller.
result="fail"
fi
### Check Second Controller ###
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m2-ardana \
"ps auxww | grep cinder-volume | grep -v grep"
rc=$?
if [ "$rc" != "1" ]
then
echo ERROR: Cinder Volume service should not be running on the second controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m2-ardana \
"ps auxww | grep cinder-backup | grep -v grep"
rc=$?
if [ "$rc" != "1" ]
then
echo ERROR: Cinder Backup service should not be running on the second controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m2-ardana \
"ps auxww | grep cinder-api | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder API service should be running on the second controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m2-ardana \
"ps auxww | grep cinder-scheduler | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Scheduler service should be running on the second controller.
result="fail"
fi
### Check Third Controller ###
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m3-ardana \
"ps auxww | grep cinder-volume | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Volume service should be running on the third controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m3-ardana \
"ps auxww | grep cinder-backup | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Backup service should be running on the third controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m3-ardana \
"ps auxww | grep cinder-api | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder API service should be running on the third controller.
result="fail"
fi
ssh -o BatchMode=yes -o StrictHostKeyChecking=no project-ccp-controller-m3-ardana \
"ps auxww | grep cinder-scheduler | grep -v grep"
rc=$?
if [ "$rc" != "0" ]
then
echo ERROR: Cinder Scheduler service should be running on the third controller.
result="fail"
fi
if [ "$result" == "fail" ]
then
echo FAILURE: Could not validate cinder services running on controllers, check error \
messages above for more details.
exit -1
else
echo SUCCESS: Validated cinder services running on expected controllers.
exit 0
fi
07070100000033000041ED0000000000000000000000035F23024000000000000000000000000000000000000000000000003800000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tiny07070100000034000041ED0000000000000000000000035F23024000000000000000000000000000000000000000000000004400000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tiny/input-model07070100000035000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004900000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tiny/input-model/data07070100000036000081A40000000000000000000000015F2302400000065F000000000000000000000000000000000000005B00000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tiny/input-model/data/control_plane.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
control-planes:
- name: ccp
control-plane-prefix: ccp
region-name: region1
failure-zones:
- AZ1
- AZ2
- AZ3
common-service-components:
- lifecycle-manager-target
clusters:
- name: cluster0
cluster-prefix: c0
server-role:
- SERVER1-ROLE
member-count: 1
allocation-policy: strict
service-components:
- lifecycle-manager
- mysql
- ip-cluster
- keystone-api
- keystone-client
- rabbitmq
- openstack-client
- cinder-api
- cinder-scheduler
- cinder-volume
- cinder-backup
- cinder-client
- swift-ring-builder
- swift-proxy
- swift-account
- swift-container
- swift-object
- swift-client
- memcached
07070100000037000081A40000000000000000000000015F23024000000784000000000000000000000000000000000000005300000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tiny/input-model/data/disks.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
disk-models:
- name: DISKS
volume-groups:
# The policy is not to consume 100% of the space of each volume group.
# 5% should be left free for snapshots and to allow for some flexibility.
# sda_root is a templated value to align with whatever partition is really used
# This value is checked in os config and replaced by the partition actually used
# on sda e.g. sda1 or sda5
- name: ardana-vg
physical-volumes:
- /dev/sda_root
logical-volumes:
- name: root
size: 75%
fstype: ext4
mount: /
- name: log
size: 15%
mount: /var/log
fstype: ext4
mkfs-opts: -O large_file
- name: crash
size: 2%
mount: /var/crash
fstype: ext4
mkfs-opts: -O large_file
device-groups:
- name: swiftobj
devices:
- name: /dev/sdc
- name: /dev/sdd
consumer:
name: swift
attrs:
rings:
- account
- container
- object-0
- name: cinder-volume
devices:
- name: /dev/sde
consumer:
name: cinder
07070100000038000081A40000000000000000000000015F230240000003F6000000000000000000000000000000000000005500000000ardana-cinder-8.0+git.1596129856.263f430/ardana-ci/tiny/input-model/data/servers.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
product:
version: 2
baremetal:
netmask: 255.255.255.0
subnet: 192.168.110.0
server-interface: eth2
servers:
- id: server1
ip-addr: 192.168.110.3
role: SERVER1-ROLE
server-group: RACK1
mac-addr: a4:93:0c:4f:7c:73
nic-mapping: VAGRANT
ilo-ip: 192.168.109.3
ilo-password: password
ilo-user: admin
07070100000039000081A40000000000000000000000015F23024000000693000000000000000000000000000000000000004600000000ardana-cinder-8.0+git.1596129856.263f430/cinder-configure-monasca.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
# The monasca agent tasks need to run after cinder has started
- hosts: CND-API:CND-BCK:CND-SCH:CND-VOL:&MON-AGN
become: yes
roles:
- {role: monasca-agent, run_mode: Use}
- cinder-monitor
tasks:
- include: roles/cinder-monitor/tasks/install.yml
- include: roles/cinder-monitor/tasks/monasca_custom_plugins.yml
- include: roles/cinder-monitor/tasks/monasca_agents.yml
vars:
cinder_agent: "True"
- include: roles/cinder-monitor/tasks/monasca_alarms.yml
vars:
cinder_volume_monitor_state: present
- hosts: CND-API:&MON-AGN
become: yes
roles:
- cinder-monitor
tasks:
- include: roles/cinder-monitor/tasks/monasca_api_alarms.yml
# Apply the monasca agent to backend nodes
- hosts: VSA-BLK:CEP-MON:CEP-OSD:&MON-AGN
become: yes
roles:
- {role: monasca-agent, run_mode: Use}
- cinder-monitor
tasks:
- include: roles/cinder-monitor/tasks/install.yml
- include: roles/cinder-monitor/tasks/monasca_custom_plugins.yml
- include: roles/cinder-monitor/tasks/monasca_agents.yml
0707010000003A000081A40000000000000000000000015F2302400000038B000000000000000000000000000000000000003B00000000ardana-cinder-8.0+git.1596129856.263f430/cinder-deploy.yml#
# (c) Copyright 2017-2018 SUSE LLC
#
# 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: pbstart.yml
vars:
playbook_name: "cinder-deploy.yml"
- include: ses-deploy.yml
- include: _cinder-install.yml
- include: _cinder-configure.yml
- include: cinder-stop.yml
- include: cinder-start.yml
- include: _cinder-populate.yml
- include: pbfinish.yml
vars:
playbook_name: "cinder-deploy.yml"
0707010000003B000081A40000000000000000000000015F23024000000F12000000000000000000000000000000000000004300000000ardana-cinder-8.0+git.1596129856.263f430/cinder-migrate-volume.yml#
# (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
# Usage:
# If the storage input model is not being used specify the index of the host
# which will run the Cinder volume and backup services in the cinder control
# plane specific fact file. The fact files for each control plane are on the
# lifecycle-manager in the /etc/ansible/facts.d directory. Each fact file
# should only contain the index number of the host which will run the
# Cinder volume and backup services. The host index numbers can be obtained
# by running the cinder-show-volume-hosts.yml playbook.
#
# After the relevant fact file(s) have been edited run the cinder migration
# playbook as follows:
# ansible-playbook -i hosts/verb_hosts cinder-migrate-volume.yml \
# --limit=<LIMIT_PATTERN>
# where LIMIT_PATTERN is the pattern used to limit the hosts selected to a
# specific control plane. The cinder-migrate-volume.yml has to be run for
# each control plane where migrations are needed.
# Verify that the specified host index is valid before
# performing migrate
- hosts: CND-VOL
max_fail_percentage: 0
roles:
- guard-cluster
- _CND-CMN
tasks:
- include: roles/_CND-CMN/tasks/check_migrate_hostindex.yml
# Confirm that Cinder volume and backup are being migrated
# to the expected host
# During CI tests, confirm_cinder_migrate is set to false
# and the migrate_confirmation playbook is not executed.
- hosts: CND-VOL
vars:
confirm_cinder_migrate: true
roles:
- _CND-CMN
tasks:
- include: roles/_CND-CMN/tasks/migrate_confirmation.yml
when: confirm_cinder_migrate
# Stop cinder volume monitoring on all CND-VOL hosts.
# - avoid false alarms during migration
- hosts: CND-VOL:&MON-AGN
become: yes
roles:
- {role: monasca-agent, run_mode: Use}
- cinder-monitor
tasks:
- include: roles/cinder-monitor/tasks/monasca_alarms.yml
vars:
cinder_volume_monitor_state: absent
# Stop cinder volume on all CND-VOL hosts.
- hosts: CND-VOL
become: yes
roles:
- CND-VOL
tasks:
- include: roles/CND-VOL/tasks/stop.yml
# Stop Cinder Backup on all CND-BCK hosts
- hosts: CND-BCK
become: yes
roles:
- CND-BCK
tasks:
- include: roles/CND-BCK/tasks/stop.yml
# If config_data.CND is not defined the Cinder volume
# and backup services will only be started on the host
# specified in the cinder control plane specific fact file.
# If config_data.CND is defined Cinder Volume and Backup
# will be started on all CND-VOL hosts
- hosts: CND-VOL
become: yes
roles:
- CND-VOL
tasks:
- include: roles/CND-VOL/tasks/start.yml
- include: roles/CND-VOL/tasks/populate.yml
- hosts: CND-BCK
become: yes
roles:
- CND-BCK
tasks:
- include: roles/CND-BCK/tasks/start.yml
- include: roles/CND-BCK/tasks/populate.yml
# Start cinder volume monitoring on all CND-VOL hosts.
- hosts: CND-VOL:&MON-AGN
become: yes
roles:
- {role: monasca-agent, run_mode: Use}
- cinder-monitor
tasks:
- include: roles/cinder-monitor/tasks/monasca_alarms.yml
vars:
cinder_volume_monitor_state: present
# Mark variable for clearing from fact cache
- hosts: CND-VOL
roles:
- _CND-CMN
tasks:
- include: roles/_CND-CMN/tasks/_clear_cached_variable.yml
0707010000003C000081A40000000000000000000000015F2302400000039E000000000000000000000000000000000000005300000000ardana-cinder-8.0+git.1596129856.263f430/cinder-reconfigure-credentials-change.yml#
# (c) Copyright 2017-2018 SUSE LLC
#
# 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: ses-reconfigure.yml
- include: _cinder-configure.yml
- hosts: CND-API
roles:
- CND-API
# This task should be set to run-once
tasks:
- include: roles/CND-API/tasks/keystone_change_pwd.yml
ansible_python_interpreter: >
{{ KEY_CLI.vars.keystone_client_python_interpreter }}
- include: cinder-start.yml
0707010000003D000081A40000000000000000000000015F230240000002A5000000000000000000000000000000000000004000000000ardana-cinder-8.0+git.1596129856.263f430/cinder-reconfigure.yml#
# (c) Copyright 2017-2018 SUSE LLC
#
# 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: ses-reconfigure.yml
- include: _cinder-configure.yml
- include: cinder-start.yml
0707010000003E000081A40000000000000000000000015F23024000000289000000000000000000000000000000000000003C00000000ardana-cinder-8.0+git.1596129856.263f430/cinder-restart.yml#
# (c) Copyright 2018 SUSE LLC
#
# 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: _cinder-schedule-restart.yml
- include: cinder-start.yml
0707010000003F000081A40000000000000000000000015F23024000000312000000000000000000000000000000000000004600000000ardana-cinder-8.0+git.1596129856.263f430/cinder-show-volume-hosts.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
# Display the Cinder volume hosts
- hosts: CND-VOL
roles:
- _CND-CMN
tasks:
- include: roles/_CND-CMN/tasks/show_volume_hosts.yml
07070100000040000081A40000000000000000000000015F23024000000568000000000000000000000000000000000000003A00000000ardana-cinder-8.0+git.1596129856.263f430/cinder-start.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- hosts: CND-API
become: yes
roles:
- CND-API
tasks:
- include: roles/CND-API/tasks/start.yml
- hosts: CND-SCH
become: yes
roles:
- CND-SCH
tasks:
- include: roles/CND-SCH/tasks/start.yml
- hosts: CND-VOL
become: yes
roles:
- CND-VOL
tasks:
- include: roles/CND-VOL/tasks/start.yml
- hosts: CND-BCK
become: yes
roles:
- CND-BCK
tasks:
- include: roles/CND-BCK/tasks/start.yml
- hosts: CND-VOL:NOV-CMP
become: yes
roles:
- CND-SVC
tasks:
- include: roles/CND-SVC/tasks/start.yml
# Mark variable for clearing from fact cache
- hosts: CND-API:CND-BCK:CND-SCH:CND-VOL
roles:
- _CND-CMN
tasks:
- include: roles/_CND-CMN/tasks/_clear_cached_variable.yml
07070100000041000081A40000000000000000000000015F2302400000049F000000000000000000000000000000000000003B00000000ardana-cinder-8.0+git.1596129856.263f430/cinder-status.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- hosts: CND-API
max_fail_percentage: 0
become: yes
roles:
- CND-API
tasks:
- include: roles/CND-API/tasks/status.yml
- hosts: CND-SCH
max_fail_percentage: 0
become: yes
roles:
- CND-SCH
tasks:
- include: roles/CND-SCH/tasks/status.yml
- hosts: CND-VOL
max_fail_percentage: 0
become: yes
roles:
- CND-VOL
tasks:
- include: roles/CND-VOL/tasks/status.yml
- hosts: CND-BCK
max_fail_percentage: 0
become: yes
roles:
- CND-BCK
tasks:
- include: roles/CND-BCK/tasks/status.yml
07070100000042000081A40000000000000000000000015F23024000000438000000000000000000000000000000000000003900000000ardana-cinder-8.0+git.1596129856.263f430/cinder-stop.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- hosts: CND-API
become: yes
roles:
- CND-API
tasks:
- include: roles/CND-API/tasks/stop.yml
- hosts: CND-SCH
become: yes
roles:
- CND-SCH
tasks:
- include: roles/CND-SCH/tasks/stop.yml
- hosts: CND-VOL
become: yes
roles:
- CND-VOL
tasks:
- include: roles/CND-VOL/tasks/stop.yml
- hosts: CND-BCK
become: yes
roles:
- CND-BCK
tasks:
- include: roles/CND-BCK/tasks/stop.yml
07070100000043000081A40000000000000000000000015F230240000004B9000000000000000000000000000000000000003C00000000ardana-cinder-8.0+git.1596129856.263f430/cinder-upgrade.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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: cinder-status.yml
# Make sure ses is called so we have the facts.
- include: ses-deploy.yml
# Stop cinder volume on all CND-VOL hosts.
- hosts: CND-VOL
become: yes
roles:
- CND-VOL
tasks:
- include: roles/CND-VOL/tasks/stop.yml
# Stop Cinder Backup on all CND-BCK hosts
- hosts: CND-BCK
become: yes
roles:
- CND-BCK
tasks:
- include: roles/CND-BCK/tasks/stop.yml
- include: _cinder-install.yml
- include: _cinder-configure.yml
- include: cinder-start.yml
- include: _cinder-populate.yml
- include: cinder-status.yml
07070100000044000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003000000000ardana-cinder-8.0+git.1596129856.263f430/config07070100000045000081A40000000000000000000000015F230240000004DA000000000000000000000000000000000000004400000000ardana-cinder-8.0+git.1596129856.263f430/config/cinder-symlinks.yml#
# (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
# The following relative symlinks are created under the
# my_cloud/config directory.
---
symlinks:
"cinder/api.conf.j2": "roles/CND-API/templates/api.conf.j2"
"cinder/backup.conf.j2": "roles/CND-BCK/templates/backup.conf.j2"
"cinder/cinder.conf.j2": "roles/_CND-CMN/templates/cinder.conf.j2"
"cinder/cinder_vol_run_location.yml": "roles/CND-VOL/vars/cinder_vol_run_location.yml"
"cinder/scheduler.conf.j2": "roles/CND-SCH/templates/scheduler.conf.j2"
"cinder/volume.conf.j2": "roles/CND-VOL/templates/volume.conf.j2"
"cinder/policy.json.j2": "roles/CND-API/templates/policy.json.j2"
07070100000046000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003800000000ardana-cinder-8.0+git.1596129856.263f430/filter_plugins07070100000047000081A40000000000000000000000015F2302400000064C000000000000000000000000000000000000004800000000ardana-cinder-8.0+git.1596129856.263f430/filter_plugins/device_group.py#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
# Usage :
# {device_groups:[{name:N1, consumer:C1, ...},
# {name:N2, consumer:C2, ...},
# ...]} | device_group(N2, C2)
# => {name:N2, consumer:C2, ...}
def device_group(data, dg_name, dg_consumer):
output = None
for dg in data.get("device_groups", []):
# skip if doesn't match require name
name = dg.get("name")
if not name or name != dg_name:
continue
# skip if doesn't have a consumer entry
consumer = dg.get("consumer")
if not consumer:
continue
# skip if consumer name doesn't match required consumer
consumer_name = consumer.get("name")
if not consumer_name or consumer_name != dg_consumer:
continue
# found a matching device group, so return it
output = dg
break
return output
class FilterModule(object):
def filters(self):
return {'device_group': device_group}
07070100000048000041ED0000000000000000000000095F23024000000000000000000000000000000000000000000000002F00000000ardana-cinder-8.0+git.1596129856.263f430/roles07070100000049000041ED0000000000000000000000075F23024000000000000000000000000000000000000000000000003700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API0707010000004A000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004000000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/defaults0707010000004B000081A40000000000000000000000015F230240000006A5000000000000000000000000000000000000004900000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/defaults/main.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
cinder_component: cinder-api
cinder_service_data: "{{ CND_API }}"
cinder_service_group_name: "{{ verb_hosts.CND_API }}"
# flag to track if venv activation is required during start
cinder_api_activate_required: false
# Default service directories
cinder_api_conf_dir: "{{ 'cinder-api' | config_dir() }}"
cinder_api_venv_share_dir: "{{ 'cinder-api' | share_dir() }}/cinder"
# Files that need to be symlinked from versioned conf dir to
# global conf dir
cinder_api_conf_symlinks:
- { dst: '{{ cinder_dir }}/cinder.conf', src: 'cinder.conf' }
# Cinder API auditing settings
cinder_api_audit_enable: "{{ CND.audit.enabled }}"
cinder_audit_log_base_location: "{{ CND.audit.dir }}"
cinder_audit_notification_driver: log
cinder_public_endpoint: "{{ CND_API.advertises.vips.public[0].url }}"
cinder_glance_url: "{% if CND_API.consumes_GLA_API is defined %}{{ CND_API.consumes_GLA_API.vips.private[0].url }}{% endif %}"
cinder_keymgr_url: "{% if CND_API.consumes_KEYMGR_API is defined %}{{ CND_API.consumes_KEYMGR_API.vips.private[0].url }}{% endif %}"
0707010000004C000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003C00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/meta0707010000004D000081A40000000000000000000000015F230240000002A4000000000000000000000000000000000000004500000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/meta/main.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
dependencies:
- role: _CND-CMN
0707010000004E000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003D00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/tasks0707010000004F000081A40000000000000000000000015F23024000000DD8000000000000000000000000000000000000004B00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/tasks/configure.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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: ../../_CND-CMN/tasks/configure.yml
vars:
cinder_conf_dir: "{{ cinder_api_conf_dir }}"
cinder_conf_template: ../../CND-API/templates/api-cinder.conf.j2
- name: CND-API | configure | Generate "{{ cinder_api_conf_dir }}"/api.conf
become: yes
template:
src: api.conf.j2
dest: "{{ cinder_api_conf_dir }}/api.conf"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0400
register: ardana_notify_cinder_api_restart_required
- name: CND-API | configure | Generate "{{ cinder_api_conf_dir }}"/api-paste.ini
become: yes
template:
src: api-paste.ini.j2
dest: "{{ cinder_api_conf_dir }}/api-paste.ini"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0400
register: ardana_notify_cinder_api_restart_required
- name: CND-API | configure | Generate "{{ cinder_api_conf_dir }}"/api-logging.conf
become: yes
template:
src: api-logging.conf.j2
dest: "{{ cinder_api_conf_dir }}/api-logging.conf"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0400
register: ardana_notify_cinder_api_restart_required
- name: CND-API | configure | Generate "{{ cinder_api_conf_dir }}"/api_audit_map.conf
become: yes
template:
src: api_audit_map.conf.j2
dest: "{{ cinder_api_conf_dir }}/api_audit_map.conf"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0400
register: ardana_notify_cinder_api_restart_required
- name: CND-API | configure | Generate "{{ cinder_api_conf_dir }}"/policy.json
become: yes
template:
src: policy.json.j2
dest: "{{ cinder_api_conf_dir }}/policy.json"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0400
- name: CND-API | configure | Deprecate "{{ cinder_dir }}"/policy.json
become: yes
file:
path: "{{ cinder_dir }}/policy.json"
state: absent
- name: CND-API | configure | Modify cinder-api.log file attributes
become: yes
file:
path: "{{ cinder_logs_dir }}/cinder-api.log"
state: touch
owner: cinder
group: adm
mode: 0640
- name: CND-API | configure | Modify cinder-api-json.log file attributes
become: yes
file:
path: "{{ cinder_logs_dir }}/cinder-api-json.log"
state: touch
owner: cinder
group: adm
mode: 0640
- name: CND-API | configure | Create cinder audit directory structure if necessary
file:
path: "{{ cinder_audit_log_base_location }}/cinder"
state: directory
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0755
become: yes
when: cinder_api_audit_enable | bool
- name: CND-API | configure | Create/Modify cinder audit log files
file:
path: "{{ cinder_audit_log_base_location }}/cinder/{{ item }}"
state: touch
owner: "{{ cinder_user }}"
group: adm
mode: 0640
become: yes
with_items:
- cinder-audit.log
when: cinder_api_audit_enable | bool
07070100000050000081A40000000000000000000000015F23024000000702000000000000000000000000000000000000004E00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/tasks/db_configure.yml---
#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
- name: CND-API | db_configure | Sync Cinder DB (once cinder.conf is set up)
become: yes
become_user: cinder
command: >
"{{ cinder_common_bin_dir }}/cinder-manage"
--config-file "{{ cinder_api_conf_dir }}/cinder.conf"
--config-file "{{ cinder_api_conf_dir }}/api.conf"
db sync
run_once_per: verb_hosts.CND_API
# The following tasks assumes that the redundant Cinder Volume entry
# in the services table has a host value of ha-volume-manager. This is
# the default value of the host variable in cinder.conf.j2. If the
# host value in cinder.conf.j2 is different the redundant entry in the
# services table can be removed by running the cinder-manage service
# remove command substituting in the new host value
- name: CND-API | db_configure | Mark redundant Cinder Volume service deleted
become: yes
become_user: cinder
command: >
"{{ cinder_common_bin_dir }}/cinder-manage"
--config-file "{{ cinder_api_conf_dir }}/cinder.conf"
--config-file "{{ cinder_api_conf_dir }}/api.conf"
service remove cinder-volume ha-volume-manager
ignore_errors: yes
run_once_per: verb_hosts.CND_API
07070100000051000081A40000000000000000000000015F2302400000073C000000000000000000000000000000000000004900000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/tasks/install.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
# Install Cinder API
- include: ../../_CND-CMN/tasks/install.yml
- name: CND-API | install | Install Cinder API dependencies
become: yes
package:
name: "{{ item }}"
state: present
with_items: cinder_api_dependencies
ignore_errors: True
- name: CND-API | install | Update venv cache
install_package:
cache: update
- name: CND-API | install | Install Cinder API
install_package:
name: cinder
service: cinder-api
state: present
activate: act_off
register: ardana_notify_cinder_api_venv_install
- name: CND-API | install | Set service directories
set_fact:
cinder_api_conf_dir: >-
{{ 'cinder-api' |
config_dir(ardana_notify_cinder_api_venv_install.version) }}
cinder_api_venv_share_dir: >-
{{ 'cinder-api' |
share_dir(ardana_notify_cinder_api_venv_install.version) }}/cinder"
- name: CND-API | install | Register the cinder-api service
setup_systemd:
service: cinder-api
cmd: cinder-api
user: cinder
group: cinder
args: >
--config-file {{ cinder_api_conf_dir }}/cinder.conf
--config-file {{ cinder_api_conf_dir }}/api.conf
when: ardana_notify_cinder_api_venv_install.changed
07070100000052000081A40000000000000000000000015F23024000000786000000000000000000000000000000000000005500000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/tasks/keystone_change_pwd.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- name: CND-API | keystone_change_pwd | Get a domain scoped token
keystone_v3:
endpoint: "{{ cinder_keystone.admin_url }}"
login_username: "{{ cinder_keystone.admin_user }}"
login_password: "{{ cinder_keystone.admin_password }}"
login_user_domain_name: "{{ cinder_keystone.default_domain_name }}"
login_domain_name: "{{ cinder_keystone.default_domain_name }}"
action: "token_get"
run_once: true
register: cinder_domain_scoped_token_result
- name: CND-API | keystone_change_pwd | Update cinder admin user password
become: yes
keystone_v3:
login_token: "{{ cinder_domain_scoped_token_result.result }}"
endpoint: "{{ cinder_keystone.admin_url }}"
action: "reset_password_by_admin"
user_name: "{{ cinder_identity_admin_user }}"
user_password: "{{ cinder_identity_admin_password }}"
user_domain_name: "Default"
run_once: true
- name: CND-API | keystone_change_pwd | Update cinderinternal user password
become: yes
keystone_v3:
login_token: "{{ cinder_domain_scoped_token_result.result }}"
endpoint: "{{ cinder_keystone.admin_url }}"
action: "reset_password_by_admin"
user_name: "{{ cinderinternal_user }}"
user_password: "{{ cinderinternal_password }}"
user_domain_name: "Default"
run_once: true
07070100000053000081A40000000000000000000000015F23024000000DF1000000000000000000000000000000000000004F00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/tasks/keystone_conf.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- name: CND-API | keystone_conf | Get a domain scoped token
keystone_v3:
endpoint: "{{ cinder_keystone.admin_url }}"
login_username: "{{ cinder_keystone.admin_user }}"
login_password: "{{ cinder_keystone.admin_password }}"
login_user_domain_name: "{{ cinder_keystone.default_domain_name }}"
login_domain_name: "{{ cinder_keystone.default_domain_name }}"
action: "token_get"
run_once: true
register: cinder_domain_scoped_token_result
- name: CND-API | keystone_conf | Create Cinder Keystone Service User in service tenant
keystone_v3:
action: "create_user"
login_token: "{{ cinder_domain_scoped_token_result.result }}"
endpoint: "{{ cinder_keystone.admin_url }}"
user_name: "{{ cinder_identity_admin_user }}"
user_domain_name: "Default"
user_password: "{{ cinder_identity_admin_password }}"
run_once: true
- name: CND-API | keystone_conf | Create Cinder Keystone Service user-role assignment for user cinder, role admin, tenant service
keystone_v3:
action: "grant_project_role"
login_token: "{{ cinder_domain_scoped_token_result.result }}"
endpoint: "{{ cinder_keystone.admin_url }}"
user_name: "{{ cinder_identity_admin_user }}"
project_name: "{{ cinder_keystone.admin_tenant_name }}"
user_domain_name: "Default"
project_domain_name: "Default"
role_name: 'admin'
run_once: true
- name: CND-API | keystone_conf | Create Cinder Admin role in Keystone
keystone_v3:
action: "create_role"
endpoint: "{{ cinder_keystone.admin_url }}"
login_token: "{{ cinder_domain_scoped_token_result.result }}"
role_name: "cinder_admin"
description: "Cinder admin role"
run_once: true
- name: CND-API | keystone_conf | Create cinder internal project
keystone_v3:
action: "create_project"
login_token: "{{ cinder_domain_scoped_token_result.result }}"
endpoint: "{{ cinder_keystone.admin_url }}"
project_name: "{{ cinderinternal_project_name }}"
project_domain_name: "Default"
description: "Cinder internal project"
run_once: true
- name: CND-API | keystone_conf | Create cinder internal user
keystone_v3:
action: "create_user"
login_token: "{{ cinder_domain_scoped_token_result.result }}"
endpoint: "{{ cinder_keystone.admin_url }}"
user_name: "{{ cinderinternal_user }}"
user_domain_name: "Default"
user_password: "{{ cinderinternal_password }}"
description: "Cinder internal user"
run_once: true
- name: CND-API | keystone_conf | Grant the cinder internal user the cinder_admin role
keystone_v3:
action: "grant_project_role"
login_token: "{{ cinder_domain_scoped_token_result.result }}"
endpoint: "{{ cinder_keystone.admin_url }}"
user_name: "{{ cinderinternal_user }}"
project_name: "{{ cinderinternal_project_name }}"
user_domain_name: "Default"
project_domain_name: "Default"
role_name: 'cinder_admin'
run_once: true
07070100000054000081A40000000000000000000000015F230240000009A6000000000000000000000000000000000000005300000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/tasks/keystone_get_conf.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- name: CND-API | keystone_get_conf | Get a domain scoped token
keystone_v3:
endpoint: "{{ cinder_keystone.admin_url }}"
login_username: "{{ cinder_keystone.admin_user }}"
login_password: "{{ cinder_keystone.admin_password }}"
login_user_domain_name: "{{ cinder_keystone.default_domain_name }}"
login_domain_name: "{{ cinder_keystone.default_domain_name }}"
action: "token_get"
run_once: true
register: cinder_domain_scoped_token_result
- name: CND-API | keystone_get_conf | Find cinder internal project id
keystone_v3:
action: "find_project"
login_token: "{{ cinder_domain_scoped_token_result.result }}"
endpoint: "{{ cinder_keystone.admin_url }}"
project_domain_name: "Default"
project_name: "{{ cinderinternal_project_name }}"
run_once: true
register: cinderinternal_find_project_result
- name: CND-API | keystone_get_conf | Set cinder internal project id fact
set_fact:
cinderinternal_project_id: >-
{{ cinderinternal_find_project_result.result.id }}
run_once: true
- name: CND-API | keystone_get_conf | Find cinder internal user id
keystone_v3:
action: "find_user"
login_token: "{{ cinder_domain_scoped_token_result.result }}"
endpoint: "{{ cinder_keystone.admin_url }}"
user_domain_name: "Default"
user_name: "{{ cinderinternal_user }}"
run_once: true
register: cinderinternal_find_user_result
- name: CND-API | keystone_get_conf | Set cinder internal user id fact
set_fact:
cinderinternal_user_id: >-
{{ cinderinternal_find_user_result.result.id }}
run_once: true
- name: CND-API | keystone_get_conf | Display cinder internal project id and user id
debug:
msg: >
Cinder Internal Project id is {{ cinderinternal_project_id }}
and User id is {{ cinderinternal_user_id }}
run_once: true
07070100000055000081A40000000000000000000000015F230240000002AD000000000000000000000000000000000000004600000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/tasks/main.yml#
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
- name: CND-API | main | include OS specific variables
include_vars: "{{ ansible_os_family | lower }}.yml"07070100000056000081A40000000000000000000000015F23024000000283000000000000000000000000000000000000004A00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/tasks/populate.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
07070100000057000081A40000000000000000000000015F23024000000A3E000000000000000000000000000000000000004700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/tasks/start.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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: ../../_CND-CMN/tasks/_activate.yml
# Restart or start Cinder API
- name: CND-API | start | Activate the latest install
install_package:
name: cinder
service: cinder-api
activate: act_on
version: "{{ ardana_notify_cinder_api_venv_install.version }}"
when: not (ardana_notify_cinder_api_venv_install is not defined)
- name: CND-API | start | Update conf dir symlinks
file:
src: "{{ cinder_api_conf_dir }}/{{ item.src }}"
dest: "{{ item.dst }}"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
state: link
when: not (ardana_notify_cinder_api_venv_install is not defined)
with_items: cinder_api_conf_symlinks
# This is only relevant when upgrading from 2.x to 3.x or beyond
- name: CND-API | start | Check for outdated api_audit_map.conf link
stat:
path: "{{ cinder_dir }}/api_audit_map.conf"
register: cinder_api_audit_map_stat_result
- name: CND-API | start | Remove api_audit_map.conf link if necessary
file:
path: "{{ cinder_dir }}/api_audit_map.conf"
state: absent
when: cinder_api_audit_map_stat_result.stat.islnk is defined and
cinder_api_audit_map_stat_result.stat.islnk
- name: CND-API | start | Restart cinder-api service
service:
name: cinder-api
state: restarted
when: ((not (ardana_notify_cinder_restart_required is not defined)) and
ardana_notify_cinder_restart_required.changed and
cinder_api_restarted_result is not defined) or
(ardana_notify_cinder_api_restart_required is defined and
ardana_notify_cinder_api_restart_required.changed and
cinder_api_restarted_result is not defined) or
(ardana_notify_cinder_api_venv_install is defined and
ardana_notify_cinder_api_venv_install.changed and
cinder_api_restarted_result is not defined)
register: cinder_api_restarted_result
- name: CND-API | start | Ensure cinder-api service is started
service:
name: cinder-api
state: started
07070100000058000081A40000000000000000000000015F230240000002B9000000000000000000000000000000000000004800000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/tasks/status.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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: ../../_CND-CMN/tasks/_service_status.yml
07070100000059000081A40000000000000000000000015F230240000002E2000000000000000000000000000000000000004600000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/tasks/stop.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- name: CND-API | stop | Stop Cinder API service
service: name=cinder-api state=stopped
0707010000005A000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004100000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/templates0707010000005B000081A40000000000000000000000015F23024000000402000000000000000000000000000000000000005400000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/templates/api-cinder.conf.j2{#
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
#}
{% extends "roles/_CND-CMN/templates/cinder.conf.j2" %}
{% block api_paste_config scoped %}
api_paste_config = {{ cinder_conf_dir }}/api-paste.ini
{% endblock api_paste_config %}
{% block audit_middleware scoped %}
{% if cinder_api_audit_enable | bool %}
[audit_middleware_notifications]
driver = {{ cinder_audit_notification_driver }}
{% endif %}
{% endblock audit_middleware %}
0707010000005C000081A40000000000000000000000015F2302400000078D000000000000000000000000000000000000005500000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/templates/api-logging.conf.j2{#
#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
#}
{% extends "roles/_CND-CMN/templates/cinder-logging.conf.j2" %}
{% block extend_loggers scoped %}{% if cinder_api_audit_enable | bool %}, audit{% endif %}{% endblock extend_loggers %}
{% block extend_handlers scoped %}{% if cinder_api_audit_enable | bool %}, audit{% endif %}{% endblock extend_handlers %}
{% block extend_formatters scoped %}{% if cinder_api_audit_enable | bool %}, minimal{% endif %}{% endblock extend_formatters %}
{% block audit_logger scoped %}
{% if cinder_api_audit_enable | bool %}
[logger_audit]
qualname: oslo.messaging.notification.audit
handlers: audit
propagate: 0
level: INFO
{% endif %}
{% endblock audit_logger %}
{% block audit_handler scoped %}
{% if cinder_api_audit_enable | bool %}
# Write audit messages to the cinder-audit.log file
[handler_audit]
class: handlers.WatchedFileHandler
args: ('{{ cinder_audit_log_base_location }}/cinder/cinder-audit.log',)
formatter: minimal
level: INFO
{% endif %}
{% endblock audit_handler %}
{% block audit_formatter scoped %}
{% if cinder_api_audit_enable | bool %}
# the minimal formatter
[formatter_minimal]
format=%(message)s
{% endif %}
{% endblock audit_formatter %}
{% block logfilename %}cinder-api{% endblock logfilename %}
{% block jsonlogfilename %}cinder-api-json{% endblock jsonlogfilename %}
0707010000005D000081A40000000000000000000000015F23024000000FC3000000000000000000000000000000000000005200000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/templates/api-paste.ini.j2{#
#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
#}
#############
# OpenStack #
#############
[composite:osapi_volume]
use = call:cinder.api:root_app_factory
/: apiversions
/v1: openstack_volume_api_v1
/v2: openstack_volume_api_v2
/v3: openstack_volume_api_v3
[composite:openstack_volume_api_v1]
use = call:cinder.api.middleware.auth:pipeline_factory
noauth = ssl cors request_id faultwrap sizelimit osprofiler noauth apiv1
keystone = ssl cors request_id faultwrap sizelimit osprofiler authtoken keystonecontext
{%- if cinder_api_audit_enable | bool %} audit{% endif %}
apiv1
keystone_nolimit = ssl cors request_id faultwrap sizelimit osprofiler authtoken keystonecontext
{%- if cinder_api_audit_enable | bool %} audit{% endif %}
apiv1
[composite:openstack_volume_api_v2]
use = call:cinder.api.middleware.auth:pipeline_factory
noauth = ssl cors request_id faultwrap sizelimit osprofiler noauth apiv2
keystone = ssl cors request_id faultwrap sizelimit osprofiler authtoken keystonecontext
{%- if cinder_api_audit_enable | bool %} audit{% endif %}
apiv2
keystone_nolimit = ssl cors request_id faultwrap sizelimit osprofiler authtoken keystonecontext
{%- if cinder_api_audit_enable | bool %} audit{% endif %}
apiv2
[composite:openstack_volume_api_v3]
use = call:cinder.api.middleware.auth:pipeline_factory
noauth = ssl cors request_id faultwrap sizelimit osprofiler noauth apiv3
keystone = ssl cors request_id faultwrap sizelimit osprofiler authtoken keystonecontext
{%- if cinder_api_audit_enable | bool %} audit{% endif %}
apiv3
keystone_nolimit = ssl cors request_id faultwrap sizelimit osprofiler authtoken keystonecontext
{%- if cinder_api_audit_enable | bool %} audit{% endif %}
apiv3
[filter:request_id]
paste.filter_factory = oslo_middleware.request_id:RequestId.factory
[filter:cors]
paste.filter_factory = oslo_middleware.cors:filter_factory
oslo_config_project = cinder
latent_allow_headers = X-Auth-Token, X-Identity-Status, X-Roles, X-Service-Catalog, X-User-Id, X-Tenant-Id, X-OpenStack-Request-ID, X-Trace-Info, X-Trace-HMAC
latent_expose_headers = X-Auth-Token, X-Subject-Token, X-Service-Token, X-OpenStack-Request-ID
latent_allow_methods = GET, PUT, POST, DELETE, PATCH
[filter:faultwrap]
paste.filter_factory = cinder.api.middleware.fault:FaultWrapper.factory
[filter:osprofiler]
paste.filter_factory = osprofiler.web:WsgiMiddleware.factory
hmac_keys = SECRET_KEY
enabled = yes
[filter:noauth]
paste.filter_factory = cinder.api.middleware.auth:NoAuthMiddleware.factory
[filter:sizelimit]
paste.filter_factory = oslo_middleware.sizelimit:RequestBodySizeLimiter.factory
[filter:ssl]
paste.filter_factory = oslo_middleware.http_proxy_to_wsgi:HTTPProxyToWSGI.factory
[app:apiv1]
paste.app_factory = cinder.api.v1.router:APIRouter.factory
[app:apiv2]
paste.app_factory = cinder.api.v2.router:APIRouter.factory
[app:apiv3]
paste.app_factory = cinder.api.v3.router:APIRouter.factory
[pipeline:apiversions]
pipeline = ssl cors faultwrap osvolumeversionapp
[app:osvolumeversionapp]
paste.app_factory = cinder.api.versions:Versions.factory
##########
# Shared #
##########
[filter:keystonecontext]
paste.filter_factory = cinder.api.middleware.auth:CinderKeystoneContext.factory
[filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
[filter:audit]
paste.filter_factory = keystonemiddleware.audit:filter_factory
audit_map_file = {{ cinder_api_conf_dir }}/api_audit_map.conf
0707010000005E000081A40000000000000000000000015F230240000002CC000000000000000000000000000000000000004D00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/templates/api.conf.j2{#
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
#}
[DEFAULT]
log_config_append={{ cinder_api_conf_dir }}/api-logging.conf
0707010000005F000081A40000000000000000000000015F2302400000055D000000000000000000000000000000000000005700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/templates/api_audit_map.conf.j2{#
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
#}
[DEFAULT]
# default target endpoint type
# should match the endpoint type defined in service catalog
target_endpoint_type = None
# map urls ending with specific text to a unique action
[custom_actions]
associate = update/associate
disassociate = update/disassociate
disassociate_all = update/disassociate_all
associations = read/list/associations
# possible end path of api requests
[path_keywords]
defaults = None
detail = None
limits = None
os-quota-specs = project
qos-specs = qos-spec
snapshots = snapshot
types = type
volumes = volume
# map endpoint type defined in service catalog to CADF typeURI
[service_endpoints]
volume = service/storage/block
volumev2 = service/storage/block
volumev3 = service/storage/block
07070100000060000081A40000000000000000000000015F23024000001E46000000000000000000000000000000000000005000000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/templates/policy.json.j2{
"admin_or_owner": "is_admin:True or role:cinder_admin or (role:admin and is_admin_project:True) or project_id:%(project_id)s",
"default": "rule:admin_or_owner",
"admin_api": "is_admin:True or role:cinder_admin or (role:admin and is_admin_project:True)",
"volume:create": "",
"volume:create_from_image": "",
"volume:delete": "rule:admin_or_owner",
"volume:force_delete": "rule:admin_api",
"volume:get": "rule:admin_or_owner",
"volume:get_all": "rule:admin_or_owner",
"volume:get_volume_metadata": "rule:admin_or_owner",
"volume:create_volume_metadata": "rule:admin_or_owner",
"volume:delete_volume_metadata": "rule:admin_or_owner",
"volume:update_volume_metadata": "rule:admin_or_owner",
"volume:get_volume_admin_metadata": "rule:admin_api",
"volume:update_volume_admin_metadata": "rule:admin_api",
"volume:get_snapshot": "rule:admin_or_owner",
"volume:get_all_snapshots": "rule:admin_or_owner",
"volume:create_snapshot": "rule:admin_or_owner",
"volume:delete_snapshot": "rule:admin_or_owner",
"volume:update_snapshot": "rule:admin_or_owner",
"volume:get_snapshot_metadata": "rule:admin_or_owner",
"volume:delete_snapshot_metadata": "rule:admin_or_owner",
"volume:update_snapshot_metadata": "rule:admin_or_owner",
"volume:extend": "rule:admin_or_owner",
"volume:extend_attached_volume": "rule:admin_or_owner",
"volume:update_readonly_flag": "rule:admin_or_owner",
"volume:retype": "rule:admin_or_owner",
"volume:update": "rule:admin_or_owner",
"volume:revert_to_snapshot": "rule:admin_or_owner",
"volume_extension:types_manage": "rule:admin_api",
"volume_extension:types_extra_specs:create": "rule:admin_api",
"volume_extension:types_extra_specs:delete": "rule:admin_api",
"volume_extension:types_extra_specs:index": "rule:admin_api",
"volume_extension:types_extra_specs:show": "rule:admin_api",
"volume_extension:types_extra_specs:update": "rule:admin_api",
"volume_extension:access_types_qos_specs_id": "rule:admin_api",
"volume_extension:access_types_extra_specs": "rule:admin_api",
"volume_extension:volume_type_access": "rule:admin_or_owner",
"volume_extension:volume_type_access:addProjectAccess": "rule:admin_api",
"volume_extension:volume_type_access:removeProjectAccess": "rule:admin_api",
"volume_extension:volume_type_encryption": "rule:admin_api",
"volume_extension:volume_encryption_metadata": "rule:admin_or_owner",
"volume_extension:extended_snapshot_attributes": "rule:admin_or_owner",
"volume_extension:volume_image_metadata": "rule:admin_or_owner",
"volume_extension:qos_specs_manage:create": "rule:admin_api",
"volume_extension:qos_specs_manage:get": "rule:admin_api",
"volume_extension:qos_specs_manage:get_all": "rule:admin_api",
"volume_extension:qos_specs_manage:update": "rule:admin_api",
"volume_extension:qos_specs_manage:delete": "rule:admin_api",
"volume_extension:quotas:show": "",
"volume_extension:quotas:update": "rule:admin_api",
"volume_extension:quotas:delete": "rule:admin_api",
"volume_extension:quota_classes": "rule:admin_api",
"volume_extension:quota_classes:validate_setup_for_nested_quota_use": "rule:admin_api",
"volume_extension:volume_admin_actions:reset_status": "rule:admin_api",
"volume_extension:snapshot_admin_actions:reset_status": "rule:admin_api",
"volume_extension:backup_admin_actions:reset_status": "rule:admin_api",
"volume_extension:volume_admin_actions:force_delete": "rule:admin_api",
"volume_extension:volume_admin_actions:force_detach": "rule:admin_api",
"volume_extension:snapshot_admin_actions:force_delete": "rule:admin_api",
"volume_extension:backup_admin_actions:force_delete": "rule:admin_api",
"volume_extension:volume_admin_actions:migrate_volume": "rule:admin_api",
"volume_extension:volume_admin_actions:migrate_volume_completion": "rule:admin_api",
"volume_extension:volume_actions:upload_public": "rule:admin_api",
"volume_extension:volume_actions:upload_image": "rule:admin_or_owner",
"volume_extension:volume_host_attribute": "rule:admin_api",
"volume_extension:volume_tenant_attribute": "rule:admin_or_owner",
"volume_extension:volume_mig_status_attribute": "rule:admin_api",
"volume_extension:hosts": "rule:admin_api",
"volume_extension:services:index": "rule:admin_api",
"volume_extension:services:update" : "rule:admin_api",
"volume_extension:volume_manage": "rule:admin_api",
"volume_extension:volume_unmanage": "rule:admin_api",
"volume_extension:list_manageable": "rule:admin_api",
"volume_extension:capabilities": "rule:admin_api",
"volume:create_transfer": "rule:admin_or_owner",
"volume:accept_transfer": "",
"volume:delete_transfer": "rule:admin_or_owner",
"volume:get_transfer": "rule:admin_or_owner",
"volume:get_all_transfers": "rule:admin_or_owner",
"volume:failover_host": "rule:admin_api",
"volume:freeze_host": "rule:admin_api",
"volume:thaw_host": "rule:admin_api",
"backup:create" : "",
"backup:delete": "rule:admin_or_owner",
"backup:get": "rule:admin_or_owner",
"backup:get_all": "rule:admin_or_owner",
"backup:restore": "rule:admin_or_owner",
"backup:backup-import": "rule:admin_api",
"backup:backup-export": "rule:admin_api",
"backup:update": "rule:admin_or_owner",
"backup:backup_project_attribute": "rule:admin_api",
"volume:attachment_create": "",
"volume:attachment_update": "rule:admin_or_owner",
"volume:attachment_delete": "rule:admin_or_owner",
"snapshot_extension:snapshot_actions:update_snapshot_status": "",
"snapshot_extension:snapshot_manage": "rule:admin_api",
"snapshot_extension:snapshot_unmanage": "rule:admin_api",
"snapshot_extension:list_manageable": "rule:admin_api",
"consistencygroup:create" : "group:nobody",
"consistencygroup:delete": "group:nobody",
"consistencygroup:update": "group:nobody",
"consistencygroup:get": "group:nobody",
"consistencygroup:get_all": "group:nobody",
"consistencygroup:create_cgsnapshot" : "group:nobody",
"consistencygroup:delete_cgsnapshot": "group:nobody",
"consistencygroup:get_cgsnapshot": "group:nobody",
"consistencygroup:get_all_cgsnapshots": "group:nobody",
"group:group_types_manage": "rule:admin_api",
"group:group_types_specs": "rule:admin_api",
"group:access_group_types_specs": "rule:admin_api",
"group:group_type_access": "rule:admin_or_owner",
"group:create" : "",
"group:delete": "rule:admin_or_owner",
"group:update": "rule:admin_or_owner",
"group:get": "rule:admin_or_owner",
"group:get_all": "rule:admin_or_owner",
"group:create_group_snapshot": "",
"group:delete_group_snapshot": "rule:admin_or_owner",
"group:update_group_snapshot": "rule:admin_or_owner",
"group:get_group_snapshot": "rule:admin_or_owner",
"group:get_all_group_snapshots": "rule:admin_or_owner",
"group:reset_group_snapshot_status":"rule:admin_api",
"group:reset_status":"rule:admin_api",
"group:enable_replication": "rule:admin_or_owner",
"group:disable_replication": "rule:admin_or_owner",
"group:failover_replication": "rule:admin_or_owner",
"group:list_replication_targets": "rule:admin_or_owner",
"scheduler_extension:scheduler_stats:get_pools" : "rule:admin_api",
"message:delete": "rule:admin_or_owner",
"message:get": "rule:admin_or_owner",
"message:get_all": "rule:admin_or_owner",
"clusters:get": "rule:admin_api",
"clusters:get_all": "rule:admin_api",
"clusters:update": "rule:admin_api",
"workers:cleanup": "rule:admin_api"
}
07070100000061000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003C00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/vars07070100000062000081A40000000000000000000000015F23024000000280000000000000000000000000000000000000004700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/vars/debian.yml#
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
cinder_api_dependencies:
- libmysqlclient18
- libxslt1.107070100000063000081A40000000000000000000000015F230240000002AA000000000000000000000000000000000000004500000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-API/vars/suse.yml#
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
cinder_api_dependencies:
- libmysqlclient18
- libxslt1
- logrotate
- openstack-suse-sudo
07070100000064000041ED0000000000000000000000065F23024000000000000000000000000000000000000000000000003700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK07070100000065000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004000000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/defaults07070100000066000081A40000000000000000000000015F2302400000052F000000000000000000000000000000000000004900000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/defaults/main.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
cinder_component: cinder-backup
cinder_service_data: "{{ CND_BCK }}"
cinder_service_group_name: "{{ verb_hosts.CND_BCK }}"
# flag to track if venv activation is required during start
cinder_backup_activate_required: false
cinder_keymgr_url: "{% if CND_BCK.consumes_KEYMGR_API is defined %}{{ CND_BCK.consumes_KEYMGR_API.vips.private[0].url }}{% endif %}"
cinder_backup_swift_url: "{% if CND_BCK.consumes_SWF_PRX is defined %}{{ CND_BCK.consumes_SWF_PRX.vips.private[0].url }}/v1/AUTH_{% endif %}"
# We force the log level for backup to WARNING because of a bug in
# eventlet as described here:
# https://github.com/eventlet/eventlet/issues/432
cinder_loglevel: WARNING
07070100000067000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003C00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/meta07070100000068000081A40000000000000000000000015F230240000002BA000000000000000000000000000000000000004500000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/meta/main.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
dependencies:
- role: _CND-CMN
- role: CND-VOL
07070100000069000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003D00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/tasks0707010000006A000081A40000000000000000000000015F230240000003D1000000000000000000000000000000000000004B00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/tasks/_activate.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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: ../../_CND-CMN/tasks/_activate.yml
- name: CND-BCK | _activate | Activate the latest install
install_package:
name: cinder
service: cinder-backup
activate: act_on
version: "{{ ardana_notify_cinder_backup_venv_install.version }}"
when: not (ardana_notify_cinder_backup_venv_install is not defined)
0707010000006B000081A40000000000000000000000015F23024000000B69000000000000000000000000000000000000004B00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/tasks/configure.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
- name: CND-BCK | configure | obtain cinder backup version from package install
set_fact:
cinder_backup_version: "{{ ardana_notify_cinder_backup_venv_install.version }}"
when: not (ardana_notify_cinder_backup_venv_install is not defined)
- name: CND-BCK | configure | obtain cinder backup version from {{ cinder_venv_root }}/
shell: >
readlink -f {{ cinder_venv_root }}/cinder-backup |
sed 's#{{ cinder_venv_root }}/cinder-backup-##g'
register: cinder_backup_link_result
when: ardana_notify_cinder_backup_venv_install is not defined
- name: CND-BCK | configure | set backup version fact from link
set_fact:
cinder_backup_version: "{{ cinder_backup_link_result.stdout }}"
when: ardana_notify_cinder_backup_venv_install is not defined
- name: CND-BCK | configure | set versioned cinder_backup_conf_dir fact
set_fact:
cinder_backup_conf_dir: >-
{{ 'cinder-backup' | config_dir(cinder_backup_version) }}
- include: ../../CND-VOL/tasks/configure.yml
vars:
cinder_conf_dir: "{{ cinder_backup_conf_dir }}"
cnd_configure_tgt: "False"
- name: CND-BCK | configure | Generate {{ cinder_backup_conf_dir }}/backup.conf
template:
src: backup.conf.j2
dest: "{{ cinder_backup_conf_dir }}/backup.conf"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0400
register: ardana_notify_cinder_backup_restart_required
# We force the log level for backup to WARNING because of a bug in
# eventlet as described here:
# https://github.com/eventlet/eventlet/issues/432
- name: CND-BCK | configure | Create '{{ cinder_backup_conf_dir }}'/backup-logging.conf
template:
src: backup-logging.conf.j2
dest: "{{ cinder_backup_conf_dir }}/backup-logging.conf"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0400
register: ardana_notify_cinder_backup_restart_required
- name: CND-BCK | configure | Modify cinder-backup.log file attributes
file:
path: "{{ cinder_logs_dir }}/cinder-backup.log"
state: touch
owner: cinder
group: adm
mode: 0640
- name: CND-BCK | configure | Modify cinder-backup-json.log file attributes
file:
path: "{{ cinder_logs_dir }}/cinder-backup-json.log"
state: touch
owner: cinder
group: adm
mode: 0640
0707010000006C000081A40000000000000000000000015F23024000000785000000000000000000000000000000000000004900000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/tasks/install.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
# Install Cinder Backup
- include: ../../CND-VOL/tasks/install.yml cnd_stop_tgt="False"
# TODO(fergal): Remove once the fix for SOC-10522 has landed
# The cinder-backup services depends on the switfclient module
# but that module is currently missing from the Cinder venv.
- name: CND-BCK | install | Install cinder-backup dependencies
package:
name: "{{ item }}"
state: present
with_items:
- python-swiftclient
- name: CND-BCK | install | Update venv cache
install_package:
cache: update
- name: CND-BCK | install | Install Cinder Backup
install_package:
name: cinder
service: cinder-backup
state: present
activate: act_off
register: ardana_notify_cinder_backup_venv_install
- name: CND-BCK | install | Set service directories
set_fact:
cinder_backup_conf_dir: >-
{{ 'cinder-backup' |
config_dir(ardana_notify_cinder_backup_venv_install.version) }}
- name: CND-BCK | install | Register the cinder-backup service
setup_systemd:
service: cinder-backup
cmd: cinder-backup
user: cinder
group: cinder
args: >
--config-file {{ cinder_backup_conf_dir }}/cinder.conf
--config-file {{ cinder_backup_conf_dir }}/backup.conf
when: ardana_notify_cinder_backup_venv_install.changed
0707010000006D000081A40000000000000000000000015F23024000000283000000000000000000000000000000000000004A00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/tasks/populate.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
0707010000006E000081A40000000000000000000000015F230240000006A9000000000000000000000000000000000000004700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/tasks/start.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
# Restart or start Cinder Backup
- include: ../../_CND-CMN/tasks/_determine_volume_host.yml
- include: ./_activate.yml
- name: CND-BCK | start | Restart cinder-backup service
service:
name: cinder-backup
state: restarted
when: (_cinder_volume_running_here | bool) and
(((not (ardana_notify_cinder_restart_required is not defined)) and
ardana_notify_cinder_restart_required.changed and
cinder_backup_restarted_result is not defined) or
(ardana_notify_cinder_backup_restart_required is defined and
ardana_notify_cinder_backup_restart_required.changed and
cinder_backup_restarted_result is not defined) or
(ardana_notify_cinder_backup_venv_install is defined and
ardana_notify_cinder_backup_venv_install.changed and
cinder_backup_restarted_result is not defined))
register: cinder_backup_restarted_result
- name: CND-BCK | start | Ensure cinder-backup service is started
service:
name: cinder-backup
state: started
when: (_cinder_volume_running_here | bool)
0707010000006F000081A40000000000000000000000015F230240000002B8000000000000000000000000000000000000004800000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/tasks/status.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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: ../../_CND-CMN/tasks/_service_status.yml
07070100000070000081A40000000000000000000000015F230240000002E8000000000000000000000000000000000000004600000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/tasks/stop.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- name: CND-BCK | stop | Stop Cinder Backup service
service: name=cinder-backup state=stopped
07070100000071000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004100000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/templates07070100000072000081A40000000000000000000000015F23024000000350000000000000000000000000000000000000005800000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/templates/backup-logging.conf.j2{#
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
#}
{% extends "roles/_CND-CMN/templates/cinder-logging.conf.j2" %}
{% block logfilename %}cinder-backup{% endblock logfilename %}
{% block jsonlogfilename %}cinder-backup-json{% endblock jsonlogfilename %}
07070100000073000081A40000000000000000000000015F230240000002D2000000000000000000000000000000000000005000000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-BCK/templates/backup.conf.j2{#
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
#}
[DEFAULT]
log_config_append={{ cinder_backup_conf_dir }}/backup-logging.conf
07070100000074000041ED0000000000000000000000065F23024000000000000000000000000000000000000000000000003700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH07070100000075000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004000000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH/defaults07070100000076000081A40000000000000000000000015F23024000000424000000000000000000000000000000000000004900000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH/defaults/main.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
cinder_component: cinder-scheduler
cinder_service_data: "{{ CND_SCH }}"
cinder_service_group_name: "{{ verb_hosts.CND_SCH }}"
# flag to track if venv activation is required during start
cinder_scheduler_activate_required: false
# Default service directories
cinder_scheduler_conf_dir: "{{ 'cinder-scheduler' | config_dir() }}"
cinder_scheduler_venv_share_dir: "{{ 'cinder-scheduler' | share_dir() }}/cinder"
07070100000077000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003C00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH/meta07070100000078000081A40000000000000000000000015F230240000002A4000000000000000000000000000000000000004500000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH/meta/main.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
dependencies:
- role: _CND-CMN
07070100000079000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003D00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH/tasks0707010000007A000081A40000000000000000000000015F2302400000073B000000000000000000000000000000000000004B00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH/tasks/configure.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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: ../../_CND-CMN/tasks/configure.yml
vars:
cinder_conf_dir: "{{ cinder_scheduler_conf_dir }}"
- name: CND-SCH | configure | Generate {{ cinder_scheduler_conf_dir }}/scheduler.conf
template:
src: scheduler.conf.j2
dest: "{{ cinder_scheduler_conf_dir }}/scheduler.conf"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0400
register: ardana_notify_cinder_scheduler_restart_required
- name: CND-SCH | configure | Create '{{ cinder_scheduler_conf_dir }}'/scheduler-logging.conf
template:
src: scheduler-logging.conf.j2
dest: "{{ cinder_scheduler_conf_dir }}/scheduler-logging.conf"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0400
register: ardana_notify_cinder_scheduler_restart_required
- name: CND-SCH | configure | Modify cinder-scheduler.log file attributes
file:
path: "{{ cinder_logs_dir }}/cinder-scheduler.log"
state: touch
owner: cinder
group: adm
mode: 0640
- name: CND-SCH | configure | Modify Cinder cinder-scheduler-json.log file attributes
file:
path: "{{ cinder_logs_dir }}/cinder-scheduler-json.log"
state: touch
owner: cinder
group: adm
mode: 0640
0707010000007B000081A40000000000000000000000015F23024000000701000000000000000000000000000000000000004900000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH/tasks/install.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
# Install Cinder Scheduler
- include: ../../_CND-CMN/tasks/install.yml
- name: CND-SCH | install | Update venv cache
install_package:
cache: update
- name: CND-SCH | install | Install Cinder Scheduler
install_package:
name: cinder
service: cinder-scheduler
state: present
activate: act_off
register: ardana_notify_cinder_scheduler_venv_install
- name: CND-SCH | install | Set service directories
set_fact:
cinder_scheduler_conf_dir: >-
{{ 'cinder-scheduler' |
config_dir(ardana_notify_cinder_scheduler_venv_install.version) }}
cinder_scheduler_venv_share_dir: >-
{{ 'cinder-scheduler' |
share_dir(
ardana_notify_cinder_scheduler_venv_install.version) }}/cinder
# post-install tasks
- name: CND-SCH | install | Register the cinder-scheduler service
setup_systemd:
service: cinder-scheduler
cmd: cinder-scheduler
user: cinder
group: cinder
args: >
--config-file {{ cinder_scheduler_conf_dir }}/cinder.conf
--config-file {{ cinder_scheduler_conf_dir }}/scheduler.conf
when: ardana_notify_cinder_scheduler_venv_install.changed
0707010000007C000081A40000000000000000000000015F23024000000283000000000000000000000000000000000000004A00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH/tasks/populate.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
0707010000007D000081A40000000000000000000000015F2302400000075A000000000000000000000000000000000000004700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH/tasks/start.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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: ../../_CND-CMN/tasks/_activate.yml
# Restart or start Cinder Scheduler
- name: CND-SCH | start | Activate the latest install
install_package:
name: cinder
service: cinder-scheduler
activate: act_on
version: "{{ ardana_notify_cinder_scheduler_venv_install.version }}"
when: not (ardana_notify_cinder_scheduler_venv_install is not defined)
- name: CND-SCH | start | Restart cinder-scheduler service
service:
name: cinder-scheduler
state: restarted
when: ((not (ardana_notify_cinder_restart_required is not defined)) and
ardana_notify_cinder_restart_required.changed and
cinder_scheduler_restarted_result is not defined) or
(ardana_notify_cinder_scheduler_restart_required is defined and
ardana_notify_cinder_scheduler_restart_required.changed and
cinder_scheduler_restarted_result is not defined) or
(ardana_notify_cinder_scheduler_venv_install is defined and
ardana_notify_cinder_scheduler_venv_install.changed and
cinder_scheduler_restarted_result is not defined)
register: cinder_scheduler_restarted_result
- name: CND-SCH | start | Start cinder-scheduler service
service:
name: cinder-scheduler
state: started
0707010000007E000081A40000000000000000000000015F230240000002B8000000000000000000000000000000000000004800000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH/tasks/status.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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: ../../_CND-CMN/tasks/_service_status.yml
0707010000007F000081A40000000000000000000000015F230240000002EE000000000000000000000000000000000000004600000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH/tasks/stop.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- name: CND-SCH | stop | Stop Cinder Scheduler service
service: name=cinder-scheduler state=stopped
07070100000080000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004100000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH/templates07070100000081000081A40000000000000000000000015F23024000000356000000000000000000000000000000000000005B00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH/templates/scheduler-logging.conf.j2{#
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
#}
{% extends "roles/_CND-CMN/templates/cinder-logging.conf.j2" %}
{% block logfilename %}cinder-scheduler{% endblock logfilename %}
{% block jsonlogfilename %}cinder-scheduler-json{% endblock jsonlogfilename %}
07070100000082000081A40000000000000000000000015F230240000002D8000000000000000000000000000000000000005300000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SCH/templates/scheduler.conf.j2{#
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
#}
[DEFAULT]
log_config_append={{ cinder_scheduler_conf_dir }}/scheduler-logging.conf
07070100000083000041ED0000000000000000000000055F23024000000000000000000000000000000000000000000000003700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SVC07070100000084000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004000000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SVC/defaults07070100000085000081A40000000000000000000000015F23024000000283000000000000000000000000000000000000004900000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SVC/defaults/main.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
07070100000086000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003D00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SVC/tasks07070100000087000081A40000000000000000000000015F23024000000283000000000000000000000000000000000000004B00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SVC/tasks/configure.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
07070100000088000081A40000000000000000000000015F230240000003CA000000000000000000000000000000000000004900000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SVC/tasks/install.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
# Install Cinder Service Dependencies
# Call out significant dependencies separately from main package
- name: CND-SVC | install | Install Cinder Client OS specific dependencies
become: yes
package:
name: "{{ item }}"
state: present
with_items: cinder_service_client_dependencies
ignore_errors: True07070100000089000081A40000000000000000000000015F230240000002AD000000000000000000000000000000000000004600000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SVC/tasks/main.yml#
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
- name: CND-SVC | main | include OS specific variables
include_vars: "{{ ansible_os_family | lower }}.yml"0707010000008A000081A40000000000000000000000015F23024000000283000000000000000000000000000000000000004A00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SVC/tasks/populate.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
0707010000008B000081A40000000000000000000000015F2302400000047D000000000000000000000000000000000000004700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SVC/tasks/start.yml#
# (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- name: CND-SVC | start | Notify systemd of changes
command: systemctl daemon-reload
- name: CND-SVC | start | Start open-iscsi service on Debian
service: name=open-iscsi state=started
when: ansible_os_family == 'Debian'
- name: CND-SVC | start | Start open-iscsi service on RedHat
service: name=iscsid state=started
when: ansible_os_family == 'RedHat'
- name: CND-SVC | start | Start open-iscsi service on Suse
service: name=iscsid state=started
when: ansible_os_family == 'Suse'
0707010000008C000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003C00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SVC/vars0707010000008D000081A40000000000000000000000015F23024000000293000000000000000000000000000000000000004700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SVC/vars/debian.yml#
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
cinder_service_client_dependencies:
- open-iscsi
- sysfsutils
- sg3-utils0707010000008E000081A40000000000000000000000015F2302400000029E000000000000000000000000000000000000004700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SVC/vars/redhat.yml#
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
cinder_service_client_dependencies:
- iscsi-initiator-utils
- sysfsutils
- sg3_utils0707010000008F000081A40000000000000000000000015F230240000002BF000000000000000000000000000000000000004500000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-SVC/vars/suse.yml#
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
cinder_service_client_dependencies:
- logrotate
- open-iscsi
- openstack-suse-sudo
- sg3_utils
- sysfsutils
07070100000090000041ED0000000000000000000000075F23024000000000000000000000000000000000000000000000003700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL07070100000091000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004000000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/defaults07070100000092000081A40000000000000000000000015F23024000000514000000000000000000000000000000000000004900000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/defaults/main.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
cinder_component: cinder-volume
cinder_service_data: "{{ CND_VOL }}"
cinder_service_group_name: "{{ verb_hosts.CND_VOL }}"
cinder_volumes_file_size_mb: 5000
# flag to track if venv activation is required during start
cinder_volume_activate_required: false
cinder_keymgr_url: "{% if CND_VOL.consumes_KEYMGR_API is defined %}{{ CND_VOL.consumes_KEYMGR_API.vips.private[0].url }}{% endif %}"
cinder_glance_url: "{% if CND_VOL.consumes_GLA_API is defined %}{{ CND_VOL.consumes_GLA_API.vips.private[0].url }}{% endif %}"
cinder_volume_nova_url: "{% if CND_VOL.consumes_NOV_API is defined %}{{ CND_VOL.consumes_NOV_API.vips.private[0].url }}{% endif %}"
07070100000093000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003C00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/meta07070100000094000081A40000000000000000000000015F230240000002A4000000000000000000000000000000000000004500000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/meta/main.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
dependencies:
- role: _CND-CMN
07070100000095000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003D00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/tasks07070100000096000081A40000000000000000000000015F230240000003D1000000000000000000000000000000000000004B00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/tasks/_activate.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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: ../../_CND-CMN/tasks/_activate.yml
- name: CND-VOL | _activate | Activate the latest install
install_package:
name: cinder
service: cinder-volume
activate: act_on
version: "{{ ardana_notify_cinder_volume_venv_install.version }}"
when: not (ardana_notify_cinder_volume_venv_install is not defined)
07070100000097000081A40000000000000000000000015F230240000006D8000000000000000000000000000000000000005500000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/tasks/_cinder_volume_vars.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
- name: CND-VOL | _cinder_volume_vars | obtain cinder volume version from package install
set_fact:
cinder_volume_version: >-
{{ ardana_notify_cinder_volume_venv_install.version }}
when: not (ardana_notify_cinder_volume_venv_install is not defined)
- name: CND-VOL | _cinder_volume_vars | obtain cinder volume version from {{ cinder_venv_root }}/
shell: >
readlink -f {{ cinder_venv_root }}/cinder-volume |
sed 's#{{ cinder_venv_root }}/cinder-volume-##g'
register: cinder_volume_link_result
when: ardana_notify_cinder_volume_venv_install is not defined
- name: CND-VOL | _cinder_volume_vars | set volume version fact from link
set_fact:
cinder_volume_version: "{{ cinder_volume_link_result.stdout }}"
when: ardana_notify_cinder_volume_venv_install is not defined
- name: CND-VOL | _cinder_volume_vars | set versioned cinder_volume_conf_dir fact
set_fact:
cinder_volume_conf_dir: >-
{{ 'cinder-volume' | config_dir(cinder_volume_version) }}
cinder_volume_venv_share_dir: >-
{{ 'cinder-volume' | share_dir(cinder_volume_version) }}/cinder
07070100000098000081A40000000000000000000000015F2302400000047C000000000000000000000000000000000000005800000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/tasks/_test_backends_enabled.yml#
# (c) Copyright 2018 SUSE LLC
#
# 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: ./_cinder_volume_vars.yml
- name: CND-VOL | _test_backends_enabled | awk cinder.conf for enabled_backends
shell: >
grep -qs
"^[[:blank:]]*enabled_backends[[:blank:]]*=[[:blank:]]*[^[:blank:]].*" \
"{{ cinder_volume_conf_dir }}"/cinder.conf \
|| echo NO_BACKENDS
register: _cinder_backends_test_result
- name: set the backends bool default
set_fact: _cinder_backends_enabled=False
- name: set the backends bool
set_fact: _cinder_backends_enabled=True
when: '"NO_BACKENDS" not in _cinder_backends_test_result.stdout_lines'
07070100000099000081A40000000000000000000000015F23024000001044000000000000000000000000000000000000004B00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/tasks/configure.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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: ./_cinder_volume_vars.yml
# Trying to render conf_dir in the include line results in infinite recursion.
# Since cinder_conf_dir may have already been set via CND-BCK role, which
# includes this task, we don't want to override with cinder_volume_conf_dir.
- name: CND-VOL | configure | Generate conf_dir path for common include
set_fact:
conf_dir: "{{ cinder_conf_dir | default(cinder_volume_conf_dir) }}"
- include: ../../_CND-CMN/tasks/configure.yml
vars:
cinder_conf_dir: "{{ conf_dir }}"
- name: CND-VOL | configure | Generate {{ cinder_volume_conf_dir }}/volume.conf
template:
src: volume.conf.j2
dest: "{{ cinder_volume_conf_dir }}/volume.conf"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0400
register: ardana_notify_cinder_volume_restart_required
- name: CND-VOL | configure | Create '{{ cinder_volume_conf_dir }}'/volume-logging.conf
template:
src: volume-logging.conf.j2
dest: "{{ cinder_volume_conf_dir }}/volume-logging.conf"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0400
register: ardana_notify_cinder_volume_restart_required
- name: CND-VOL | configure | Create several rootwrap volume.filters
shell: >
rsync -ciog --chmod=0400 --chown=root:root
{{ cinder_volume_venv_share_dir }}/etc/cinder/{{ item }}
{{ cinder_dir }}/{{ item }}
register: rsync_result
changed_when: 'rsync_result.stdout != ""'
with_items:
- rootwrap.d/volume.filters
when: deployer_media_legacy_layout|bool
# Since this file is included by CND-BCK role, cnd_configure_tgt may
# have been set to False; if not default to True.
- name: CND-VOL | configure | Determine cinder_configure_tgt setting
set_fact:
cinder_configure_tgt: "{{ cnd_configure_tgt | default(True) }}"
- name: CND-VOL | configure | Set up tgtd
file:
path: /etc/tgt/conf.d
owner: root
group: root
mode: 0755
state: directory
when: cinder_configure_tgt | bool
- name: CND-VOL | configure | Create the Cinder tgt configs directory
file:
path: "{{ cinder_state_path }}/volumes/"
owner: cinder
group: cinder
mode: 0750
state: directory
when: cinder_configure_tgt | bool
- name: CND-VOL | configure | Set up Cinder volumes within tgtd
template:
src: etc/tgt/conf.d/cinder.conf.j2
dest: /etc/tgt/conf.d/cinder.conf
owner: root
group: root
mode: 0644
when: cinder_configure_tgt | bool
- name: CND-VOL | configure | ensure cinder_tgt.conf (from package install) is deleted
file:
path: /etc/tgt/conf.d/cinder_tgt.conf
state: absent
when: cinder_configure_tgt | bool
- name: CND-VOL | configure | Setup volume group for LVM if needed
lvg:
vg: cinder-volumes
pvs: "{{ cinder_lvm_device_group.devices[0].name }}"
when: cinder_lvm_device_group
# When upgrading from prvious versions remove the now redundant
# cindervolume.fact file. This task can be removed at a future date
- name: CND-VOL | configure | Delete cindervolume.fact file if present
file:
path: /etc/ansible/facts.d/cindervolume.fact
state: absent
- name: CND-VOL | configure | Modify cinder-volume.log file attributes
file:
path: "{{ cinder_logs_dir }}/cinder-volume.log"
state: touch
owner: cinder
group: adm
mode: 0640
- name: CND-VOL | configure | Modify cinder-volume-json.log file attributes
file:
path: "{{ cinder_logs_dir }}/cinder-volume-json.log"
state: touch
owner: cinder
group: adm
mode: 0640
0707010000009A000081A40000000000000000000000015F2302400000093A000000000000000000000000000000000000004900000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/tasks/install.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
# Install Cinder Volume
- name: CND-VOL | install | Determin cinder_stop_tgt setting
set_fact:
cinder_stop_tgt: "{{ cnd_stop_tgt | default(True) }}"
- include: ../../_CND-CMN/tasks/install.yml
# Call out significant dependencies separately from main package
- name: CND-VOL | install | Install Cinder Volume dependencies
become: yes
package:
name: "{{ item }}"
state: present
with_items: cinder_volume_dependencies
ignore_errors: True
register: install_vol_deps_pkg_check_result
- name: CND-VOL | install | Stop the tgt daemon
service:
name: "{{ cinder_tgt_service_name }}"
state: stopped
when: install_vol_deps_pkg_check_result and cinder_stop_tgt == True
- name: CND-VOL | install | Update venv cache
install_package:
cache: update
- name: CND-VOL | install | Install Cinder Volume
install_package:
name: cinder
service: cinder-volume
state: present
activate: act_off
register: ardana_notify_cinder_volume_venv_install
- name: CND-VOL | install | Set service directories
set_fact:
cinder_volume_conf_dir: >-
{{ 'cinder-volume' |
config_dir(ardana_notify_cinder_volume_venv_install.version) }}
cinder_volume_venv_share_dir: >-
{{ 'cinder-volume' |
share_dir(ardana_notify_cinder_volume_venv_install.version) }}/cinder
# post-install tasks
- name: CND-VOL | install | Register the cinder-volume service
setup_systemd:
service: cinder-volume
cmd: cinder-volume
user: cinder
group: cinder
args: >
--config-file {{ cinder_volume_conf_dir }}/cinder.conf
--config-file {{ cinder_volume_conf_dir }}/volume.conf
when: ardana_notify_cinder_volume_venv_install.changed
0707010000009B000081A40000000000000000000000015F230240000002AD000000000000000000000000000000000000004600000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/tasks/main.yml#
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
- name: CND-SVC | main | include OS specific variables
include_vars: "{{ ansible_os_family | lower }}.yml"0707010000009C000081A40000000000000000000000015F23024000000283000000000000000000000000000000000000004A00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/tasks/populate.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
0707010000009D000081A40000000000000000000000015F23024000000A64000000000000000000000000000000000000004700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/tasks/start.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
# Restart or start Cinder Volume
- include: ../../_CND-CMN/tasks/_determine_volume_host.yml
- include: ./_activate.yml
# test to see if rendered cinder.conf has enabled_backends set
- include: ./_test_backends_enabled.yml
- name: CND-VOL | start | Start tgt service
service:
name: "{{ cinder_tgt_service_name }}"
state: started
- name: CND-VOL | start | Restart cinder-volume service
service:
name: cinder-volume
state: restarted
when: (_cinder_volume_running_here | bool) and
(_cinder_backends_enabled | bool) and
(((not (ardana_notify_cinder_restart_required is not defined)) and
ardana_notify_cinder_restart_required.changed and
cinder_volume_restarted_result is not defined) or
(ardana_notify_cinder_volume_restart_required is defined and
ardana_notify_cinder_volume_restart_required.changed and
cinder_volume_restarted_result is not defined) or
(ardana_notify_cinder_volume_venv_install is defined and
ardana_notify_cinder_volume_venv_install.changed and
cinder_volume_restarted_result is not defined))
register: cinder_volume_restarted_result
- name: CND-VOL | start | Ensure cinder-volume service is started
service:
name: cinder-volume
state: started
when: (_cinder_volume_running_here | bool) and
(_cinder_backends_enabled | bool)
# This creates the local cinder fact file. On the initial deploy the value
# written to the file will be the default index value of 0. This file is only
# written to if the storage input model is not defined
- name: CND-VOL | start | Write host index to control plane fact file on localhost
become: yes
delegate_to: localhost
copy:
dest: "{{ cinder_volume_run_loc_file }}"
content: "{{ groups[verb_hosts.CND_VOL].index(inventory_hostname) }}"
mode: 0644
when: ((_cinder_volume_running_here | bool) and
((config_data is not defined) or
(config_data is defined and config_data.CND is not defined)))
0707010000009E000081A40000000000000000000000015F2302400000030F000000000000000000000000000000000000004800000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/tasks/status.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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: ./_test_backends_enabled.yml
- include: ../../_CND-CMN/tasks/_service_status.yml
when: (_cinder_backends_enabled | bool)
0707010000009F000081A40000000000000000000000015F230240000003BE000000000000000000000000000000000000004600000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/tasks/stop.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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: ./_test_backends_enabled.yml
- name: CND-VOL | stop | Stop tgt service
service:
name: "{{ cinder_tgt_service_name }}"
state: stopped
- name: CND-VOL | stop | Stop Cinder Volume service
service:
name: cinder-volume
state: stopped
when: (_cinder_backends_enabled | bool)
070701000000A0000081A40000000000000000000000015F230240000004CF000000000000000000000000000000000000005100000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/tasks/validate-config.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
# This task checks that a deployment does not try to use both jinja2 and the
# storage input model to configure backends. The test is that if the directory
# ~/openstack/my_cloud/definition/data/cinder/ exists, then there should be no
# backends enabled in cinder.conf.j2
- name: CND-VOL | validate-config | Cannot mix input model and jinja2 configs
command: >
grep -q '^enabled_backends=[[:space:]]*$'
roles/_CND-CMN/templates/cinder.conf.j2
args:
removes: ../../../../../openstack/my_cloud/definition/data/cinder/
delegate_to: localhost
run_once: true
070701000000A1000041ED0000000000000000000000035F23024000000000000000000000000000000000000000000000004100000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/templates070701000000A2000041ED0000000000000000000000035F23024000000000000000000000000000000000000000000000004500000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/templates/etc070701000000A3000041ED0000000000000000000000035F23024000000000000000000000000000000000000000000000004900000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/templates/etc/tgt070701000000A4000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000005000000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/templates/etc/tgt/conf.d070701000000A5000081A40000000000000000000000015F230240000002AF000000000000000000000000000000000000005F00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/templates/etc/tgt/conf.d/cinder.conf.j2{#
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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 {{ cinder_state_path }}/volumes/*
070701000000A6000081A40000000000000000000000015F23024000000350000000000000000000000000000000000000005800000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/templates/volume-logging.conf.j2{#
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
#}
{% extends "roles/_CND-CMN/templates/cinder-logging.conf.j2" %}
{% block logfilename %}cinder-volume{% endblock logfilename %}
{% block jsonlogfilename %}cinder-volume-json{% endblock jsonlogfilename %}
070701000000A7000081A40000000000000000000000015F230240000002D1000000000000000000000000000000000000005000000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/templates/volume.conf.j2{#
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
#}
[DEFAULT]
log_config_append={{cinder_volume_conf_dir }}/volume-logging.conf
070701000000A8000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003C00000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/vars070701000000A9000081A40000000000000000000000015F230240000006B9000000000000000000000000000000000000005800000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/vars/cinder_vol_run_location.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
# The cinder_vol_host_index value specifies the index in the list of CND-VOL
# nodes of the host where the Cinder Volume service runs. To
# migrate Cinder Volume and Backup to another CND-VOL node, please specify
# the appropriate index value for that node. Leave a space between the colon
# and the index number.
# Note: If the storage input model is defined the cinder_vol_host_index value
# will be ignored and a default assignment of backends to nodes will be used.
# This default assignemnt can be overridden by specifying the assignment of
# backends to nodes in the cinder_backend_assignment.yml file.
cinder_vol_host_index: 0
# Do not edit the following lines
_cinder_volume_running_here: >-
{{ (config_data is not defined and cinder_vol_host_index ==
groups[verb_hosts.CND_VOL].index(inventory_hostname)) or
((config_data is defined and config_data.CND is not defined) and
(cinder_vol_host_index ==
groups[verb_hosts.CND_VOL].index(inventory_hostname))) or
(config_data is defined and config_data.CND is defined) }}
070701000000AA000081A40000000000000000000000015F230240000002C7000000000000000000000000000000000000004700000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/vars/debian.yml#
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
cinder_volume_dependencies:
- lvm2
- qemu-utils
- sg3-utils
- tgt
- thin-provisioning-tools
cinder_tgt_service_name: tgt070701000000AB000081A40000000000000000000000015F230240000002E8000000000000000000000000000000000000004500000000ardana-cinder-8.0+git.1596129856.263f430/roles/CND-VOL/vars/suse.yml#
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
cinder_volume_dependencies:
- lvm2
- openstack-suse-sudo
- qemu-tools
- sg3_utils
# - thin-provisioning-tools
- tgt
cinder_tgt_service_name: tgtd
070701000000AC000041ED0000000000000000000000085F23024000000000000000000000000000000000000000000000003800000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN070701000000AD000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004100000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/defaults070701000000AE000081A40000000000000000000000015F23024000001A78000000000000000000000000000000000000004A00000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/defaults/main.yml#
# (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
cinder_user: cinder
cinder_group: cinder
cinder_home_dir: /var/lib/cinder
mon_agent_group: monasca
# Number of maximum worker allowed regardless of CPUs available
osapi_volume_max_workers: 8
# Number of workers for osapi volume workers. The default will be the
# maximum allowed by variable osapi_volume_max_workers
osapi_volume_worker_count: "{{ ansible_processor_count * ansible_processor_cores * 2 | default('{{ osapi_volume_max_workers }}') }}"
# directories
cinder_dir: /etc/cinder
cinder_rootwrap_dir: /etc/cinder/rootwrap.d
cinderlm_conf_dir: /etc/cinderlm
cinder_logs_dir: /var/log/cinder
cinder_state_path: /var/lib/cinder
# TODO: set image_conversion_dir
cinder_image_conversion_dir: /var/lib/cinder
# TODO: remove in 4.0 cycle
installation_directory: /usr/share
cinder_venv_root: /opt/stack/service
cinder_facts_dir: /etc/ansible/facts.d
# logging
cinder_debug: True
cinder_loglevel: "{{ ardana_loglevel | default('INFO') }}"
cinder_logstash_loglevel: "{{ ardana_loglevel | default('INFO') }}"
cinder_iscsi_helper: tgtadm
#cinder_keymgr_fixed_key:
cinder_control_exchange: cinder
cinder_notification_driver: messaging
cinder_notification_backend: "rabbit"
cinder_osapi_volume_listen: "{{ host.bind.CND_API.internal.ip_address }}"
cinder_osapi_volume_listen_port: "{{ host.bind.CND_API.internal.port }}"
# database ssl
cinder_db_ca_file: "{{ trusted_ca_bundle }}"
cinder_db_ssl: >-
{% if CND_API.consumes_FND_MDB.vips.private[0].use_tls -%}
?ssl_ca={{ cinder_db_ca_file }}
{% endif %}
# database
# DB password and host set by configure
cinder_db: "mysql+pymysql://{{ CND.consumes_FND_MDB.vars.accounts.cinder.username }}:\
{{ CND.consumes_FND_MDB.vars.accounts.cinder.password | urlencode }}@\
{{ CND.consumes_FND_MDB.vips.private[0].host }}/cinder{{ cinder_db_ssl }}"
cinder_max_overflow: 500
cinder_max_pool_size: 500
cinder_min_pool_size: 100
# Keystone
cinder_keystone:
admin_tenant_name: "{{ KEY_API.vars.keystone_service_tenant }}"
admin_user: "{{ KEY_API.vars.keystone_admin_user }}"
admin_password: "{{ KEY_API.vars.keystone_admin_pwd | quote }}"
default_domain_name: "{{ KEY_API.vars.keystone_default_domain }}"
admin_url: "{{ CND_API.consumes_KEY_API.vips.private[0].url }}/v3"
identity_admin_url: "{{ CND_API.consumes_KEY_API.vips.private[0].url }}"
identity_v2_admin_url: "{{ CND_API.consumes_KEY_API.vips.private[0].url }}/v2.0"
region_name: "{{ CND_API.advertises.vips.public[0].region_name }}"
internal_url: "{{ CND_API.consumes_KEY_API.vips.private[0].url }}"
monasca_tenant: "{{ KEY_API.vars.keystone_admin_tenant }}"
cacert_file: "{{ trusted_ca_bundle }}"
memcached_servers: "{% for x in CND.consumes_FND_MEM.members.private %}{{ x.host }}:{{ x.port }}{%if not loop.last %},{% endif %}{% endfor %}"
memcache_secret_key: "{{ CND.consumes_FND_MEM.vars.memcached.cinder.secret_key | quote }}"
cinder_identity_admin_user: >
{{ CND_API | item('consumes_KEY_API.vars.keystone_cinder_user',
default='cinder') }}
cinder_identity_admin_password: >
{{ CND_API | item('consumes_KEY_API.vars.keystone_cinder_password',
default='cindre') }}
cinderlm_capacity_check: "{% if CND_API is defined %}True{% else %}False{% endif %}"
cinderinternal_user: >
{{ CND_API | item('consumes_KEY_API.vars.keystone_cinderinternal_user',
default='cinderinternal') }}
cinderinternal_password: >
{{ CND_API | item('consumes_KEY_API.vars.keystone_cinderinternal_password',
default='cindreinternal') }}
cinderinternal_project_name: >
{{ CND_API | item('consumes_KEY_API.vars.keystone_cinderinternal_tenant',
default='cinderinternal') }}
# Rabbit
cinder_rabbit_userid: "{{ CND.consumes_FND_RMQ.vars.accounts.cinder.username }}"
cinder_rabbit_password: "{{ CND.consumes_FND_RMQ.vars.accounts.cinder.password }}"
cinder_rabbit_use_ssl: "{{ CND.consumes_FND_RMQ.members.private[0].use_tls }}"
cinder_rabbit_hosts_transport_url: >
{%- for x in CND.consumes_FND_RMQ.members.private -%}
{{ cinder_rabbit_userid }}:{{ cinder_rabbit_password }}@{{ x.host }}:{{ x.port }}{%- if not loop.last -%},{%- endif -%}
{%- endfor -%}
# Default service directories
cinder_common_conf_dir: "{{ 'cinder-common' | config_dir() }}"
cinder_common_bin_dir: "{{ 'cinder-common' | bin_dir }}"
cinder_common_venv_share_dir: "{{ 'cinder-common' | share_dir }}/cinder"
cinder_logging_context_formatter: oslo_log.formatters.ContextFormatter
# cinder_lvm_device_group will test as false if no matching device group is found
cinder_lvm_device_group: "{{ host.my_disk_models | device_group('cinder-volume', 'cinder') }}"
# Cinder volume singleton tracking variables
cinder_volume_run_loc_file: "{{ cinder_facts_dir }}/\
cinder_volume_run_location_\
{{ host.my_dimensions.control_plane }}.fact"
cinder_backend_assignment_file: "{{ cinder_facts_dir }}/\
cinder_backend_assignment.fact"
# By default cinder volume and backup are started on the host in each control plane
# with index 0. This can be overridden by specifying a value in the local cinder fact
# file or by defining a storage input model.
cinder_volume_host_index: 0
_cinder_volume_running_here: False
## Cinder SES Integration
cinder_ses_enabled: "{{ 'True' if ses_cinder_user_name is defined else 'False' }}"
cinder_ses_pool_name: "{{ ses_cinder_pool_name | default('') }}"
cinder_ses_user_name: "{{ ses_cinder_user_name | default('') }}"
cinder_ses_ceph_conf_file_path: "{{ ses_conf_file_path | default('') }}"
cinder_ses_secret_uuid: "{{ ses_cinder_secret_uuid | default('') }}"
cinder_ses_flatten_volume_from_snapshot: False
# Cinder-Backup SES Integration
cinder_backup_ses_enabled: "{{ 'True' if ses_cinder_backup_user_name is defined else 'False' }}"
cinder_backup_ses_pool_name: "{{ ses_cinder_backup_pool_name | default('') }}"
cinder_backup_ses_user_name: "{{ ses_cinder_backup_user_name | default('') }}"
cinder_backup_ses_ceph_conf_file_path: "{{ ses_conf_file_path | default('') }}"
070701000000AF000041ED0000000000000000000000035F23024000000000000000000000000000000000000000000000003E00000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/files070701000000B0000041ED0000000000000000000000035F23024000000000000000000000000000000000000000000000004200000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/files/etc070701000000B1000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004C00000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/files/etc/sudoers.d070701000000B2000081A40000000000000000000000015F23024000000076000000000000000000000000000000000000005C00000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/files/etc/sudoers.d/cinder-rootwrapDefaults:cinder !requiretty
cinder ALL = (root) NOPASSWD: /usr/local/bin/cinder-rootwrap /etc/cinder/rootwrap.conf *
070701000000B3000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004000000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/library070701000000B4000081A40000000000000000000000015F23024000003969000000000000000000000000000000000000005800000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/library/get_enabled_backends.py#!/usr/bin/python
#
# (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
DOCUMENTATION = '''
---
module: get_enabled_backends
short_description: constructs a list of enabled backends.
description:
- The module accepts a cinder config structure and returns a string
comprising a list of enabled backends.
options:
cinder_config:
description:
- Cinder config data
required: true
default: null
author:
'''
EXAMPLES = '''
# Example from Ansible Playbooks.
- get_enabled_backends: cinder_config = '{{ config_data.CND | to_json }}'
# Returns string comprising a list of the enabled backends.
# NOTE: Please use single quotes for host info converted to JSON as
# double quotes will cause argument errors
'''
from ansible.module_utils.basic import * # NOQA
from subprocess import PIPE, Popen
class openssl:
# Lifted from ardanaencrypt.py
# For upgrade cases, need to support existing encrypted values which may
# have legacy prefix in-use.
prefix = '@ardana@'
legacy_prefix = '@hos@'
def __init__(self, key=None):
self._decrypt_key = key
def delegate(self, cmd, value):
argv = ('/usr/bin/openssl', 'aes-256-cbc', '-a', cmd,
'-pass', 'pass:%s' % self._decrypt_key)
p = Popen(argv, close_fds=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)
result = p.communicate(input=value)
if p.returncode != 0:
errmsg = result[1].strip()
if errmsg.startswith('bad decrypt'):
errmsg = 'incorrect encryption key'
elif (errmsg.startswith('error reading input file') or
errmsg.startswith('bad magic number')):
errmsg = 'bad input data'
raise OSError('openssl: %s' % errmsg)
return result[0].strip()
def decrypt(self, cooked):
if cooked.startswith(openssl.prefix):
cooked = cooked[len(openssl.prefix):]
elif cooked.startswith(openssl.legacy_prefix):
cooked = cooked[len(openssl.legacy_prefix):]
# openssl expects a newline at the end of the string.
if cooked[-1] != '\n':
cooked += '\n'
return self.delegate('-d', cooked)
def get_enabled_backends(cp_hosts, backends, fz_confs,
fz_hosts, cinder_config):
# Return a dictionary of lists, the keys in the dictionary are the
# controller host names, and the values are lists of backends that
# will be enabled for that host. The list can be empty.
enabled_backends = {h: [] for h in cp_hosts}
for be in backends:
host = select_controller(enabled_backends, fz_confs, fz_hosts,
be, cinder_config[be])
enabled_backends[host].append(be)
return enabled_backends
def select_controller(cp_hosts, fz_confs, fz_hosts, backend, config):
# Select the controller node to manage the backend.
candidate_fzs = None
if 'failure-zone' in config:
candidate_fzs = [fz for fz in fz_confs if backend in fz_confs[fz]]
# If it's not in any failure-zone, then choose from all the controllers
if candidate_fzs is None:
selected_host = cp_hosts.keys()[0]
for h in sorted(cp_hosts):
if len(cp_hosts[h]) < len(cp_hosts[selected_host]):
selected_host = h
return selected_host
# Now find the least used host in that list of AZs
selected_host = fz_hosts[candidate_fzs[0]][0]
for fz in sorted(candidate_fzs):
for h in sorted(fz_hosts[fz]):
if len(cp_hosts[h]) < len(cp_hosts[selected_host]):
selected_host = h
return selected_host
def get_failure_zone_lists(cinder_config, cp_hosts, groups):
# Returns two dictionaries fc_confs and fc_hosts, the keys are the failure
# zones that are referenced. The values in fz_confs are lists of the cinder
# configs that reference that failure-zone. The values in fc_hosts are lists
# of controller nodes that are in that failure-zone.
fz_confs = {}
for conf_name, conf in cinder_config.iteritems():
if 'failure-zone' in conf:
for fz in conf['failure-zone']:
if fz in fz_confs:
fz_confs[fz].append(conf_name)
else:
fz_confs[fz] = [conf_name]
# TODO Get the list of failure-zones required for each resource group
# referencing a cinder-config section. These will be added to the lists in
# fc_confs.
# Now get the list of nodes in each failure-zone
fz_hosts = {}
for fz in fz_confs:
if fz in groups:
fz_hosts[fz] = [h for h in cp_hosts if h in groups[fz]]
else:
fz_hosts[fz] = []
return fz_confs, fz_hosts
def validate_user_assignment(user_assigned_host, backend, enabled_backends):
# Returns True if the user assigned host and backend both exist in
# enabled_backends
if user_assigned_host in enabled_backends:
for key in enabled_backends.keys():
if backend in enabled_backends[key]:
return True
return False
def get_user_specified_assignment(enabled_backends, user_assignment):
for backend, user_assigned_host in user_assignment.iteritems():
if validate_user_assignment(user_assigned_host, backend, enabled_backends):
for host in enabled_backends.keys():
# If the user has associated a backend with a host then if needed
# make the same association in enabled_backends
if user_assigned_host == host:
if backend not in enabled_backends[host]:
enabled_backends[host].append(backend)
# If the backend association differs with whats in enabled_backends
# remove it from enabled_backends
else:
if backend in enabled_backends[host]:
enabled_backends[host].remove(backend)
return enabled_backends
def get_vsa_provided_data(section, service_data, provided_data, host_data):
"""Include VSA specific configuration logic
The VSA configuration requires a URL that is configured from the vip,
protocol and suffix provided by the service configuration.
We also set a default value for the VSA management username and the
VSA cluster name.
"""
if not 'backend-config' in section:
section['backend-config'] = {}
backend_configuration = section['backend-config']
backend_configuration['hpelefthand_api_url'] = (
'%s://%s:%s%s' % (service_data['protocol'],
provided_data['service_vip']['vip'],
service_data['port'],
service_data['url_suffix']))
backend_configuration['hpelefthand_clustername'] = (
'cluster-%s' % provided_data['cluster'])
backend_configuration['hpelefthand_username'] = (
'mg-%s' % provided_data['cluster'])
def get_ceph_provided_data(section, service_data, provided_data, host_data):
"""At this point there is no ceph specific configuration logic"""
pass
def get_cinder_config(section, service_data, provided_data):
if not 'backend-config' in section:
section['backend-config'] = {}
backend_configuration = section['backend-config']
for key in service_data['backend-config']:
backend_configuration[key] = service_data['backend-config'][key]
for key in provided_data:
if key == 'volume-types':
continue
backend_configuration[key] = provided_data[key]
known_services = {
'VSA-BLK': get_vsa_provided_data,
'CEP-BLK': get_ceph_provided_data,
}
def decrypt_value(key, value, decryptor):
"""Decrypt configuration values
Users can enter encrypted values for configuration variables like this:
backend-config:
unencrypted_variable: cleartext
encrypted_variable:
value: "ciphertext"
encrypted: true
If a variable has a dictionary as a value then this method will return the
cleartext value.
"""
if decryptor is None:
raise Exception("The configuration variable %s may be encrypted, but "
"ARDANA_USER_PASSWORD_ENCRYPT_KEY has not been set." %
key)
if not 'value' in value:
raise Exception("The dictionary for the variable %s must have the key"
" 'value': %s" % (key, value))
if not 'encrypted' in value:
raise Exception("The dictionary for the variable %s must have the key"
" 'encrypted': %s" % (key, value))
if value['encrypted'] is True:
return decryptor.decrypt(value['value'])
else:
return value['value']
def get_provided_data(host_data, cinder_config, cinder_data, decrypt_key):
"""Link the provided_by reference in cinder_config.yml to service data
The provided_by stanza for a backend in cinder_config.yml must provide a
key/value pair that exists in the provided_by section of the provided_data
section of the CND_VOL dictionary. This is generated from the service
config input model, eg vsa/vsa_config.yml.
This method takes the backend-config data from the service config model
and generates data used to generate the backend configuration in
cinder.conf.
"""
provided_data = None
if 'provided_data' in cinder_data:
provided_data = cinder_data['provided_data']
for section in cinder_config:
if 'provided_by' in cinder_config[section]:
provided_by = cinder_config[section]['provided_by']
provided_key = provided_by.keys()[0]
provided_value = provided_by[provided_key]
p_data = None
for pd in provided_data:
if pd['provided_by'][provided_key] == provided_value:
p_data = pd['provided_by']
service_data = pd['data']
if p_data['name'] in known_services:
known_services[p_data['name']](cinder_config[section],
service_data,
p_data,
host_data)
backend_data = {}
if 'config_data' in p_data and ('backend-config' in
p_data['config_data']):
backend_data = p_data['config_data']['backend-config']
get_cinder_config(cinder_config[section],
service_data,
backend_data)
if p_data is None:
raise Exception("No config data for provided_by %s: %s" %
(provided_key, provided_value))
# Check for encrypted config variables in this section.
decryptor = None
if decrypt_key and decrypt_key != "":
decryptor = openssl(decrypt_key)
cnf = cinder_config[section]['backend-config']
for v in cnf:
if isinstance(cnf[v], dict):
cnf[v] = decrypt_value(v, cnf[v], decryptor)
def main():
"""Generates cinder.conf from input model data
The parameters required are:
host_data: The data for the host being configured.
cinder_config_data: The input model data from cinder_config.yml
groups: The groups variable from the input model
vol_group_name: The string to use to find the group of cinder-volume
hosts in groups.
cinder_data: The data from the provided_by section of cinder
user_assignment_data: The list of backends that have been assigned to
a specific cinder-volume host.
"""
module = AnsibleModule(
argument_spec=dict(
host_data=dict(type='dict'),
cinder_config_data=dict(type='dict'),
groups=dict(type='dict'),
vol_group_name=dict(type='str'),
cinder_data=dict(type='dict'),
decryption_key=dict(type='str'),
user_assignment_data=dict(type='dict')
)
)
host_data = module.params['host_data']
cinder_config = module.params['cinder_config_data']
groups = module.params['groups']
cp_hosts = module.params['groups'][module.params['vol_group_name']]
cinder_data = module.params['cinder_data']
decrypt_key = module.params['decryption_key']
user_assignment = module.params['user_assignment_data']
if not cinder_config:
module.fail_json(rc=256, msg="No cinder config info specified")
get_provided_data(host_data['my_dimensions'],
cinder_config, cinder_data, decrypt_key)
# If we can assume that the lists presented to this method on every
# controller host will be in the same order, then the next two operations
# are not required
sorted_hosts = sorted(cp_hosts)
sorted_backends = sorted(cinder_config.keys())
fz_confs, fz_hosts = get_failure_zone_lists(cinder_config,
cp_hosts, groups)
enabled_backends = get_enabled_backends(sorted_hosts,
sorted_backends,
fz_confs,
fz_hosts,
cinder_config)
if user_assignment:
enabled_backends = get_user_specified_assignment(
enabled_backends, user_assignment)
backend_configs = []
for be in cinder_config:
section = {'name': be}
section['config'] = cinder_config[be]['backend-config']
backend_configs.append(section)
module.exit_json(
control_plane_hosts=cp_hosts,
cinder_enabled_backends=enabled_backends,
cinder_backend_configs=backend_configs,
stderr='',
rc=0,
changed=True
)
main()
070701000000B5000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003D00000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/meta070701000000B6000081A40000000000000000000000015F23024000000263000000000000000000000000000000000000004600000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/meta/main.yml# (c) Copyright 2018 SUSE LLC
#
# 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.
#
---
dependencies:
- role: tls-vars
070701000000B7000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000003E00000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks070701000000B8000081A40000000000000000000000015F230240000003A2000000000000000000000000000000000000004C00000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/_activate.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
# Activate Cinder Common Install
- name: _CND-CMN | _activate | Activate the latest install
install_package:
name: cinder
service: cinder-common
activate: act_on
version: "{{ cinder_common_install_result.version }}"
when: cinder_common_install_result is defined
070701000000B9000081A40000000000000000000000015F2302400000052C000000000000000000000000000000000000005900000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/_clear_cached_variable.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
# Mark the ardana_notify_cinder_restart_required variable for clearing from the
# persistent fact cache. This variable is needed in each of the individual
# services start tasks so we hold off on marking it for clearing until after
# these start tasks have run. The "is defined" check will mark the variable
# for clearing at the end of the play or else at the beginning of the next
# play.
- name: _CND-CMN | _clear_cached_variable | Mark ardana_notify_cinder_restart_required to be cleared from fact cache
debug:
msg: >-
Marking ardana_notify_cinder_restart_required to be cleared
from the fact cache
when: ardana_notify_cinder_restart_required is defined
070701000000BA000081A40000000000000000000000015F23024000000523000000000000000000000000000000000000005900000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/_determine_volume_host.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
# Read the cinder volume and backup service run location from the
# control plane fact file on localhost
- include: ./_read_volume_run_location.yml
- name: _CND-CMN | _determine_volume_host | Set _cinder_volume_running_here fact to True
set_fact:
_cinder_volume_running_here: True
when: ((config_data is not defined and
{{ cinder_volume_host_index }} == groups[verb_hosts.CND_VOL].index(inventory_hostname)) or
((config_data is defined and config_data.CND is not defined) and
{{ cinder_volume_host_index }} == groups[verb_hosts.CND_VOL].index(inventory_hostname)) or
(config_data is defined and config_data.CND is defined))
070701000000BB000081A40000000000000000000000015F2302400000066D000000000000000000000000000000000000005B00000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/_read_backend_assignment.yml#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
# If the storage input model is being used specify the assignment of backends
# to hosts in the /etc/ansible/facts.d/cinder_backend_assignment.fact file.
# The assignment should be specified in json format as follows:
#{
# "<BACKEND_NAME>": "<HOSTNAME>",
# "<BACKEND_NAME>": "<HOSTNAME>",
# "<BACKEND_NAME>": "<HOSTNAME>",
# "<BACKEND_NAME>": "<HOSTNAME>"
#}
#
---
# Read the user defined assignment of backends to hosts from the
# fact file on localhost if the file exists
- name: _CND-CMN | _read_backend_assignment | Check backend assignment fact file exists
become: yes
delegate_to: localhost
stat:
path: "{{ cinder_backend_assignment_file }}"
register: cinder_backend_assignment_file_result
- name: _CND-CMN | _read_backend_assignment | Read backend assignment fact file
become: yes
delegate_to: localhost
set_fact:
cinder_backend_assignment: "{{ lookup('file', cinder_backend_assignment_file) | from_json }}"
when: cinder_backend_assignment_file_result.stat.exists
070701000000BC000081A40000000000000000000000015F230240000004F9000000000000000000000000000000000000005C00000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/_read_volume_run_location.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
# Read the cinder volume and backup services run location from the
# control plane fact file on localhost if the file exists.
- name: _CND-CMN | _read_volume_run_location | Check run location fact file exists
become: yes
delegate_to: localhost
stat:
path: "{{ cinder_volume_run_loc_file }}"
register: cinder_volume_run_loc_file_result
- name: _CND-CMN | _read_volume_run_location | Read fact file and set cinder_volume_host_index
become: yes
delegate_to: localhost
set_fact:
cinder_volume_host_index: "{{ lookup('file', cinder_volume_run_loc_file) }}"
when: cinder_volume_run_loc_file_result.stat.exists
070701000000BD000081A40000000000000000000000015F2302400000030C000000000000000000000000000000000000005400000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/_schedule_restart.yml#
# (c) Copyright 2018 SUSE LLC
#
# 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.
#
---
- name: _CND-CMN | _schedule_restart | Schedule a restart for cinder
debug:
msg: "Trigger a change notification in cinder"
changed_when: true
register: ardana_notify_cinder_restart_required
070701000000BE000081A40000000000000000000000015F23024000001121000000000000000000000000000000000000005200000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/_service_status.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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: ./_determine_volume_host.yml
- name: _CND-CMN | _service_status | Print service being checked
debug:
msg: "Running service check for {{ cinder_component }}"
run_once: True
# no_log set to True to suppress redundant output from systemctl
# changed_when set to False so that ansible output reports a status
# of ok instead of changed when the service is running
- name: _CND-CMN | _service_status | Check system service running
command: systemctl status "{{ cinder_component }}"
ignore_errors: yes
no_log: True
changed_when: False
register: cinder_systemctl_status_result
# This task is only required to support the upgrade between previous versions
# It can be removed when upgrade between previous versions is no longer supported
- name: _CND-CMN | _service_status | Check if the cindervolume.fact file is present
stat: path=/etc/ansible/facts.d/cindervolume.fact
register: cinder_fact_result
# This task is only required to support the upgrade between previous versions
# It can be removed when upgrade between previous versions is no longer supported.
- name: _CND-CMN | _service_status | Re-read the local facts if the cindervolume.fact file exists
setup: filter=ansible_local
when: cinder_fact_result.stat.exists == True
- name: _CND-CMN | _service_status | Set status facts based on local facts in cindervolume.fact
set_fact:
cinder_api_sch_not_running_error: >-
{{ cinder_systemctl_status_result | failed and
cinder_component != "cinder-volume" and
cinder_component != "cinder-backup" }}
cinder_vol_bck_not_running_error: >-
{{ cinder_systemctl_status_result | failed and
(cinder_component == "cinder-volume" or
cinder_component == "cinder-backup") and
ansible_local.cindervolume.status.running == "True" }}
cinder_vol_bck_running_error: >-
{{ cinder_systemctl_status_result | success and
(cinder_component == "cinder-volume" or
cinder_component == "cinder-backup") and
ansible_local.cindervolume.status.running == "False" }}
when: cinder_fact_result.stat.exists == True
- name: _CND-CMN | _service_status | Set status facts
set_fact:
cinder_api_sch_not_running_error: >-
{{ cinder_systemctl_status_result | failed and
cinder_component != "cinder-volume" and
cinder_component != "cinder-backup" }}
cinder_vol_bck_not_running_error: >-
{{ cinder_systemctl_status_result | failed and
(cinder_component == "cinder-volume" or
cinder_component == "cinder-backup") and
(_cinder_volume_running_here | bool) }}
cinder_vol_bck_running_error: >-
{{ cinder_systemctl_status_result | success and
(cinder_component == "cinder-volume" or
cinder_component == "cinder-backup") and
(not _cinder_volume_running_here | bool) }}
when: cinder_fact_result.stat.exists == False
- name: _CND-CMN | _service_status | Report status of "{{ cinder_component }} unexpectedly not running"
fail:
msg: |
{{ cinder_component }} is not running.
systemctl status {{ cinder_component }} output:
{{ cinder_systemctl_status_result.stdout }}
{{ cinder_systemctl_status_result.stderr }}
when: >
(cinder_api_sch_not_running_error == "True") or
(cinder_vol_bck_not_running_error == "True")
- name: _CND-CMN | _service_status | Report status of "{{ cinder_component }} unexpectedly running"
fail:
msg: |
{{ cinder_component }} is running.
systemctl status {{ cinder_component }} output:
{{ cinder_systemctl_status_result.stdout }}
{{ cinder_systemctl_status_result.stderr }}
when: cinder_vol_bck_running_error == "True"
070701000000BF000081A40000000000000000000000015F2302400000053C000000000000000000000000000000000000004D00000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/api_status.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- name: _CND-CMN | api_status | Run verify V1
command: >
/usr/local/bin/cinder_check -a -v --api-version '1'
--auth_url "{{ cinder_keystone.identity_v2_admin_url }}"
--interface internalURL -p "{{ cinder_keystone.admin_password }}"
when: >
cinder_disable_v1_check is not defined or
cinder_disable_v1_check | bool != True
- name: _CND-CMN | api_status | Run verify V2
command: >
/usr/local/bin/cinder_check -a -v --api-version '2'
--auth_url "{{ cinder_keystone.identity_v2_admin_url }}"
--interface internalURL -p "{{ cinder_keystone.admin_password }}"
when: >
cinder_disable_v2_check is not defined or
cinder_disable_v2_check | bool != True
070701000000C0000081A40000000000000000000000015F2302400000045E000000000000000000000000000000000000005A00000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/check_migrate_hostindex.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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: ./_read_volume_run_location.yml
- name: _CND-CMN | check_migrate_hostindex | Check Host index
fail: msg="Specified host index value {{ cinder_volume_host_index }} is invalid"
when: ((config_data is not defined) or
(config_data is defined and config_data.CND is not defined)) and
(({{ cinder_volume_host_index }} < 0) or
({{ cinder_volume_host_index }} >= groups[verb_hosts.CND_VOL]|length))
run_once_per: verb_hosts.CND_VOL
070701000000C1000081A40000000000000000000000015F23024000000339000000000000000000000000000000000000005900000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/check_migrate_hostname.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- name: _CND-CMN | check_migrate_hostname | Check Hostname
fail: msg="Invalid hostname specified"
when: destination_host not in groups[verb_hosts.CND_VOL]
run_once: true
070701000000C2000081A40000000000000000000000015F23024000001589000000000000000000000000000000000000004C00000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/configure.yml#
# (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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: ./_read_backend_assignment.yml
- name: _CND-CMN | configure | Set max worker count to 8 if dynamic
CPU based count is greater than {{ osapi_volume_max_workers }}
set_fact:
osapi_volume_worker_count: "{{ osapi_volume_max_workers }}"
when: osapi_volume_worker_count > osapi_volume_max_workers
# Remove any vestiges of a potential package deploy
- name: _CND-CMN | configure | ensure Cinder sqlite (from package install) is deleted
become: yes
file:
path: /var/lib/cinder/cinder.sqlite
state: absent
- name: _CND-CMN | configure | ensure logging.conf (from package install) is deleted
become: yes
file:
path: "{{ cinder_dir }}/logging.conf"
state: absent
- name: _CND-CMN | configure | ensure logrotate.d/cinder-common (from package install) is deleted
become: yes
file:
path: /etc/logrotate.d/cinder-common
state: absent
# TODO: remove after 4.0
- name: _CND-CMN | configure | delete unused {{ installation_directory }}/cinder
become: yes
file:
path: "{{ installation_directory }}/cinder"
state: absent
- name: _CND-CMN | configure | Create '{{ cinder_conf_dir }}' directory
become: yes
file:
path: "{{ cinder_conf_dir }}"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0700
state: directory
- name: _CND-CMN | configure | Create logging directory
become: yes
file:
path: "{{ cinder_logs_dir }}"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0775
state: directory
- name: _CND-CMN | configure | Create rootwrap.d directory
become: yes
file:
path: "{{ cinder_rootwrap_dir }}"
owner: "root"
group: "root"
mode: 0755
state: directory
- name: _CND-CMN | configure | Set ownership of /var/lib/cinder
become: yes
file:
path: "{{ cinder_state_path }}"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0750
state: directory
- name: _CND-CMN | configure | Create /etc/ansible/facts.d/ on localhost
become: yes
delegate_to: localhost
run_once: true
file:
path: "{{ cinder_facts_dir }}"
state: directory
mode: 0755
- name: _CND-CMN | configure | Check for presence of group '{{ mon_agent_group }}'
command: "grep -q {{ mon_agent_group }} /etc/group"
ignore_errors: True
register: cinder_mon_group_chk_result
- name: _CND-CMN | configure | Define '{{ mon_agent_group }}' as {{ cinder_group }}
set_fact:
mon_agent_group={{ cinder_group }}
when: cinder_mon_group_chk_result|failed
- name: _CND-CMN | configure | Create cinderlm config directory
become: yes
file:
path: "{{ cinderlm_conf_dir }}"
owner: "{{ cinder_user }}"
group: "{{ mon_agent_group }}"
mode: 0750
state: directory
- name: _CND-CMN | configure | Set cinder_user_backend_assignment
set_fact:
cinder_user_backend_assignment: >-
{{ cinder_backend_assignment|default('{}') }}
- name: _CND_CMN | configure | Generate the list of enabled backends.
get_enabled_backends:
host_data: "{{ host }}"
cinder_config_data: "{{ config_data.CND }}"
groups: "{{ groups }}"
vol_group_name: "{{ cinder_service_group_name }}"
cinder_data: "{{ cinder_service_data }}"
decryption_key: "{{ lookup('env','ARDANA_USER_PASSWORD_ENCRYPT_KEY') }}"
user_assignment_data: "{{ cinder_user_backend_assignment }}"
when: (config_data is defined and config_data.CND is defined)
register: my_enabled_backends
- name: _CND-CMN | configure | Generate '{{ cinder_conf_dir }}'/cinder.conf
become: yes
template:
src: "{{ cinder_conf_template | default('cinder.conf.j2') }}"
dest: "{{ cinder_conf_dir }}/cinder.conf"
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0400
register: ardana_notify_cinder_restart_required
- name: _CND-CMN | configure | Generate Cinder rootwrap config file
become: yes
template:
src: "rootwrap.conf.j2"
dest: "{{ cinder_dir }}/rootwrap.conf"
owner: root
group: root
mode: 0440
register: ardana_notify_cinder_restart_required
- name: _CND-CMN | configure | Copy /etc/cinder/cinderlm.conf
become: yes
template:
src: cinderlm.conf.j2
dest: "{{ cinderlm_conf_dir }}/cinderlm.conf"
owner: "{{ cinder_user }}"
group: "{{ mon_agent_group }}"
mode: 0440
- name: _CND-CMN | configure | Create symlinks to Cinder binaries
become: yes
file:
src: "{{ cinder_common_bin_dir }}/{{ item }}"
dest: "/usr/local/bin/{{ item }}"
owner: root
group: root
state: link
with_items:
- cinder-rootwrap
- cinder-manage
- name: _CND-CMN | configure | Setup cinder user to allow sudo to run cinder-rootwrap without password
become: yes
copy:
src: etc/sudoers.d/cinder-rootwrap
dest: /etc/sudoers.d/cinder-rootwrap
owner: root
group: root
mode: 0440
validate: 'visudo -cf %s'
070701000000C3000081A40000000000000000000000015F230240000008D4000000000000000000000000000000000000004A00000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/install.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
- name: _CND-CMN | install | Check for presence of group '{{ cinder_group }}'
command: "grep -q {{ cinder_group }} /etc/group"
ignore_errors: True
register: cinder_group_chk_result
- name: _CND-CMN | install | Add group '{{ cinder_group }}'
group: name={{ cinder_group }}
when: cinder_group_chk_result|failed
- name: _CND-CMN | install | Check for presence of user '{{ cinder_user }}'
command: "id {{ cinder_user }}"
ignore_errors: True
register: cinder_user_chk_result
- name: _CND-CMN | install | Add user '{{ cinder_user }}'
user:
name: "{{ cinder_user }}"
group: "{{ cinder_group }}"
createhome: no
home: "{{ cinder_home_dir }}"
shell: /bin/true
when: cinder_user_chk_result|failed
- name: _CND-CMN | install | Add user home
become: yes
file:
path: "{{ cinder_home_dir }}"
state: directory
owner: "{{ cinder_user }}"
group: "{{ cinder_group }}"
mode: 0750
when: cinder_user_chk_result|failed
- name: _CND-CMN | install | Update venv cache
install_package:
cache: update
# no real service here, just apply the venv
- name: _CND-CMN | install | Install Cinder Common
install_package:
name: cinder
service: cinder-common
state: present
activate: act_off
register: cinder_common_install_result
- name: _CND-CMN | install | Set service directories
set_fact:
cinder_common_bin_dir: >-
{{ 'cinder-common' |
bin_dir(cinder_common_install_result.version) }}
cinder_common_venv_share_dir: >-
{{ 'cinder-common' |
share_dir(cinder_common_install_result.version) }}/cinder
070701000000C4000081A40000000000000000000000015F23024000000382000000000000000000000000000000000000005600000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/logrotate-configure.yml#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- name: _CND-CMN | logrotate-configure | Create logrotate.d/cinder when logging roles are not applied to nodes
become: yes
template:
src: cinder-logrotate.conf
dest: /etc/logrotate.d/cinder
owner: root
group: root
mode: 0644
070701000000C5000081A40000000000000000000000015F23024000000989000000000000000000000000000000000000005700000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/migrate_confirmation.yml#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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: ./_read_volume_run_location.yml
- include: ./_read_backend_assignment.yml
- name: _CND-CMN | migrate_confirmation | Build user backend assignment text
set_fact: formatted_output="{{ cinder_backend_assignment | to_nice_json }}"
when: >
(config_data is defined and
config_data.CND is defined and
cinder_backend_assignment is defined)
- name: _CND-CMN | migrate_confirmation | Confirm hostname for migrate
pause:
prompt: >-
Cinder volume and backup services will be migrated to the
{{ groups[verb_hosts.CND_VOL][cinder_volume_host_index|int] }} host.
Press enter to continue or control+c then a to abort
when: >
(config_data is not defined) or
(config_data is defined and config_data.CND is not defined)
delegate_to: localhost
- name: _CND-CMN | migrate_confirmation | Confirm user defined input model migration selection
pause:
prompt: >-
Cinder volume and backup services running on hosts matching the supplied
limit pattern will be migrated as follows
{{ formatted_output }}
Press enter to continue or control+c then a to abort
when: >
(config_data is defined and
config_data.CND is defined and
cinder_backend_assignment is defined)
delegate_to: localhost
- name: _CND-CMN | migrate_confirmation | Confirm default input model migration selection
pause:
prompt: >-
Cinder volume and backup services running on hosts matching the supplied
limit pattern will be migrated based on the configuration specified in cinder_config.yml.
Press enter to continue or control+c then a to abort
when: >
(config_data is defined and
config_data.CND is defined and
cinder_backend_assignment is not defined)
delegate_to: localhost
070701000000C6000081A40000000000000000000000015F2302400000036A000000000000000000000000000000000000005400000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/tasks/show_volume_hosts.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
- name: _CND-CMN | show_volume_hosts | Show Cinder Volume hosts index and hostname
debug: msg="Index {{ item.0 }} Hostname {{ item.1 }}"
with_indexed_items: "{{ groups[verb_hosts.CND_VOL] }}"
run_once_per: verb_hosts.CND_VOL
070701000000C7000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004200000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/templates070701000000C8000081A40000000000000000000000015F230240000008E3000000000000000000000000000000000000005900000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/templates/cinder-logging.conf.j2{#
#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
#}
[loggers]
keys: root, iso8601, suds{% block extend_loggers %}{% endblock extend_loggers %}
[handlers]
keys: watchedfile, logstash{% block extend_handlers %}{% endblock extend_handlers %}
[formatters]
keys: context, logstash{% block extend_formatters %}{% endblock extend_formatters %}
[logger_root]
qualname: root
handlers: watchedfile, logstash
level: NOTSET
[logger_iso8601]
qualname: iso8601
handlers: watchedfile, logstash
level: WARNING
[logger_suds]
qualname: suds
handlers: watchedfile, logstash
level: WARNING
{% block audit_logger %}
{% endblock audit_logger %}
# Writes to disk
[handler_watchedfile]
class: handlers.WatchedFileHandler
args: ('/var/log/cinder/{% block logfilename %}CHANGEME{% endblock logfilename %}.log',)
formatter: context
level: {{ cinder_loglevel }}
# Writes JSON to disk, beaver will ship to logstash
[handler_logstash]
class: handlers.WatchedFileHandler
args: ('/var/log/cinder/{% block jsonlogfilename %}CHANGEME{% endblock jsonlogfilename %}.log',)
formatter: logstash
level: {{ cinder_logstash_loglevel }}
{% block audit_handler %}
{% endblock audit_handler %}
# datefmt must be set otherwise you end up with too many (msecs) fields
[formatter_context]
class: {{ cinder_logging_context_formatter }}
args: (datefmt=datefmt)
format: %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user)s %(tenant)s] %(instance)s%(message)s
datefmt: %Y-%m-%d %H:%M:%S
# the "format" and "datefmt" actually set the "type" and "tags"
[formatter_logstash]
class: logstash.LogstashFormatterVersion1
format: cinder
{% block audit_formatter %}
{% endblock audit_formatter %}
070701000000C9000081A40000000000000000000000015F230240000005B2000000000000000000000000000000000000005800000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/templates/cinder-logrotate.conf#
# (c) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
#
/var/log/cinder/cinder-api.log
{
daily
compress
missingok
notifempty
copytruncate
maxsize 256M
rotate 14
create 640 cinder adm
su cinder adm
}
/var/log/cinder/cinder-api-json.log
{
daily
compress
missingok
notifempty
copytruncate
maxsize 256M
rotate 1
create 640 cinder adm
su cinder adm
}
/var/log/cinder/cinder-backup.log
/var/log/cinder/cinder-volume.log
/var/log/cinder/cinder-scheduler.log
{
daily
compress
missingok
notifempty
copytruncate
maxsize 80M
rotate 14
create 640 cinder adm
su cinder adm
}
/var/log/cinder/cinder-backup-json.log
/var/log/cinder/cinder-volume-json.log
/var/log/cinder/cinder-scheduler-json.log
{
daily
compress
missingok
notifempty
copytruncate
maxsize 80M
rotate 1
create 640 cinder adm
su cinder adm
}
070701000000CA000081A40000000000000000000000015F230240000037DA000000000000000000000000000000000000005100000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/templates/cinder.conf.j2{#
#
# (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
#}
[DEFAULT]
# Print debugging output (set logging level to DEBUG instead
# of default WARNING level). (boolean value)
debug={{ cinder_debug }}
enable_v3_api=True
osapi_volume_workers = "{{ osapi_volume_worker_count }}"
osapi_volume_listen = {{ cinder_osapi_volume_listen }}
osapi_volume_listen_port = {{ cinder_osapi_volume_listen_port }}
transport_url = rabbit://{{ cinder_rabbit_hosts_transport_url }}/
{% if cinder_glance_url is defined %}
glance_api_servers = {{ cinder_glance_url }}
{% endif %}
{% if cinder_backup_swift_url is defined and cinder_backup_swift_url %}
backup_swift_url = {{ cinder_backup_swift_url }}
swift_catalog_info = object-store:swift:internalURL
{% endif %}
{% if cinder_volume_nova_url is defined %}
nova_endpoint_template = {{ cinder_volume_nova_url }}/%(project_id)s
nova_endpoint_admin_template = {{ cinder_volume_nova_url }}/%(project_id)s
os_region_name = {{ cinder_keystone.region_name }}
nova_catalog_info = compute:nova:internalURL
nova_catalog_admin_info = compute:nova:adminURL
{% endif %}
{% block api_paste_config %}
# Versioned api-paste.ini specified where appropriate.
#api_paste_config = /etc/cinder/api-paste.ini
{% endblock api_paste_config %}
auth_strategy = keystone
state_path = {{ cinder_state_path }}
{% if cinder_image_conversion_dir is defined %}
image_conversion_dir={{ cinder_image_conversion_dir }}
{% endif %}
iscsi_helper={{ cinder_iscsi_helper }}
{% if cinder_public_endpoint is defined %}
# Uncomment to set the public API in the links responses
#public_endpoint = {{ cinder_public_endpoint }}
#osapi_volume_base_URL = {{ cinder_public_endpoint }}
{% endif %}
# behind haproxy record the X-Forward-For source in the logfile
use_forwarded_for = True
control_exchange = {{ cinder_control_exchange }}
rpc_response_timeout = 120
# Common hostname to avoid singleton limitation of Cinder volume manager
host = ha-volume-manager
{% if ((cinderinternal_project_id is defined) and (cinderinternal_user_id is defined)) %}
# Cinder internal project id and user id for volume image cache
cinder_internal_tenant_project_id = {{ cinderinternal_project_id }}
cinder_internal_tenant_user_id = {{ cinderinternal_user_id }}
# To enable volume image caching the image_volume_cache_enabled flag needs to
# be set to True in the relevant backend section in cinder.conf
{% endif %}
{% if my_enabled_backends.cinder_enabled_backends is not defined %}
# Configure the enabled backends
enabled_backends=
{%- if cinder_lvm_device_group %},lvm-1{% endif %}
{%- if cinder_ses_enabled|bool %},ses_ceph{% endif %}
{% endif %}
# Configure the enabled backends, above left for convenience, until upgrade
# process is finalised.
{% if my_enabled_backends.cinder_enabled_backends is defined %}
enabled_backends={{ my_enabled_backends.cinder_enabled_backends[inventory_hostname]|join(", ") }}
{% for be in my_enabled_backends.cinder_backend_configs %}
[{{ be['name'] }}]
{% for conf in be['config'] %}
{{ conf }}={{ be['config'][conf] }}
{% endfor %}
{% endfor %}
{% endif %}
# Configure Cinder backup with SES
{% if cinder_backup_ses_enabled|bool %}
backup_driver = cinder.backup.drivers.ceph
backup_ceph_conf = {{ cinder_backup_ses_ceph_conf_file_path }}
backup_ceph_user = {{ cinder_backup_ses_user_name }}
backup_ceph_pool = {{ cinder_backup_ses_pool_name }}
{% endif %}
{% if cinder_keymgr_fixed_key is defined %}
[keymgr]
fixed_key = {{ cinder_keymgr_fixed_key }}
{% elif cinder_keymgr_url is defined and cinder_keymgr_url != "" %}
[key_manager]
api_class = castellan.key_manager.barbican_key_manager.BarbicanKeyManager
[barbican]
auth_endpoint = {{ cinder_keystone.internal_url }}/v3
barbican_endpoint = {{ cinder_keymgr_url }}
barbican_api_version = v1
{% endif %}
[keystone_authtoken]
auth_uri = {{ cinder_keystone.identity_admin_url }}
auth_url = {{ cinder_keystone.internal_url }}
auth_type = password
project_domain_name = {{ cinder_keystone.default_domain_name }}
user_domain_name = {{ cinder_keystone.default_domain_name }}
project_name = {{ cinder_keystone.admin_tenant_name }}
username = {{ cinder_identity_admin_user }}
password = {{ cinder_identity_admin_password }}
cafile = {{ cinder_keystone.cacert_file }}
service_token_roles_required = true
service_token_roles = admin
memcached_servers = {{ cinder_keystone.memcached_servers }}
memcache_security_strategy = ENCRYPT
memcache_secret_key = {{ cinder_keystone.memcache_secret_key }}
memcache_pool_socket_timeout = 1
[database]
connection={{ cinder_db }}
max_overflow={{ cinder_max_overflow }}
max_pool_size={{ cinder_max_pool_size }}
min_pool_size={{ cinder_min_pool_size }}
[oslo_messaging_notifications]
driver = {{ cinder_notification_driver }}
[oslo_messaging_rabbit]
rabbit_ha_queues=False
ssl = {{ cinder_rabbit_use_ssl }}
[oslo_middleware]
enable_proxy_headers_parsing = true
[oslo_concurrency]
lock_path = /var/lib/cinder
{% block audit_middleware %}{% endblock audit_middleware %}
{% if cinder_lvm_device_group %}
# LVM thin provision. This way we don't dd the disk
[lvm-1]
volume-group = cinder-volumes
lvm_type = thin
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_backend_name = LVM_iSCSI
iscsi_ip_address = {{ cinder_osapi_volume_listen }}
{% endif %}
# Cinder SES integration
# FIXME(gyee): according to documentation, cinder can support multiple Ceph
# storeage pools. We may need to take that into design consideration.
# For now, let's just assume we have one.
{% if cinder_ses_enabled|bool %}
[ses_ceph]
volume_driver = cinder.volume.drivers.rbd.RBDDriver
rbd_secret_uuid = {{ cinder_ses_secret_uuid }}
rbd_user = {{ cinder_ses_user_name }}
rbd_pool = {{ cinder_ses_pool_name }}
rbd_ceph_conf = {{ cinder_ses_ceph_conf_file_path }}
rbd_flatten_volume_from_snapshot = {{ cinder_ses_flatten_volume_from_snapshot }}
volume_backend_name = ses_ceph
{% endif %}
# Start of section for StoreServ (3par) iscsi cluster
#
# If you have configured StoreServ backend storage for cinder you must
# uncomment this section, and replace all strings in angle brackets
# with the correct values for the HP 3PAR you have configured. You
# must also add the section name to the list of values in the
# 'enabled_backends' variable above. You must provide unique section
# each time you configure a new backend for HP 3PAR.
#
# If you want to configure more than one CPG then you can do one of the
# following:
# 1) Create an unique section for each backend, or
# 2) Provide a comma separated list of CPGs for hpe3par_cpg
#
# In the second case, this set of CPGs will form a pool but will be seen as a
# single device by Cinder.
#
#[<unique-section-name>]
#hpe3par_iscsi_chap_enabled = true
#san_ip = <3par-san-ipaddr>
#san_login = <3par-san-username>
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
# san_password = {{ '<encrypted 3par-san-password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
# san_password = <3par-san-password>
#hpe3par_iscsi_ips = <3par-ip-address-1>[,<3par-ip-address-2>,<3par-ip-address-3>, ...]
#hpe3par_username = <3par-username>
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
#hpe3par_password = {{ '<encrypted hpe3par_password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
#hpe3par_password = <hep3par_password>
#hpe3par_api_url = https://<3par-san-ipaddr>:8080/api/v1
#hpe3par_cpg = <3par-cpg-name-1>[,<3par-cpg-name-2>, ...]
#volume_backend_name = <3par-backend-name>
#volume_driver = cinder.volume.drivers.hpe.hpe_3par_iscsi.HPE3PARISCSIDriver
#
# End of section for StoreServ (3par) iscsi cluster
# Start of section to enable a CPG as a backend for StoreServ (3par)
# using a fibre channel device
#
# If you have configured StoreServ backend storage for cinder you must
# uncomment this section, and replace all strings in angle brackets
# with the correct values for the cluster you have configured. You
# must also add the section name to the list of values in the
# 'enabled_backends' variable above.
#
# If you want to configure more than one CPG then you can do one of the
# following:
# 1) Create an unique section for each backend, or
# 2) Provide a comma separated list of CPGs for hpe3par_cpg
#
# In second case, these sets of CPGs will form a pool but will seen as a
# single device by Cinder.
#
#
#[<unique-section-name>]
#san_ip = <3par-san-ipaddr>
#san_login = <3par-san-username>
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
#san_password = {{ '<encrypted 3par-san-password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
#san_password = <3par-san-password>
#hpe3par_username = <3par-username>
# If adding a password here, then the password can be encrypted using the
# mechanism specified in the documentation. If the password has been encrypted
# add the value and the openstack_user_password_decrypt filter like so:
#hpe3par_password = {{ '<encrypted 3par-password>' | openstack_user_password_decrypt }}
# Note that the encrypted value has to be enclosed in quotes
# If you choose not to encrypt the password then the unencrypted password
# must be set as follows:
#hpe3par_password = <3par-password>
#hpe3par_api_url = https://<3par-san-ipaddr>:8080/api/v1
#hpe3par_cpg = <3par-cpg-name-1>[,<3par-cpg-name-2>,...]
#volume_backend_name = <3par-backend-name>
#volume_driver = cinder.volume.drivers.hpe.hpe_3par_fc.HPE3PARFCDriver
#
# End of section for StoreServ (3par) fibre channel cluster
# Start of section for ceph
#
# If you have configured ceph backend storage for cinder you
# must uncomment this section, and replace all strings in angle
# brackets with the correct values for the ceph you have
# configured. You must also add the section name to the list of
# values in the 'enabled_backends' variable above.
#
# If you have more than one ceph backend you must provide this
# whole section for each ceph backend and provide a unique section name for
# each. For example, replace <unique-section-name> with CEPH_1 for
# one backend and CEPH_2 for the other.
#
#[<unique-section-name>]
#rbd_secret_uuid = <secret-uuid>
#rbd_user = <ceph-cinder-user>
#rbd_pool = <ceph-cinder-volume-pool>
#rbd_ceph_conf = <ceph-config-file>
#volume_driver = cinder.volume.drivers.rbd.RBDDriver
#volume_backend_name = <ceph-backend-name>
#
# End of section for ceph
# Start of section for vmdk
#
# If you have configured vmdk storage for cinder you
# must uncomment this section, and replace all strings in angle
# brackets with the correct values for the cluster you have
# configured. You must also add the section name to the list of
# values in the 'enabled_backends' variable above.
#
# If you have more than one vmdk backend you must provide this
# whole section for each vmdk backend and provide a unique section name for
# each. For example, replace <unique-section-name> with
# VMDK_1 for one backend and VMDK_2 for the other.
#
#[<unique-section-name>]
#vmware_host_ip = <vmware-host-ip>
#vmware_host_password = <vmware-host-password>
#vmware_host_username = <vmware-host-username>
#vmware_insecure = True
#volume_driver = cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver
#volume_backend_name=<vmdk-backend-name>
#
# End of section for vmdk
# Start of section for Broccade Fiber channel Zone Manager
#
# If you have configured Fibre Channel Volume Driver that supports Zone Manager for cinder you
# must uncomment this section, and replace all strings in angle
# brackets with the correct values you have configured.
# In the below configuration fc_fabric_names can be mutilple names,
# you have to define seperate section for each name with appropriate switch details
#[DEFAULT]
#zoning_mode=fabric
#[fc-zone-manager]
#brcd_sb_connector = cinder.zonemanager.drivers.brocade.brcd_fc_zone_client_cli.BrcdFCZoneClientCLI
#fc_san_lookup_service = cinder.zonemanager.drivers.brocade.brcd_fc_san_lookup_service.BrcdFCSanLookupService
#zone_driver = cinder.zonemanager.drivers.brocade.brcd_fc_zone_driver.BrcdFCZoneDriver
#fc_fabric_names = <unique-fabric-name>
#[<unique-fabric-name>]
#fc_fabric_address = <switch-ip-address>
#fc_fabric_user = <switch-user-name>
#fc_fabric_password = <switch-password>
#principal_switch_wwn = <switch-wwn>
#zoning_policy = initiator-target
#zone_activate = true
#zone_name_prefix = <zone-name-prefix>
# End of section for Broccade Fiber channel Zone Manager
# Start of section for ceph backup
#
# If you have configured ceph backup storage for cinder you
# must uncomment this section, and replace all strings in angle
# brackets with the correct values for the ceph you have
# configured.
#
#[DEFAULT]
#backup_driver = cinder.backup.drivers.ceph
#backup_ceph_conf = <ceph-config-file>
#backup_ceph_user = <ceph-backup-user>
#backup_ceph_pool = <ceph-backup-pool>
#
# End of section for ceph backup
070701000000CB000081A40000000000000000000000015F23024000000407000000000000000000000000000000000000005300000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/templates/cinderlm.conf.j2{#
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
#}
[DEFAULT]
cinderlm_user = {{ cinderinternal_user }}
cinderlm_password = {{ cinderinternal_password }}
cinderlm_project_name = {{ cinderinternal_project_name }}
# TODO: WIP - move on to v3.0 authentication
cinderlm_auth_url = {{ cinder_keystone.identity_admin_url }}/v2.0
cinderlm_capacity_check = {{ cinderlm_capacity_check }}
cinderlm_ca_cert_file = {{ cinder_keystone.cacert_file }}
070701000000CC000081A40000000000000000000000015F23024000000729000000000000000000000000000000000000005300000000ardana-cinder-8.0+git.1596129856.263f430/roles/_CND-CMN/templates/rootwrap.conf.j2{#
#
# (c) Copyright 2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
#}
# Configuration for cinder-rootwrap
# This file should be owned by (and only-writeable by) the root user
[DEFAULT]
# List of directories to load filter definitions from (separated by ',').
# These directories MUST all be only writeable by root !
filters_path={%- if deployer_media_legacy_layout|bool %}
/etc/cinder/rootwrap.d
{%- else -%}
/etc/cinder/rootwrap.d,{{ 'cinder-common' | venv_dir }}/etc/cinder/rootwrap.d/
{%- endif %}
# List of directories to search executables in, in case filters do not
# explicitely specify a full path (separated by ',')
# If not specified, defaults to system PATH environment variable.
# These directories MUST all be only writeable by root !
exec_dirs={{ cinder_common_bin_dir }},/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin
# Enable logging to syslog
# Default value is False
use_syslog=False
# Which syslog facility to use.
# Valid values include auth, authpriv, syslog, local0, local1...
# Default value is 'syslog'
syslog_log_facility=syslog
# Which messages to log.
# INFO means log all usage
# ERROR means only log unsuccessful attempts
syslog_log_level=ERROR
070701000000CD000041ED0000000000000000000000075F23024000000000000000000000000000000000000000000000003E00000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor070701000000CE000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004700000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/defaults070701000000CF000081A40000000000000000000000015F2302400000043C000000000000000000000000000000000000005000000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/defaults/main.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
process_count_running_lower_bound: 1
process_count_notrunning_upper_bound: 0
monasca_alarm_definition_api_url: >
{{ MON_AGN.consumes_MON_API.vips.private[0].url ~ '/v2.0' }}
cinder_monitor_json_dir: /var/cache/cinderlm
bin_path: "{% if deployer_media_legacy_layout|bool -%}
/usr/local/bin
{%- else -%}
/usr/bin
{%- endif -%}"
070701000000D0000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004300000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/meta070701000000D1000081A40000000000000000000000015F230240000002B6000000000000000000000000000000000000004C00000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/meta/main.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
dependencies:
- role: _CND-CMN
- role: CND-API
070701000000D2000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004400000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/tasks070701000000D3000081A40000000000000000000000015F230240000003C2000000000000000000000000000000000000005000000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/tasks/install.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
- name: cinder-monitor | install | install cinderlm (legacy)
include: install_legacy.yml
when: deployer_media_legacy_layout|bool
- name: cinder-monitor | install | install cinderlm (rpm)
package:
name: python-cinderlm
state: present
become: yes
when: deployer_media_legacy_layout|bool == False
070701000000D4000081A40000000000000000000000015F23024000000599000000000000000000000000000000000000005700000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/tasks/install_legacy.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
# This can be activated immediately as there are no running daemons
- name: cinder-monitor | install | Install cinderlm venv
install_package:
name: cinderlm
service: cinderlm
state: present
activate: act_on
register: cinderlm_install_result
- name: cinder-monitor | install | Create symlink to cinder_check
file:
src: >
{{ 'cinderlm' |
bin_dir(cinderlm_install_result.version) }}/cinder_check
dest: "/usr/local/bin/cinder_check"
owner: root
group: root
state: link
- name: cinder-monitor | install | Create symlink to cinder_diag
file:
src: >
{{ 'cinderlm' |
bin_dir(cinderlm_install_result.version) }}/cinder_diag
dest: "/usr/local/bin/cinder_diag"
owner: root
group: root
state: link
070701000000D5000081A40000000000000000000000015F23024000000A24000000000000000000000000000000000000005700000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/tasks/monasca_agents.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
# NOTE: Use Cinder API V2 specific URL to avoid potential upgrade issues
- name: cinder-monitor | monasca_agents | Determine appropriate service_api_url value
set_fact:
_cinder_api_url: >-
http://{{ host.bind.CND_API.
internal.ip_address }}:{{ host.bind.CND_API.
internal.port }}/
when: cinder_agent is defined and cinder_agent == "True"
# The name value here is the name of Plugin class in the
# detect modules, not the name of the module.
# TODO: address cinder-volume and cinder-back singularity in
# the built-in process checks
- name: cinder-monitor | monasca_agents | Run Monasca agent cinder detection plugin
monasca_agent_plugin:
name: "cinder"
args: >-
service_api_url={{ _cinder_api_url }}
search_pattern=.*versions.*CURRENT.*
when: cinder_agent is defined and cinder_agent == "True"
- name: cinder-monitor | monasca_agents | Set up output directory for cron job
file:
name: "{{ cinder_monitor_json_dir }}"
mode: 02750
owner: root
group: monasca
state: directory
# Cinder related monitoring should only performed on cinder nodes,
# not on VSA or Ceph nodes.
- name: cinder-monitor | monasca_agents | Set up cinder specific monasca cron jobs
template:
src: cinder-monitor-cron.j2
dest: /etc/cron.d/cinder-monitor-cron
owner: root
group: root
mode: 0644
when: cinder_agent is defined and cinder_agent == "True"
# ssacli diag needs root privileges
- name: cinder-monitor | monasca_agents | set up block dev monitor cron job
template:
src: block-monitor-periodic-cron.j2
dest: /etc/cron.d/block-monitor-periodic-cron
owner: root
group: root
mode: 0644
- name: cinder-monitor | monasca_agents | Run cinderlm custom detection plugin
monasca_agent_plugin:
name: "CinderLMDetect"
# args should be a space separated list, if specified
ignore_errors: yes
070701000000D6000081A40000000000000000000000015F230240000019DF000000000000000000000000000000000000005700000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/tasks/monasca_alarms.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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:
../../_CND-CMN/tasks/_determine_volume_host.yml
- name: cinder-monitor | monasca_alarms | Set cinder monitor not running here condition
set_fact:
_cinder_monitor_cond: " > {{ process_count_notrunning_upper_bound }}"
when: not _cinder_volume_running_here | bool
- name: cinder-monitor | monasca_alarms | Set cinder monitor running here condition
set_fact:
_cinder_monitor_cond: " < {{ process_count_running_lower_bound }}"
when: _cinder_volume_running_here | bool
- name: cinder-monitor | monasca_alarms | Set cinder monitor facts
set_fact: "{{ item.name }}='{{ item.pfx }}{{ item.daemon }}{{ item.sfx }}'"
with_items:
- daemon: "cinder-volume"
name: "cinder_volume_running_check"
pfx: "cinderlm.cinder.cinder_services{component="
sfx: ",hostname={{ host.my_dimensions.hostname }}}{{ _cinder_monitor_cond }}"
- daemon: "cinder-backup"
name: "cinder_backup_running_check"
pfx: "cinderlm.cinder.cinder_services{component="
sfx: ",hostname={{ host.my_dimensions.hostname }}}{{ _cinder_monitor_cond }}"
- name: cinder-monitor | monasca_alarms | Setup default email notification method
monasca_notification_method:
name: "Default Email"
type: 'EMAIL'
address: "root@localhost"
keystone_url: "{{ cinder_keystone.admin_url }}"
keystone_user: "{{ cinder_keystone.admin_user }}"
keystone_password: "{{ cinder_keystone.admin_password }}"
keystone_project: "{{ cinder_keystone.monasca_tenant }}"
keystone_project_domain: "{{ cinder_keystone.default_domain_name }}"
keystone_user_domain: "{{ cinder_keystone.default_domain_name }}"
keystone_verify: "{{ trusted_ca_bundle }}"
monasca_api_url: "{{ monasca_alarm_definition_api_url }}"
overwrite: false
register: cinder_default_notification_result
run_once: true
- name: cinder-monitor | monasca_alarms | Backup/Volume running alarm definition
monasca_alarm_definition:
name: "Cinder {{ item.name }} running {{ host.my_dimensions.hostname }} check"
description: >
Alarms if the cinder {{ item.name }} service is not
appropriately set up.
severity: "HIGH"
expression: "{{ item.expression }}"
match_by: ["hostname"]
keystone_url: "{{ cinder_keystone.admin_url }}"
keystone_user: "{{ cinder_keystone.admin_user }}"
keystone_password: "{{ cinder_keystone.admin_password }}"
keystone_project: "{{ cinder_keystone.monasca_tenant }}"
keystone_project_domain: "{{ cinder_keystone.default_domain_name }}"
keystone_user_domain: "{{ cinder_keystone.default_domain_name }}"
keystone_verify: "{{ trusted_ca_bundle }}"
monasca_api_url: "{{ monasca_alarm_definition_api_url }}"
state: "{{ cinder_volume_monitor_state }}"
ok_actions:
- "{{ cinder_default_notification_result.notification_method_id }}"
undetermined_actions:
- "{{ cinder_default_notification_result.notification_method_id }}"
alarm_actions:
- "{{ cinder_default_notification_result.notification_method_id }}"
with_items:
- expression: "{{ cinder_volume_running_check }}"
name: "volume"
- expression: "{{ cinder_backup_running_check }}"
name: "backup"
# This alarm definition is redundant and is being marked absent
- name: cinder-monitor | monasca_alarms | Create monasca alarm definitions
run_once: true
monasca_alarm_definition:
name: "{{ item.name }}"
description: "{{ item.description }}"
severity: "{{ item.severity }}"
expression: "{{ item.expression }}"
match_by: "{{ item.match_by }}"
keystone_url: "{{ cinder_keystone.admin_url }}"
keystone_user: "{{ cinder_keystone.admin_user }}"
keystone_password: "{{ cinder_keystone.admin_password }}"
keystone_project: "{{ cinder_keystone.monasca_tenant }}"
keystone_project_domain: "{{ cinder_keystone.default_domain_name }}"
keystone_user_domain: "{{ cinder_keystone.default_domain_name }}"
keystone_verify: "{{ trusted_ca_bundle }}"
monasca_api_url: "{{ monasca_alarm_definition_api_url }}"
state: "absent"
with_items:
- { name: "Cinderlm diagnostics monitor",
description: "Alarms if cinder monitoring cannot execute a task",
severity: "HIGH",
expression: "cinderlm.cinderlm_check > 0",
match_by: ["hostname"]}
# Create an alarm for local disks' status
# Needs to be done once for the entire system
- name: cinder-monitor | monasca_alarms | HP local disks alarm definition
run_once: true
monasca_alarm_definition:
name: "Storage {{ item.name }} check"
description: "Alarms if the {{ item.name }} metric is not OK."
severity: "HIGH"
expression: "{{ item.expression }}"
match_by: ["hostname"]
keystone_url: "{{ cinder_keystone.admin_url }}"
keystone_user: "{{ cinder_keystone.admin_user }}"
keystone_password: "{{ cinder_keystone.admin_password }}"
keystone_project: "{{ cinder_keystone.monasca_tenant }}"
keystone_project_domain: "{{ cinder_keystone.default_domain_name }}"
keystone_user_domain: "{{ cinder_keystone.default_domain_name }}"
keystone_verify: "{{ trusted_ca_bundle }}"
monasca_api_url: "{{ monasca_alarm_definition_api_url }}"
state: present
ok_actions:
- "{{ cinder_default_notification_result.notification_method_id }}"
undetermined_actions:
- "{{ cinder_default_notification_result.notification_method_id }}"
alarm_actions:
- "{{ cinder_default_notification_result.notification_method_id }}"
with_items:
# Note > 0 also picks up a warning
# - its legitimate to alarm for a drive warning
- expression: "cinderlm.hp_hardware.ssacli.logical_drive\
{component=logical_drive,service=block-storage\
,sub_component=lun_status} > 0"
name: "faulty lun"
- expression: "cinderlm.hp_hardware.ssacli.physical_drive\
{component=physical_drive,service=block-storage} > 0"
name: "faulty drive"
070701000000D7000081A40000000000000000000000015F230240000005CD000000000000000000000000000000000000005B00000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/tasks/monasca_api_alarms.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
# NOTE: Construct URL the same way as previous versions to avoid upgrade issues
- name: cinder-monitor | monasca_api_alarms | Construct VIP URL for Active check
set_fact:
_cinder_vip_url: "{{ item.url }}"
with_items:
- url: "{{ CND_API | item ('advertises.vips.private[0].protocol') }}:\
//{{ CND_API | item ('advertises.vips.private[0].host') }}:\
{{ CND_API | item ('advertises.vips.private[0].port') }}/"
# NOTE: Admin endpoint may not be accessible from internal nodes
# in the long term.
- name: cinder-monitor | monasca_api_alarms | Active check against Cinder VIP
monasca_agent_plugin:
name: "httpcheck"
args: >-
use_keystone=False
match_pattern=.*versions.*CURRENT.*
url={{ _cinder_vip_url }}
dimensions=service:block-storage,component:cinder-api,vip:internal
070701000000D8000081A40000000000000000000000015F23024000000B1B000000000000000000000000000000000000005F00000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/tasks/monasca_custom_plugins.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# 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.
#
---
#
# Installs custom plugin modules for monasca agent if any are defined.
# NB after these tasks, monasca_setup should be run to detect the
# installed plugins.
#
# Find custom detect modules
# Note: awkward command line splitting because lint complaints otherwise
- name: cinder-monitor | monasca_custom_plugins | Find monasca custom detect plugins
command: >
find {{ cinder_detect_plugins_src }} -maxdepth 1 -type
f -name *detect*.py ! -name __init__.py
register: cinder_detect_plugins_result
ignore_errors: yes
# Find custom check modules
# Note: awkward command line splitting because lint complaints otherwise
- name: cinder-monitor | monasca_custom_plugins | Find monasca custom check plugins
command: >
find {{ cinder_check_plugins_src }} -maxdepth 1 -type
f -name *check*.py ! -name __init__.py
register: cinder_check_plugins_result
ignore_errors: yes
# Create monasca agent dirs in /usr/lib (if necessary)
- name: cinder-monitor | monasca_custom_plugins | Create dirs for installing monasca custom check plugins
file:
path: "{{ item }}"
state: directory
mode: "u=rwx,g=rx,o=rx"
with_items:
- "{{ monasca_agent_check_plugin_dir }}"
- "{{ monasca_agent_detection_plugin_dir }}"
when: >
cinder_check_plugins_result.stdout != "" or
cinder_detect_plugins_result.stdout != ""
# symlink to custom detect modules
- name: cinder-monitor | monasca_custom_plugins | Install cinderlm custom monasca detect plugins
file:
src: "{{ item }}"
dest: "{{ monasca_agent_detection_plugin_dir }}{{ item | basename }}"
owner: root
group: root
state: link
mode: "u=rw,g=r,o=r"
with_items:
- "{{ cinder_detect_plugins_result.stdout_lines }}"
when: cinder_detect_plugins_result.stdout != ""
# symlink to custom check modules
- name: cinder-monitor | monasca_custom_plugins | Install cinderlm custom monasca check plugins
file:
src: "{{ item }}"
dest: "{{ monasca_agent_check_plugin_dir }}{{ item | basename }}"
owner: root
group: root
state: link
mode: "u=rw,g=r,o=r"
with_items:
- "{{ cinder_check_plugins_result.stdout_lines }}"
when: cinder_check_plugins_result.stdout != ""
070701000000D9000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004800000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/templates070701000000DA000081A40000000000000000000000015F23024000000403000000000000000000000000000000000000006700000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/templates/block-monitor-periodic-cron.j2{#
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
#}
# Cronjob that runs diags and emits json to be reaped by monasca monitor
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=""
*/5 * * * * root {{ bin_path }}/cinder_diag --ssacli --json > {{ cinder_monitor_json_dir }}/ssacli_diag.log 2>&1 && mv {{ cinder_monitor_json_dir }}/ssacli_diag.log {{ cinder_monitor_json_dir }}/ssacli_diag.json
070701000000DB000081A40000000000000000000000015F23024000000518000000000000000000000000000000000000005F00000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/templates/cinder-monitor-cron.j2{#
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
#}
# Cronjob that runs diags and emits json to be reaped by monasca monitor
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=""
*/7 * * * * root {{ bin_path }}/cinder_diag --cinder-capacity --json > {{ cinder_monitor_json_dir }}/cinder_capacity_diag.log 2>&1 && mv {{ cinder_monitor_json_dir }}/cinder_capacity_diag.log {{ cinder_monitor_json_dir }}/capacity_diag.json
*/3 * * * * root {{ bin_path }}/cinder_diag --cinder-services --json > {{ cinder_monitor_json_dir }}/cinder_services_diag.log 2>&1 && mv {{ cinder_monitor_json_dir }}/cinder_services_diag.log {{ cinder_monitor_json_dir }}/cinder_services_diag.json
070701000000DC000041ED0000000000000000000000025F23024000000000000000000000000000000000000000000000004300000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/vars070701000000DD000081A40000000000000000000000015F23024000000525000000000000000000000000000000000000004C00000000ardana-cinder-8.0+git.1596129856.263f430/roles/cinder-monitor/vars/main.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# 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.
#
---
#
# Define vars used during monasca custom agent install
#
cinderlm_project: cinderlm
cinderlm_project_src: "{% if deployer_media_legacy_layout|bool -%}
/opt/stack/service/{{ cinderlm_project }}/venv/lib/python2.7/site-packages/{{ cinderlm_project }}
{%- else -%}
/usr/lib/python2.7/site-packages/{{ cinderlm_project }}/
{%- endif -%}"
# path where custom check plugin(s) may be found (a valid path for 'find')
cinder_check_plugins_src: "{{ cinderlm_project_src }}/monasca/check_plugins"
cinder_detect_plugins_src: "{{ cinderlm_project_src }}/monasca/detect_plugins"
07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!719 blocks