39 Commits

Author SHA1 Message Date
Edward Hope-Morley
656e79da18 Catch blkid error when device is not yet formatted
When a new device is added to the ring we first try to
identify whether the device is already in the ring by
polling for an fs uuid. If the device has never been
used this is expected to fail so lets catch the error.

Also fixes log message.

Change-Id: I20354dedfa27a6b8dec92828cabb50a20d0d8838
Closes-Bug: 1567198
2017-09-14 13:22:25 -06:00
zhangyangyang
f87d83b1ab Change assert(Not)Equals to assert(Not)Equal
According to http://docs.python.org/2/library/unittest.html
assert(Not)Equals is a deprecated alias of assert(Not)Equal.

Change-Id: I4b9e966f4c7cd3df6440f38b56785a38a812e002
Closes-Bug: #1329757
2017-09-11 19:19:52 +08:00
Billy Olsen
d6061caa2c Only change owner/permissions of new devices
Do not change owner and permissions of already existing
devices in the setup_storage() function as this runs
during every config-changed hook invocation.

Change-Id: I21f23aee34d315ccb4df303527b4d791fc043f58
Closes-Bug: #1676728
2017-06-08 16:03:16 -07:00
Luong Anh Tuan
bca8efdcd5 Replace assertEquals with assertEqual
The method assertEquals has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases

Also in Python 3, a deprecated warning is raised when using assertEquals
therefore we should use assertEqual instead.

Change-Id: If7a404da609eb3cae22627f3b9d71292b8865674
Closes-Bug: #1218185
2016-11-22 10:23:25 +07:00
vnathan
b268ef82fa Fixed handling duplicate block devices specified in config
Change-Id: I5c96c49d47b762fecc16c8700ef6ed65bcd39bf5
closes-bug: 1582317
2016-11-14 22:13:57 +05:30
James Page
ab35249f38 Re-license charm as Apache-2.0
All contributions to this charm where made under Canonical
copyright; switch to Apache-2.0 license as agreed so we
can move forward with official project status.

Change-Id: I97206ee8be76220cb0937a09be3230432e04535a
2016-07-01 18:15:00 +01:00
Edward Hope-Morley
e7bf2f910e Allow devices to be added post-install
Track devices that have been added to the ring and allow
devices to be added to the ring post-install (currently
only allowed within the install hook). Devices added to
the ring prior to this patch existing will be migrated
to the tracking store of devices to avoid conflicts.

Change-Id: Id268dc6369041a4d2db6f30a997dfa0c0d73b93f
Closes-Bug: 1383390
2016-03-07 22:25:29 +00:00
James Page
2ceda02a08 Resync charm-helpers
Resolve single unit deployment failure with default configuration;
update unit tests to ensure that mkdir is called for /srv/node.

Change-Id: Id5518a2144ec3bdc6341f6dfc85835ae342f490e
2016-03-03 11:50:13 +00:00
James Page
9d042778d2 Resync helpers, refactor code to use cpu calcs from charmhelpers 2016-01-30 13:37:50 +01:00
billy.olsen@canonical.com
aaf6c037bc [niedbalski, r=freyes,billy-olsen] Fix fstab entry for loopback devices.
Closes-Bug: 1510666
2015-11-16 13:56:57 -07:00
Jorge Niedbalski
2e98fc7d8f Added unit tests 2015-11-09 11:35:46 -03:00
Corey Bryant
9b178924d7 [james-pages,r=corey.bryant] Add tox support for lint and unit tests. 2015-11-03 17:08:12 +00:00
David Ames
902fcd0251 [corey.bryant, r=thedac] Workload Status 2015-10-13 10:18:25 -07:00
Corey Bryant
e246250b48 Use unitdata key/value pair to store pause/resume status 2015-10-13 10:35:23 +00:00
James Page
da6b3b9fd5 Fixup broken use of assert calls and drop invalid test 2015-10-10 15:14:11 -07:00
Corey Bryant
22cf14a6de Drop old unit tests 2015-10-09 03:56:46 +00:00
Corey Bryant
5c1572f6ef Unit test updates 2015-10-08 12:17:44 +00:00
Liam Young
54dab0004d Fix up unit tests 2015-10-02 11:40:33 +01:00
Adam Collard
6cbfd89ad2 Fix references in unit_tests 2015-07-17 16:52:38 +01:00
David Ames
716b479011 Test for settings on /srv/node 2015-04-02 11:56:27 -07:00
Seyeong Kim
337af05ebf fix lint error 2015-02-03 04:01:59 -08:00
Seyeong Kim
4d0860e25e add more unit tests 2015-01-27 18:39:28 -08:00
Liam Young
2183cda129 Fixed unit tests 2015-01-09 10:21:49 +00:00
Liam Young
40a440746b Merged next branch in 2015-01-09 09:59:47 +00:00
Edward Hope-Morley
886c4888d3 allow ring fetch retry 2014-12-17 11:26:00 +00:00
root
5727c68515 [bradm] Adding nrpe checks, handle rsyncd config fragments 2014-10-30 00:52:15 -05:00
Bjorn Tillenius
232a886247 Fix test to actually fail for the old code. 2014-10-24 14:33:12 +00:00
Bjorn Tillenius
81dcc2c2f1 Apply the patch from lp:~tribaal/charms/trusty/swift-storage/trunk-fix-1350049. 2014-10-24 14:29:07 +00:00
Hui Xiang
20b6a8994c Use general BindHostContext(). 2014-09-25 14:36:13 +08:00
James Page
7492d5f7b1 Fixup failing tests 2014-09-03 15:10:13 +01:00
James Page
f715cbacbb [mthaddon,r=james-page] Add configuration for worker and per disk thread pool sizes
Make the number of workers for account, container and object servers a multiplier of the number of CPUs, and default to a sensible setting per recommendations in http://docs.openstack.org/developer/swift/deployment_guide.html#general-service-tuning. Also, add in a tunable option for object server threads_per_disk and tune default to recommendations from http://docs.openstack.org/developer/swift/deployment_guide.html#object-server-configuration.
2014-06-19 09:40:58 +01:00
Ryan Harper
eb625c4228 Add test that exposes the additional None value in the return value from determine_block_devices when the input list includes a device that's not present on the system. 2014-06-16 12:31:33 -05:00
James Page
eb2efe2cf3 Fixup tests 2014-03-20 13:50:49 +00:00
James Page
ab5bde7f11 Use upgrade for upgrades 2014-03-06 12:52:24 +00:00
James Page
8a8da35a05 Add execd preinstall, tidy unit testing 2013-09-27 17:33:06 +01:00
Adam Gandelman
45617ff76f Update tests post-helper sync. 2013-08-16 13:38:32 -07:00
Adam Gandelman
5740434491 Add do_openstack_upgrade(). 2013-07-19 14:06:01 -07:00
Adam Gandelman
a9fb83be8a Update to 100% coverage. 2013-07-19 13:44:37 -07:00
Adam Gandelman
b99f2cf010 Fix up port handling, checkin Makefile+setup.cfg+.coveragerc, rename tests/ -> unit_tests/ 2013-07-19 12:52:45 -07:00