41 Commits

Author SHA1 Message Date
Chris MacNaughton
58c92e15b1 Add config for sysctl
Allows the administrator to set custom sysctls on the storage
nodes. This is especially useful for setting kernel.pid_max.

Change-Id: Id902f799796a121578eba10de22e0eb9cc627b9d
Closes-bug: 1396613
2017-02-02 07:56:53 -05:00
Chris MacNaughton
47a4ac6e48 Remove /srv/node from updatedb
This stops updatedb from indexing the storage locations

Change-Id: I6ca6b8667fb06d3b52cedd151531fc0033cf2526
Closes-bug: 1520226
2017-01-25 09:21:31 -05:00
James Page
cae0a2c4f5 Add support for application version
Juju 2.0 provides support for display of the version of
an application deployed by a charm in juju status.

Insert the os_application_version_set function into the
existing assess_status function - this gets called after
all hook executions, and periodically after that, so any
changes in package versions due to normal system updates
will also be reflected in the status output.

This review also includes a resync of charm-helpers to
pickup hookenv and contrib.openstack support for this
feature.

Change-Id: I75009a66ce9c9d43e234f9c5acbb185ac4a66ba5
2016-09-20 13:32:28 +01:00
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
6ab28b3639 Add hardening support
Add charmhelpers.contrib.hardening and calls to install,
config-changed, upgrade-charm and update-status hooks.
Also add new config option to allow one or more hardening
modules to be applied at runtime.

Change-Id: If0d1e10b58ed506e0aca659f30120b8d5c96c04f
2016-03-24 11:11:58 +00: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
Edward Hope-Morley
4e109f4602 [hopem,r=]
Add support for setting swift-storage unit rsyncd acls.
Partially-Closes-Bug: 1427361
2015-11-24 13:51:05 +00:00
Corey Bryant
acd500f953 [corey.bryant,trivial] Revert "Enable multiple devices per node when config changed" 2015-10-15 15:05:42 -04:00
Corey Bryant
d0906aa167 [corey.bryant,trivial] Revert "Setup storage for new block devices in config changed." 2015-10-15 15:04:38 -04:00
David Ames
cd36735391 Also setup_storage() on config-changed in case block-device has changed 2015-10-14 15:04:42 -07:00
David Ames
0802f55959 Update swift-storage relation when block-device changes. Associated with fix for LP Bug#1479938 2015-10-13 12:05:02 -07:00
Corey Bryant
cd57171aa4 Add assess_status() callback 2015-10-13 09:18:52 +00:00
Corey Bryant
1dbd144445 Revert "Don't overwrite paused status in main()" 2015-10-13 08:52:10 +00:00
Corey Bryant
35b2ab8948 Don't overwrite paused status in main() 2015-10-12 16:37:08 +00:00
Corey Bryant
1a02c96e7e Drop assess_status() as it's duplicating work done by set_os_workload_status(). 2015-10-09 12:00:26 +00:00
Corey Bryant
e57d8793e5 Move to using REQUIRED_INTERFACES and check for swift-hash. 2015-10-09 03:47:26 +00:00
Corey Bryant
3c3064f723 Initial workload status support. 2015-10-08 02:15:44 +00:00
James Page
15a99db8a6 [thedac,r=james-page] Add action to manage upgrades 2015-09-23 14:52:50 +01:00
David Ames
72b2507f6c Action Managed Upgrades 2015-09-22 15:58:18 -07:00
James Page
b0f3e5f618 Ensure python2 is installed before hook execution 2015-09-22 14:57:37 +01:00
Adam Collard
f3532fe560 Move helpers to utils 2015-08-28 11:21:17 +01:00
Adam Collard
34bbc335b0 Don't need with_message=True anymore 2015-08-27 09:42:17 +01:00
Adam Collard
346252a6f0 Initial WIP for guarding restarts 2015-08-27 09:22:33 +01:00
Adam Collard
a3ab496153 Add lib, move library code there. Symlink into hooks directory. 2015-07-17 10:57:19 +01:00
Liam Young
c5a05b92f9 Revert to old code for syncing scripts 2015-01-12 13:24:00 +00:00
Liam Young
9f99db1c12 hooks/charmhelpers/contrib/charmsupport/rsync.py was removed after a charmhelper sync. It looks like it was never actually in lp:charm-helpers and the recent addition of contrib.charmsupport to charm-helpers-hooks.yaml and subsequent sync caused it to be (correctly) removed. I've added the lost function setup_rsync to swift_storage_utils.py 2015-01-12 13:05:44 +00:00
Liam Young
0ba9f49fa9 Use rnpe functions from charmhelpers 2015-01-12 12:04:01 +00:00
Liam Young
f503da49cc Fix lint 2015-01-09 10:07:27 +00:00
Brad Marshall
d1e2c14274 [bradm] Fixed rsync to use /etc/rsync-juju.d, check if host_context is defined before using it 2014-11-06 17:38:43 +10:00
Brad Marshall
61541ee0d4 [bradm] Tweaked check to include host context and unit name 2014-11-04 17:20:52 +10:00
Brad Marshall
0888ca5b6c [bradm] Tweaked hook to grab all the rsyncd fragments 2014-10-30 17:10:47 +10:00
root
5727c68515 [bradm] Adding nrpe checks, handle rsyncd config fragments 2014-10-30 00:52:15 -05:00
James Page
a604212425 Fixup upgrades, which miss install of psutil package 2014-10-07 09:37:20 +01:00
James Page
8583ad0d19 [xianghui,dosaboy,r=james-page,t=gema] Add IPv6 support using prefer-ipv6 flag 2014-10-01 22:28:39 +01:00
Edward Hope-Morley
c4ff348b21 fixed ipv6 support check 2014-09-26 19:20:43 +01:00
Hui Xiang
76edea395f Use get_ipv6_addr()[0] directly 2014-09-20 00:59:42 +08:00
Hui Xiang
8b20506d55 Do IPv6 check. 2014-09-18 21:36:03 +08:00
Hui Xiang
e8638d90e6 Support swift-storage for IPv6. 2014-08-13 14:50:51 +08:00
James Page
8a8da35a05 Add execd preinstall, tidy unit testing 2013-09-27 17:33:06 +01:00
Adam Gandelman
df655714eb Sync helpers, update accordingly. 2013-09-23 12:01:06 -07:00
Adam Gandelman
a6b66ff8f0 Rename _relations.py -> _hooks.py 2013-07-19 14:21:28 -07:00