Permalink
Please sign in to comment.
Browse files
Add proper ping/status checks before volume creation.
This adds proper (optional) ping checks with fping and gluster peer status checks to ensure the peer are available before a volume create command. This required rewriting of the xml.py hack which helps puppet interface with the xml formatted gluster cli output. In addition, downstream commands such as volume::property gained checks to ensure the volume was present beforehand. While it is not obvious, it should be noted that because of the distributed nature of glusterfs, more than one puppet run will be required for complete deployment. With these patches, individual runs shouldn't ever end in temporary error as they used too.
- Loading branch information...
Showing
with
125 additions
and 16 deletions.
- +56 −12 files/xml.py
- +40 −1 manifests/volume.pp
- +25 −0 manifests/volume/ping.pp
- +3 −2 manifests/volume/property.pp
- +1 −1 manifests/{volume/property/base.pp → xml.pp}
68
files/xml.py
| @@ -0,0 +1,25 @@ | ||
| +# Simple? gluster module by James | ||
| +# Copyright (C) 2012-2013+ James Shubin | ||
| +# Written by James Shubin <james@shubin.ca> | ||
| +# | ||
| +# This program is free software: you can redistribute it and/or modify | ||
| +# it under the terms of the GNU Affero General Public License as published by | ||
| +# the Free Software Foundation, either version 3 of the License, or | ||
| +# (at your option) any later version. | ||
| +# | ||
| +# This program is distributed in the hope that it will be useful, | ||
| +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| +# GNU Affero General Public License for more details. | ||
| +# | ||
| +# You should have received a copy of the GNU Affero General Public License | ||
| +# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| + | ||
| +class gluster::volume::ping { | ||
| + | ||
| + package { 'fping': # for checking other bricks are up | ||
| + ensure => present, | ||
| + } | ||
| +} | ||
| + | ||
| +# vim: ts=8 |
0 comments on commit
4345cf9