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>
- 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
This updates all references of let(:chef_run) to cached(:chef_run) to
speed up tests. By doing this, we have to create a new cached(:chef_run)
block whenever we need to adjust node attributes for testing.
- Remove unused default recipe ChefSpec
- Formatting cleanup
Speed was improved from 3 minutes 9.1 seconds to 38.21 seconds
Change-Id: I470991c600bca0ad2b6a389923a2fe8c954b7008
Python2.7 is going EOL soon, let us deploy python3 for Rocky from the
start, so we avoid having to switch later.
Clean up some unused pkg attributes.
Depends-On: https://review.opendev.org/682918
Change-Id: I1a11352f54b4126d7b510aa74d9ed1c4a33348c1
- 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
- openstack rocky uses bionic as ubuntu platform
the package name changed since ubuntu xenial.
fixed it
Change-Id: I3607d10577ee3391c39027676151bd5ef03259b5
- 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
- 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
- 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
* 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
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
- deprecated Gemfile
- Updated TESTING.md and README.md
- updated Rakefile to use chef exec insted of bundle exec
- replaced Runner with SoloRunner in specs
Change-Id: If3e3b54c9dbaa8bb51164bc85fd93ff5fc54ec4d
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
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
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
Currently the qemu-img package is not installed by default
for a cinder-volume node. This causes cinder to fail when
trying to create images using the qemu-img command.
This patch will change the 'cinder_volume_packages' attribute
to also install the qemu-img package for cinder-volume nodes.
Change-Id: Idb923f3edfa39720178e498433d94e4e37a76f7d
Closes-bug: #1413088
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
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
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
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
The Storewize/SVC driver name changed as a result of change
I1696a97279efe834a96b3f3843bc65f0ea6da9cc. This patch simply updates the
name.
Change-Id: I4d2aa3d828b9f61f237dbf12c2e199e57f3f06f7
Closes-Bug: #1311200
Adding strict dependency on python cookbook version. This removes the
requirement for carrying a matcher in this cookbook for the python
LWRPs.
Change-Id: I3e58c029044aa76fef71372e6a06f8f307d29df7
This change reworked the ceph-related specs, now that ceph_client is
available in openstack-common.
Change-Id: Ib3a77b17bd3f5b899b1fb704ce7084982aa45b54
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
The fauxhai fix for the cpu stanza has merged and is available in
fauxhai version 2.1.0 so reverting the workaround patch and ensuring
fauxhai 2.1.0 is used.
- Remove the node.set for ['cpu']['total']
- Adjust the Gemfile to use fauxhai 2.1.0
- Adjust the Gemfile.lock
Change-Id: Ib1fc86af1306d5443721400589a8c830263c0767
Addresses: blueprint fauxhai-cleanup
The reference for the RBD driver class was wrong. It was fixed in all
places.
blueprint rbd-for-block-storage
Change-Id: Ie91fd2d41b82120673c0b579230228c2f6dc79e3
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
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
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
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
Addresses: blueprint rubocop-for-block-storage
Change-Id: Ibb11739e452016c101995a371d031faeeb7e7683
Create volume group when set volume_driver to
cinder.volume.drivers.lvm.LVMISCSIDriver otherwise we can not create
volume with cinder.
Change-Id: I9d27a19254aa62130c13171d68c0c67e4e3686ce