Commit Graph

75 Commits

Author SHA1 Message Date
Ghanshyam Mann a048e1094b Retire openstack-chef: remove repo content
OpenStack-chef project is retiring
- https://review.opendev.org/c/openstack/governance/+/905279

this commit remove the content of this project repo

Depends-On: https://review.opendev.org/c/openstack/project-config/+/909134
Change-Id: Id5659595c1a67540fff5434197a06d33cdb9d85e
2024-02-17 20:53:54 -08:00
Lance Albertson 427adf523c Chef 17 support
- Remove bind from Berksfile
- Update copyright years
- Require Chef >= 16.0

Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-image/+/814052
Change-Id: I3712128980179e316a88a50d1c103dd8a92bd837
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-14 12:31:32 -07:00
Lance Albertson 2e5dd8c317 Cookstyle 6.19.5 fixes
Update ChefSpec due to changes made in apache2 cookbook.

Depends-On: https://review.opendev.org/756168
Change-Id: Ie849f5bae082e94581146793f964d0e001a7c8c8
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-10-05 20:26:07 -07:00
Lance Albertson 1b39032b8d Stein fixes
- Cookstyle fixes
- Refactor Berksfile to use groups so we can exclude integration testing
  cookbooks
- Update documentation
- Enable sensitive resources for the template[/etc/cinder/cinder.conf]
  and to resources improve security.
- Update delivery configuration to exclude integration cookbooks
- Fix ChefSpec output.
- Switch package installations to send packages as arrays instead of individual
  package resources. This generally speeds up chef runs.

Depends-On: https://review.opendev.org/701027
Depends-On: https://review.opendev.org/706151
Depends-On: https://review.opendev.org/706157
Change-Id: I73948a67e798477cfe7d3cf62474d0ea96f90db2
2020-03-19 11:26:06 -07:00
Christoph Albers 8efd295421 remove targets.conf
- since the target package ships the default conf we won't need this
  anymore
- the cinder target.conf is shipped by the cinder package to the right
  directory
- removed targets.conf.erb since this isn't used anymore
- removed obsolete specs

Change-Id: I9485cc65231b1da8b24efdb7e25551e4d4688d6a
2019-03-27 14:31:58 +00:00
Samuel Cassiba fd7ca4eddf Convert hyphens to underscores for service names
The Chef Style Guide[1] does not recommend using hyphens for
cookbook or resource names. To maintain consistency, we should follow
best practices.

[1]: https://docs.chef.io/ruby.html#use-of-hyphens

Depends-On: Ic2b6d8f1cdf719791faaebdbd7e29e789eb3f31c
Change-Id: Ib8c788f69e9545b2d7121199590e3795f2212c7f
2018-12-14 23:55:16 -08:00
Samuel Cassiba 2e17c9a922 Use updated volume packages for Cinder
- scsi-target-utils comes from EPEL. Now that EPEL is disabled, this is removed
  in favor of targetcli from the base repo. This is also available for Ubuntu to
  provide a consistent outcome.

Change-Id: Ibc146350ef2ddd1d19e35402cbf69e036a759f1d
Implements: blueprint modern-chef
2018-02-08 22:14:55 -08:00
Samuel Cassiba c18919e533 block-storage refactor for Pike and Chef 13
- deprecated postgresql support
- dropped apt cookbook dependency
- deprecated node.foo.bar method access for node['foo']['bar'] bracket syntax
- implemented foodcritic and cookstyle corrections
- migrated cinder api to a Chef-managed config
- deprecated cinder-group-active service, as it is no longer needed and gets in
  the way of functionality
- added lvm cookbook dependency for better pv/vg handling

Implements blueprint modern-chef

Change-Id: Id248c9267af6750c871487bc8b577aa2011a782a
2017-12-12 17:34:08 -08:00
Samuel Cassiba d2ff4496bb Added systemd unit, style and lint fixes for chefdk
- cinder-group-active is still SysV, but can and will start via systemd if
  coaxed to do so.
- Style and lint fixes for newer chefdk
- Removed ancient Gemfile
- Rewrote metadata.rb for readability

Change-Id: I4c26aea78220eb20fc4e5e964af93414855df5f6
2017-08-02 02:15:54 -04:00
Christoph Albers 4a7dc692b9 refactoring final step
* added endpoint attributes (moved from common)
* removed qpid as a messaging option (can be incuded in a wrapper)
* deleted default attributes from nova.conf.rb originated in
  openstack-common
