Skip to content

Commit

Permalink
Version 6.1.0.149
Browse files Browse the repository at this point in the history
- Made the dd used to wipe out a volume being removed use direct I/O.
- Added various protections against accidentally overwriting existing
  volumes when creating a new VDO volume unless the --force flag is
  supplied.
- Improved argument parsing, error handling, help text, and man pages for
  the vdo script.
- Added an error check when attempting to create a VDO volume on a device
  which is too large.
- Changed the default logical size to not be over-provisioned.
- Added write policy "auto" which will select async or sync mode based upon
  whether or not the storage below VDO reports requiring flushes. Made
  "auto" the default.
- Modified spec file to enable and disable the vdo systemd unit script.
- Made vdoformat more resilient against crashes.
- Changed the module target name from dedupe to vdo.
- Fixed bugs in the VDO Ansible module.
  • Loading branch information
corwin committed Apr 29, 2018
1 parent 5354aa3 commit 0da9d8a
Show file tree
Hide file tree
Showing 459 changed files with 5,284 additions and 3,567 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017 Red Hat, Inc.
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# $Id: //eng/vdo-releases/magnesium/src/packaging/src-dist/user/Makefile#2 $
# $Id: //eng/vdo-releases/magnesium-rhel7.5/src/packaging/src-dist/user/Makefile#1 $

INSTALL = install
INSTALLOWNER ?= -o root -g root
Expand Down
4 changes: 2 additions & 2 deletions examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017 Red Hat, Inc.
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# $Id: //eng/vdo-releases/magnesium/src/packaging/src-dist/user/examples/Makefile#1 $
# $Id: //eng/vdo-releases/magnesium-rhel7.5/src/packaging/src-dist/user/examples/Makefile#1 $

SUBDIRS = ansible nagios systemd

Expand Down
4 changes: 2 additions & 2 deletions examples/ansible/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017 Red Hat, Inc.
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# $Id: //eng/vdo-releases/magnesium/src/packaging/src-dist/user/examples/ansible/Makefile#2 $
# $Id: //eng/vdo-releases/magnesium-rhel7.5/src/packaging/src-dist/user/examples/ansible/Makefile#1 $

INSTALLFILES=README.txt \
test_vdocreate.yml \
Expand Down
106 changes: 89 additions & 17 deletions examples/ansible/vdo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/python

#
# Copyright (c) 2017 Red Hat, Inc.
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -329,9 +329,6 @@ def add_vdooptions(params):
if ('readcachesize' in params) and (params['readcachesize'] is not None):
options.append("--readCacheSize=" + params['readcachesize'])

if ('writepolicy' in params) and (params['writepolicy'] == 'async'):
options.append("--writePolicy=async")

if ('slabsize' in params) and (params['slabsize'] is not None):
options.append("--vdoSlabSize=" + params['slabsize'])

Expand Down Expand Up @@ -406,7 +403,7 @@ def run_module():
emulate512=dict(choices=['enabled', 'disabled'],
required=False, default=None),
slabsize=dict(type='str', required=False),
writepolicy=dict(choices=['sync', 'async'],
writepolicy=dict(choices=['sync', 'async', 'auto'],
required=False, default=None),
indexmem=dict(type='str', required=False),
indexmode=dict(choices=['dense', 'sparse'],
Expand Down Expand Up @@ -524,7 +521,7 @@ def run_module():
'Physical threads',
'Read cache',
'Read cache size',
'Write policy',
'Configured write policy',
'Compression',
'Deduplication']

Expand All @@ -539,7 +536,7 @@ def run_module():
'Block map cache size': 'blockmapcachesize',
'Read cache': 'readcache',
'Read cache size': 'readcachesize',
'Write policy': 'writepolicy',
'Configured write policy': 'writepolicy',
'Acknowledgement threads': 'ackthreads',
'Bio submission threads': 'biothreads',
'CPU-work threads': 'cputhreads',
Expand Down Expand Up @@ -579,19 +576,19 @@ def run_module():
result['currentparams'] = currentparams

if diffparams:
result['changed'] = True
result['diffparams'] = diffparams
vdocmdoptions = add_vdooptions(diffparams)
result['vdocmdoptions'] = vdocmdoptions
rc, _, err = module.run_command("%s modify --name=%s %s"
% (vdo_cmd,
desiredvdo,
vdocmdoptions))
if rc == 0:
result['changed'] = True
else:
module.fail_json(msg="Modifying VDO %s failed."
% desiredvdo, rc=rc, err=err)
if vdocmdoptions:
rc, _, err = module.run_command("%s modify --name=%s %s"
% (vdo_cmd,
desiredvdo,
vdocmdoptions))
if rc == 0:
result['changed'] = True
else:
module.fail_json(msg="Modifying VDO %s failed."
% desiredvdo, rc=rc, err=err)

if 'deduplication' in diffparams.keys():
dedupemod = diffparams['deduplication']
Expand All @@ -600,13 +597,26 @@ def run_module():
rc, _, err = module.run_command("%s disableDeduplication "
"--name=%s"
% (vdo_cmd, desiredvdo))
if rc == 0:
result['changed'] = True
else:
module.fail_json(msg="Changing deduplication on "
"VDO volume %s failed."
% desiredvdo, rc=rc, err=err)

if dedupemod == 'enabled':
result['dedupeopt'] = dedupemod
rc, _, err = module.run_command("%s enableDeduplication "
"--name=%s"
% (vdo_cmd, desiredvdo))

if rc == 0:
result['changed'] = True
else:
module.fail_json(msg="Changing deduplication on "
"VDO volume %s failed."
% desiredvdo, rc=rc, err=err)

if 'compression' in diffparams.keys():
compressmod = diffparams['compression']
if compressmod == 'disabled':
Expand All @@ -615,11 +625,73 @@ def run_module():
"--name=%s"
% (vdo_cmd, desiredvdo))

