Commit Graph

7 Commits

Author SHA1 Message Date
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 60a38b538d Initial block-storage Pike updates
- Changed the default linter to cookstyle
- cinder-group-active was missing a Provides header for the SysV init script
- Switched the qemu package to SCL for CentOS to get a newer release
- Normalized template banner comment

Change-Id: Iec59e0c8e3cb0b83db92a0a9f8db34a40953351f
2017-08-25 09:15:49 -04:00
Federico Gimenez Nieto 43a4e47717 Added/checked template tests
Added inline stubs for endpoint, db_uri, rabbit_servers and
get_password.
In spec/cinder_common_spec.rb, the most complex template, there is a
context for commonly named attributes, those which name matches a
node attribute with keys ['openstack']['block-storage'][attr_key],
storage_availability_zone for instance. This pattern is used in lots
of configuration spec blocks, for example in
['openstack']['block-storage']['vmware'][attr_key].
I've also found what appear to be some incongruences, like duplicated
conditional checks for volume driver types and repeated storwize
settings at the bottom. Perhaps these should be checked in another
bug.
Custom template banners have been added when needed.

Change-Id: I4e90a602caea044d5415ca9b637d19d82f9ab227
Closes-Bug: #1304412
2014-04-24 14:31:55 +02:00
Luis A. Garcia c726c9f7c6 Use platform_family instead of platform
As agreed on the mailing list:
https://groups.google.com/forum/#!topic/opscode-chef-openstack/HEL3KqBQIUM

This will allow the ibm_powerkvm platform to be recognized and will
simplify uses of multiple platforms from the same family.

Change-Id: Iebf2aad9f3b4649fb5c27d2fc93ee60c67e42737
Partially-Implements: blueprint add-ibm-powerkvm-enablement
Implements: blueprint platform-family
2014-04-09 11:48:53 -07:00
Matt Thompson 897da8218f Change platform? check in template
Rendering this template currently returns a
Chef::Mixin::Template::TemplateError error on the platform? method.  We
could change the method to node.platform? however this then triggers an
FC028 error.

Note that this issue is only encountered when
node[openstack][block-storage][volume][create_volume_group] set to
true.

Change-Id: I4d5ce97762c6b82bbf10e8194c482049eb3a6620
Closes-Bug: #1280285
2014-02-20 10:57:29 +00: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
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