* adapted optimized endpoint logic
* removed rubocop exceptions in recipes and regenerated the
  .rubocop_todo.yaml containing all remaining exceptions
* added versionbumb for refactored os-identity and common
* moved version up to 13.0.0 for mitaka release
* removed fedora, suse as supported platform
* adapted the specs (unit tests) to work again
* added new logic into templates/default/cinder.conf.erb
* refactored attributes throughout all recipes that were connected to
  the attributes used for the cinder.conf.erb template to adapt the new
  template attribute syntax
* moved all attributes from attributes/default.rb that were used in
  cinder_conf.erb to attributes/cinder_conf.rb
* refactored attributes to fit upcomming template logic
* refactored recipes to fit upcomming template logic
* removed all attributes from default.rb and cinder.conf.erb which are set
  as default in attributes, openstack doc and used to render the template

Depends-On: Ifa5a7f4e1df47a3961976e64f654224864c3dcb4
Depends-On: I3262b2e6f792f37c32a446e6567790b82bdd4613
Depends-On: I0547182085eed91d05384fdd7734408a839a9a2c
Implements: blueprint cookbook-refactoring
Change-Id: Idadc97bd7380d6c4f9f6f33d9c6b1215a5f24772
2016-02-08 14:39:27 +01:00
Lan Qi song 7f980745eb Create mount point directory when use multi backend configuration
Currently, when we use GPFSDriver as multi backend volume driver,
cookbook won't create gpfs mount point base directory automatically.

This patch fix this problem.

Closes-Bug: #1476960

Change-Id: I1faf33470747fac6df66854470cf45d35a38f3c1
2015-07-25 09:19:44 +08:00
Mark Vanderwiel 0b94103098 Cleanup minor rubocop offenses
Cleaned up all the minor rubocop issues, the ones left relate to
complex logic and what I think is a bug in rubocop for nested
vs compact modules/class definitions.

Change-Id: I5ac6d513c3b1397ba7205dc6f661134a93d17741
2015-05-28 14:43:16 -05:00
Masaki Matsushita 0fd962dae2 use LVMVolumeDriver as default.
LVMISCSIDriver is deprecated.
See also: cinder/volume/drivers/lvm.py

Change-Id: I08b157ee7fbb0d61c8c9ec406edf2240a9a40c1d
Closes-Bug: #1451363
2015-05-06 19:39:53 +09:00
Mark Vanderwiel 98688befe1 Make sure lvm2 package is installed
lvm volume recipe makes use of lvm commands like vgcreate. These
commands are part of the lvm2 package which may not be a
dependency for the base openstack cinder packages anymore. So,
make sure this get installed before using those commands.

Change-Id: I75f47260677b409ff32c4b2c6fc5598a31214ecf
Closes-Bug: #1435968
2015-04-09 15:00:27 +00:00
lqslan 1a7152c2d9 Raise an error when san private key is missing
Currently, if san private key is missing, cookbook will create an
empty one which cause cinder can't work properly.

This patch will check whether san private key is exist or not, if
not, raise an error to remind user to provide one.

Change-Id: Ia1e0a60dec9ef463a908756fffa5f5274ebc0fb7
2015-03-30 15:43:19 +08:00
Edwin Wang ab7c43d8ef Add config for IBM FlashSystem
Modify config in attributes/default.rb, recipes/cinder-common.rb,
spec/volume_spec.rb, spec/cinder_common_spec.rb and
templates/default/cinder.conf.erb with SAN login and password.
It has been merged in Kilo. iSCSI code is on the way.

Change-Id: I784f69424a5f1b20f99ba5faccc85b3066e23de3
2014-12-31 13:47:13 +08:00
Jin Hui 996254f21c Configure iscsi target service for RHEL7
In RHEL7, tgtd is replaced by LIO, and target deamon service and
targetcli package is used to manage iscsi target.

This fix also set iscsi_helper to lioadm for RHEL7

Change-Id: I5a5b1faec6a6aed9b9f3d5632e704a59e2d5c7b7
closes-bug: #1409619
2015-02-11 10:32:33 +08:00
Elliott Davis f75d819c2f Add dependency on upstream ceph cookbook for better key management
The upstream ceph cookbook already hooks into chef for environment information.
This patch utilizes the client LWRP to create or add ceph keys for RBD support.
This patch also changes some default attribute names for more sane organization