if rc == 0:
result['changed'] = True
else:
module.fail_json(msg="Changing compression on "
"VDO volume %s failed."
% desiredvdo, rc=rc, err=err)

if compressmod == 'enabled':
result['compressopt'] = compressmod
rc, _, err = module.run_command("%s enableCompression "
"--name=%s"
% (vdo_cmd, desiredvdo))
if rc == 0:
result['changed'] = True
else:
module.fail_json(msg="Changing compression on "
"VDO volume %s failed."
% desiredvdo, rc=rc, err=err)
if 'writepolicy' in diffparams.keys():
writepolmod = diffparams['writepolicy']
if writepolmod == 'auto':
rc, _, err = module.run_command("%s "
"changeWritePolicy "
"--name=%s "
"--writePolicy=%s"
% (vdo_cmd,
desiredvdo,
writepolmod))

if rc == 0:
result['changed'] = True
else:
module.fail_json(msg="Changing write policy on "
"VDO volume %s failed."
% desiredvdo, rc=rc, err=err)

if writepolmod == 'sync':
rc, _, err = module.run_command("%s "
"changeWritePolicy "
"--name=%s "
"--writePolicy=%s"
% (vdo_cmd,
desiredvdo,
writepolmod))

if rc == 0:
result['changed'] = True
else:
module.fail_json(msg="Changing write policy on "
"VDO volume %s failed."
% desiredvdo, rc=rc, err=err)

if writepolmod == 'async':
rc, _, err = module.run_command("%s "
"changeWritePolicy "
"--name=%s "
"--writePolicy=%s"
% (vdo_cmd,
desiredvdo,
writepolmod))

if rc == 0:
result['changed'] = True
else:
module.fail_json(msg="Changing write policy on "
"VDO volume %s failed."
% desiredvdo, rc=rc, err=err)

# Process the size parameters, to determine of a growPhysical or
# growLogical operation needs to occur.
Expand Down
7 changes: 3 additions & 4 deletions examples/nagios/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017 Red Hat, Inc.
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -16,10 +16,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# $Id: //eng/vdo-releases/magnesium/src/packaging/src-dist/user/examples/nagios/Makefile#2 $
# $Id: //eng/vdo-releases/magnesium-rhel7.5/src/packaging/src-dist/user/examples/nagios/Makefile#1 $

INSTALLFILES=nagios_check_albserver.pl \
nagios_check_vdostats_logicalSpace.pl \
INSTALLFILES=nagios_check_vdostats_logicalSpace.pl \
nagios_check_vdostats_physicalSpace.pl \
nagios_check_vdostats_savingPercent.pl

Expand Down
4 changes: 2 additions & 2 deletions examples/nagios/nagios_check_albserver.pl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl

##
# Copyright (c) 2017 Red Hat, Inc.
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -29,7 +29,7 @@
# this program should be granted permission via sudoers (with the "NOPASSWD:"
# option) to execute the "vdo" program.
#
# $Id: //eng/vdo-releases/magnesium/src/tools/nagios/nagios_check_albserver.pl#1 $
# $Id: //eng/vdo-releases/magnesium-rhel7.5/src/tools/nagios/nagios_check_albserver.pl#1 $
#
##