Partial-Bug: #1409943

Change-Id: Ibba6c568d4e4d00153061458b71593cd28714e60
2015-02-05 09:11:12 -06:00
Yi Ming Yin dad180e458 Disable configuration of tgtd on RHEL 7
- This is a stage I fix for bug #1400958. First disable the related
resources for tgtd.
- Bump version to 10.1.0 to indicate this is a start point of new
platform support

Change-Id: Id3757f7847ba0620d4bf4492160921389e3ef475
Partial-bug: #1400958
2015-01-13 09:17:33 +08:00
Sasikanth cf9ec63b94 Update gpfs volume driver path
* Change of driver path from "drivers.gpfs.GPFSDriver" to
  "drivers.ibm.gpfs.GPFSDriver"
* Fix issue of assigning "gpfs_images_share_mode=copy_on_write"
  even if the parent attribute "gpfs_images_dir" is not defined

Change-Id: Ica00f00901502857d5d21ef7ce7ae3b68e4ca9b7
Closes-Bug: #1389955
2014-11-07 15:04:50 +05:30
xijiax d4678e8a47 Add package sysfsutils for cinder SVC driver.
Change-Id: I4e2c997dc29e4c23b3d5cd006d81504cde840e09
Closes-Bug: #1386062
2014-10-28 14:17:21 +00:00
Mark Vanderwiel 84e52038f8 Allow create volume group with block devices for lvm
Add new attribute, create_colume_group_type to allow
either create simple test volume based upon a file
(as existing support does),
or create volume group based upon block devices.

Change-Id: Ia81354f9fab9310c1b5e633d4ca05e434f9c2da6
Closes-Bug: #1321336
2014-07-11 15:33:45 -05:00
Ionuț Arțăriși 8fde9630ae use new python_packages attributes from -common
*_python_packages attributes are being moved to -common in order to
remove the duplication from all the cookbooks which are using them

Change-Id: I60798fb39f6167eafd0cc483dca9bb930a236946
Implements: blueprint move-python-db-client-attrs-to-common
2014-07-02 14:32:41 +02:00
Mark Vanderwiel 23754b4c06 Allow packages to be updatable
In order for package updates to occur, package resources need to use
the upgrade action.  This is first phase of blueprint, to get some
consistency, next phase is to allow some update control.

Change-Id: Ibf9aeea1a814383c298e432286c45a433ff257ed
Implements: blueprint allow-package-updates
2014-05-05 10:35:49 -05:00
Luis A. Garcia 58e68ad565 Update Storewize/SVC driver name
The Storewize/SVC driver name changed as a result of change
I1696a97279efe834a96b3f3843bc65f0ea6da9cc. This patch simply updates the
name.

Change-Id: I4d2aa3d828b9f61f237dbf12c2e199e57f3f06f7
Closes-Bug: #1311200
2014-04-22 09:19:22 -07:00
Sasikanth Eda 5103ccd784 Add IBMNAS driver configuration flags
- Add support for IBMNAS volume driver configuration flags.
(nfs_shares_config, nfs_sparsed_volumes, nfs_mount_point_base
nas_ip, nas_login, nas_password)
- Add initialization of nfs_mount_point_base directory,
nfs_shares_config with proper owner and permission settings.
- Updated README.md with ibmnas attributes

Change-Id: I88607740963916ccc26daee5873cca532b00a434
Implements: blueprint ibmnas-chef-support
2014-04-14 10:26:41 +05:30
Luis A. Garcia f177e019dc Use get_secret instead of secret
The new get_secret method allows the 'secrets' databag to be renamed,
just like all other databags.

Change-Id: Ic8be5d19a112d78e22716c0cd571efc7186ac9ce
Related-Bug: #1288784
2014-04-02 08:14:26 -07:00
Bill Owen c25f1a9024 Add gpfs volume driver configuration flags
Add support for gpfs volume driver configuration flags.  Add
initialization of gpfs_mount_point_base directory with proper
owner and permission settings.

Use Havana location of gpfs driver.  In Icehouse, this will
be updated to reflect change in driver path under "ibm" subdirectory.

Partially implements: blueprint gpfs-storage-support
Change-Id: I002fc73c1d1fa89d8cb56d8da048426701251a46
2014-03-24 16:46:30 -07:00
Andy McCrae e7bcd475a9 Add EMC VMAX/VNX support as a provider for cinder
- Add EMC attributes
- Create cinder_emc_config.xml when EMC driver is used.
- Installs appropriate packages when EMC driver is used.
- Add tests for new cinder_emc_config.xml
- Add tests for changed attributes in existing cinder.conf
- Add tests for package installs

Change-Id: I5a44e3626784814f57e15a43ce459a4d36d31c6b
Implements: blueprint emc-cinder-provider
2014-02-24 21:59:42 +00:00
Stephan Renatus c859d9fdcc Ceph RBD integration for openstack-block-storage
This allows using a Ceph cluster as cinder backend.  The necessary
dependencies are defined in platform_options['cinder_ceph_packages'] and
can be overridden.

Overall documentation on Ceph integration has to be added, I'd be glad
to help with that.

This changes the way secrets are handled:

openstack[block-storage][rbd_secret_name]  will fetch the secret uuid
shared between cinder and nova from the databag with that name and set the
openstack[block-storage][rbd_secret_uuid] attribute.

Besides that, the user is expected to provide the password for the cephx
user, `rbd_user`, used with the pool `rbd_pool`, in the data bag item
`rbd_key_name` in the service password data bag.

Implements: blueprint rbd-for-block-storage

Change-Id: Iafe2bdea0d6120bb08c027482c94d819a67aee4a
2014-02-21 10:02:40 +01:00
Jenkins 2b42e6cffe Merge "Updates cinder-group-active script to work on Ubuntu" 2014-02-06 10:51:08 +00:00
Christopher H. Laco ef8c535cc8 Upgrade/Update rubocop
Now that almost all of the rubocop blueprints have been completed, make
one final pass through all of the cookbooks ensuring they're all in
sync with each other.

- Upgrade rubocop to 0.18.1
- Fix violations caused by 0.18.1 upgrade
- Add Includes for non-existent folders to Includes so they
  automatically cover future additions

Change-Id: I9224b785f50103d348e3b16ea24e5dc8cab84c62
Implements: blueprint lint-and-unit-testing-for-havana
2014-02-04 15:27:56 -05:00
Matt Thompson ad7da3d0cc Updates cinder-group-active script to work on Ubuntu
Setting the following attribute to true causes a chef-client to fail on
Ubuntu:

default['openstack']['block-storage']['volume']['create_volume_group']

The reason is that when this is enabled, the file cinder-group-active
is dropped in /etc/init.d and attempting to start it fails since it's
not written for Ubuntu.  This change wraps some of the Red Hat specific
bits with if statements and also conditionally runs the vgcreate so we
don't run losetup unnecessarily (which keeps mapping the volume file to
new /dev/loop devices).

Change-Id: I5e14aeec64b1c1d596584bfc5d3352f45114421a
Closes-Bug: #1274385
2014-02-03 15:54:38 +08:00
Jenkins 3cc1b69377 Merge "Fix the RBD driver class reference" 2014-01-31 06:28:41 +00:00
Stephan Renatus 62a6d8ed9a Fix the RBD driver class reference
The reference for the RBD driver class was wrong.  It was fixed in all
places.

blueprint rbd-for-block-storage

Change-Id: Ie91fd2d41b82120673c0b579230228c2f6dc79e3
2014-01-24 14:59:26 +01:00
Matt Thompson 59c1955caf Clean up cookbook for bp/clean-up-attr-for-mq-and-db
This change removes the attributes we'll be moving to openstack-common
and changes reference of those attributes to reflect new (more
consistent) namespace. We also fix a broken test which doesn't properly
converge after changing a node attribute.  Lastly, we handle the rabbit
mq attribute use_ssl.

Change-Id: I12b9c33f89eb35a66bae7420340aff10efd18b1c
Implements: blueprint clean-up-attr-for-mq-and-db
2014-01-24 08:48:41 +00:00
Matt Ray 60e37c5eb0 Unified Rubocop cleanups under single file.
Consolidate all the .rubocop.yml into a single file, finished out cleanups for
all the Ruby files.

Change-Id: I92d5983724d5d0185cd25bea6a0f46657a6c05d4
Addresses: blueprint rubocop-for-block-storage
2014-01-17 15:35:20 -06:00
Jenkins 228958c15c Merge "Move to use "get_password" instead of "{user,service,db}_password"" 2014-01-16 20:32:28 +00:00
gengjh 9b810c36ba Need create init.d script file before enable the service
Closes-bug: #1267095