Expand Down
4 changes: 2 additions & 2 deletions examples/nagios/nagios_check_vdostats_logicalSpace.pl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl

##
# Copyright (c) 2017 Red Hat, Inc.
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -36,7 +36,7 @@
#
# The "vdostats" program must be in the path used by "sudo".
#
# $Id: //eng/vdo-releases/magnesium/src/tools/nagios/nagios_check_vdostats_logicalSpace.pl#1 $
# $Id: //eng/vdo-releases/magnesium-rhel7.5/src/tools/nagios/nagios_check_vdostats_logicalSpace.pl#1 $
#
##

Expand Down
4 changes: 2 additions & 2 deletions examples/nagios/nagios_check_vdostats_physicalSpace.pl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl

##
# Copyright (c) 2017 Red Hat, Inc.
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -36,7 +36,7 @@
#
# The "vdostats" program must be in the path used by "sudo".
#
# $Id: //eng/vdo-releases/magnesium/src/tools/nagios/nagios_check_vdostats_physicalSpace.pl#1 $
# $Id: //eng/vdo-releases/magnesium-rhel7.5/src/tools/nagios/nagios_check_vdostats_physicalSpace.pl#1 $
#
##

Expand Down
4 changes: 2 additions & 2 deletions examples/nagios/nagios_check_vdostats_savingPercent.pl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl

##
# Copyright (c) 2017 Red Hat, Inc.
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -36,7 +36,7 @@
#
# The "vdostats" program must be in the path used by "sudo".
#
# $Id: //eng/vdo-releases/magnesium/src/tools/nagios/nagios_check_vdostats_savingPercent.pl#1 $
# $Id: //eng/vdo-releases/magnesium-rhel7.5/src/tools/nagios/nagios_check_vdostats_savingPercent.pl#1 $
#
##

Expand Down
4 changes: 2 additions & 2 deletions examples/systemd/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017 Red Hat, Inc.
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# $Id: //eng/vdo-releases/magnesium/src/packaging/src-dist/user/examples/systemd/Makefile#2 $
# $Id: //eng/vdo-releases/magnesium-rhel7.5/src/packaging/src-dist/user/examples/systemd/Makefile#1 $

SERVICEFILE=vdo.service
EXAMPLEFILES=VDO.mount.example
Expand Down
4 changes: 2 additions & 2 deletions examples/systemd/vdo.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ After=systemd-remount-fs.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/vdo --confFile /etc/vdoconf.yml --vdoLogLevel info --all start
ExecStop=/usr/bin/vdo --confFile /etc/vdoconf.yml --vdoLogLevel info --all stop
ExecStart=/usr/bin/vdo start --all --confFile /etc/vdoconf.yml
ExecStop=/usr/bin/vdo stop --all --confFile /etc/vdoconf.yml

[Install]
WantedBy=multi-user.target
4 changes: 2 additions & 2 deletions utils/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017 Red Hat, Inc.
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -17,7 +17,7 @@
# 02110-1301, USA.
#

# $Id: //eng/vdo-releases/magnesium/src/packaging/src-dist/user/utils/Makefile#1 $
# $Id: //eng/vdo-releases/magnesium-rhel7.5/src/packaging/src-dist/user/utils/Makefile#1 $

SUBDIRS = uds vdo

Expand Down
6 changes: 3 additions & 3 deletions utils/uds/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017 Red Hat, Inc.
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -16,13 +16,13 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# $Id: //eng/vdo-releases/magnesium/src/packaging/src-dist/user/utils/uds/Makefile#3 $
# $Id: //eng/vdo-releases/magnesium-rhel7.5/src/packaging/src-dist/user/utils/uds/Makefile#1 $

# UDS_INTERNAL_VERSION is the short version name, which is used to version the
# UDS interfaces exported from libuds.so. DISTRIBUTION_VERSION is the long
# version name used in distribution builds. We extract these values from the
# traditional location.
UDS_VERSION = 6.1.0.32
UDS_VERSION = 6.1.0.41
BUILD_VERSION = $(UDS_VERSION)
DISTRO_CODENAME := $(shell lsb_release -s -c)

Expand Down
4 changes: 2 additions & 2 deletions utils/uds/accessMode.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2017 Red Hat, Inc.
* Copyright (c) 2018 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand All @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* $Id: //eng/uds-releases/flanders/src/uds/accessMode.h#2 $
* $Id: //eng/uds-releases/flanders-rhel7.5/src/uds/accessMode.h#1 $
**/

#ifndef ACCESS_MODE_H
Expand Down
Loading

0 comments on commit 0da9d8a

Please # to comment.