Change-Id: I7897c6cb03ae3040a819dc86f45fc6c7dea9a3e5
2014-01-16 10:13:42 +08:00
Andy McCrae 3fd80c0a3f Move to use "get_password" instead of "{user,service,db}_password"
The user_password, service_password and db_password functions are redundant
since they simply call "secret". Creates a get_password function that will
accept a "type" of db, service or user.

All instances of these calls have been changed to call get_password

Change-Id: Ifdb5c7b3f590431aaa7ffc021cdee34899ac8c15
Partial-Bug: #1195915
2014-01-15 17:53:47 +00:00
Luis A. Garcia d2363a7a9c Add Storwize/SVC configuration attributes
Change-Id: Ica5513abdc8bed298edb475f0c44e2eabf50b93b
2014-01-14 17:00:58 +00:00
Matt Ray 018d125a51 Initial rubocop support for recipes.
Per the mailing list thread, introducing Rubocop as a replacement for Tailor.
Assuming Jenkins likes this, more pedantic patches will follow to make Rubocop
happy. So far this is just spacing issues and adding UTF-8 headers, but more
work will need to be done to remove all of the changes for the .rubocop-todo.yml

Change-Id: I590ac5ec03ce6a00dd73027d6798e36105a32af1
2014-01-09 12:38:07 -06:00
gengjh a1be978fe1 Create volume group when use the LVMISCSIDriver
Create volume group when set volume_driver to
cinder.volume.drivers.lvm.LVMISCSIDriver otherwise we can not create
volume with cinder.

Change-Id: I9d27a19254aa62130c13171d68c0c67e4e3686ce
2013-12-20 15:30:59 +08:00
Ionuț Arțăriși 4949b57572 add PostgreSQL support
Change-Id: Ifcec59a28a4531f8e708c3d053c3cf6c8e99b710
2013-07-17 17:54:23 +02:00
alop a05a53dfeb Adding support for netapp NFS direct driver
This commit adds support for the 7mode NFS direct driver.
Changed the 'if driver' to a case, somewhat based off the
rcbops cinder-volume recipe. if the NFS driver is chosen, the
volume recipe will install the nfs client package, setup a mountpoint
a shares config file, and setups cinder.conf accordingly

Change-Id: Ia8d4c31235426614a317729494569062a23a05bf
2013-07-11 11:32:41 -07:00
galstrom21 7c2659a8cb Using correct volume driver paths
cinder.volume.X instead of cinder.volume.drivers.X results in a
  deprecation warning in the cinder-volume log.

  https://github.com/openstack/cinder/blob/master/etc/cinder/cinder.conf.sample#L1352-L1353

Change-Id: Ica4ff79b3ccc35a9d3ff64bdc0bb89a94e7ead1f
2013-06-06 13:55:08 -05:00
John Dewey dbd139f8e3 Only lookup volume service passwords when necessary
The volume service passwords should be looked up depending on
the type of driver used.  As I understand it the grizzly netapp
driver no longer requires dfm.  However, without testing this,
would like to keep the existing configuraton.  We will be testing
this in our lab over the next few days, and will send a new patch
based on our findings.

Change-Id: I1cf0b6e292eec71788d0b79dbf270a1d17bbfa1e
2013-06-05 11:16:04 -07:00
alop ce19634ee3 Initial commit of cinder-common
Noticed that every recipe in the cookbook had a declaration for the
cinder.conf template, with a notify to the service defined in that recipie.

I moved the template, and the variables that it needs to populate,
to cinder-common.rb, included that in all the other recipes,
and changed the notify in the template to subscribes in each service
Also, added a spec for this.

All tests pass

Change-Id: Ibcab9566a907e1ea9febbd61e37b9587625a15e6
2013-06-02 23:19:17 -07:00
Carl Perry d17c345fde Moved attributes to the openstack namespace
Change-Id: Id18ff424018ded60c9c4570d81dbf5359f0187b7
2013-05-18 19:39:08 -07:00
Matt Ray e37be72e3d rename cookbook from 'cinder' to 'openstack-block-storage' and attributes accordingly.
Change-Id: I5f797567d110281b4698cbc6dbae5b76b03bdf67
2013-05-18 18:22:48 -05:00