Skip to content

Commit

Permalink
Version 6.1.1.24
Browse files Browse the repository at this point in the history
- Modified spec files to work with the Fedora copr repository.
- Removed obsolete nagios module.
- Fixed prerun handling of loaded kernel modules
- Modified spec files to use systemd macros
- Updated the vdo.8 man page
- Improved some error messages
  • Loading branch information
corwin committed Mar 22, 2018
1 parent 9a40834 commit 75add3b
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 123 deletions.
98 changes: 0 additions & 98 deletions examples/nagios/nagios_check_albserver.pl

This file was deleted.

1 change: 1 addition & 0 deletions examples/systemd/97-vdo.preset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable vdo.service
7 changes: 6 additions & 1 deletion examples/systemd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@
# 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/src/packaging/src-dist/user/examples/systemd/Makefile#3 $

SERVICEFILE=vdo.service
EXAMPLEFILES=VDO.mount.example
PRESETFILE=97-vdo.preset

INSTALL = install
INSTALLOWNER ?= -o root -g root
unitdir ?= /lib/systemd/system
presetdir ?= /lib/systemd/system-preset
defaultdocdir ?= /usr/share/doc
name ?= vdo

INSTALLDIR=$(DESTDIR)/$(unitdir)
EXAMPLESDIR=$(DESTDIR)/$(defaultdocdir)/$(name)/examples/systemd
PRESETDIR=$(DESTDIR)/$(presetdir)

.PHONY: all clean install
all:;
Expand All @@ -38,6 +41,8 @@ clean:;
install:
$(INSTALL) $(INSTALLOWNER) -d $(INSTALLDIR)
$(INSTALL) $(INSTALLOWNER) -m 644 $(SERVICEFILE) $(INSTALLDIR)
$(INSTALL) $(INSTALLOWNER) -d $(PRESETDIR)
$(INSTALL) $(INSTALLOWNER) -m 644 $(PRESETFILE) $(PRESETDIR)
$(INSTALL) -d $(EXAMPLESDIR)
for i in $(EXAMPLEFILES); do \
$(INSTALL) $(INSTALLOWNER) -m 644 $$i $(EXAMPLESDIR); \
Expand Down
2 changes: 1 addition & 1 deletion utils/vdo/base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
# $Id: //eng/vdo-releases/magnesium/src/packaging/src-dist/user/utils/vdo/base/Makefile#1 $

VDO_VERSION = 6.1.1.12
VDO_VERSION = 6.1.1.24

UDS_DIR = ../../uds

Expand Down
5 changes: 3 additions & 2 deletions utils/vdo/base/statusCodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* $Id: //eng/vdo-releases/magnesium/src/c++/vdo/base/statusCodes.c#3 $
* $Id: //eng/vdo-releases/magnesium/src/c++/vdo/base/statusCodes.c#5 $
*/

#include "statusCodes.h"
Expand Down Expand Up @@ -44,7 +44,7 @@ const struct errorInfo vdoStatusList[] = {
{ "VDO_BLOCK_SIZE_TOO_SMALL", "The block size is too small" },
{ "VDO_UNKNOWN_PARTITION", "No partition exists with a given id" },
{ "VDO_PARTITION_EXISTS", "A partition already exists with a given id"},
{ "VDO_NOT_CLEAN", "The device is not in a clean state" },
{ "VDO_NOT_READ_ONLY", "The device is not in read-only mode" },
{ "VDO_INCREMENT_TOO_SMALL", "Physical block growth of too few blocks" },
{ "VDO_CHECKSUM_MISMATCH", "Incorrect checksum" },
{ "VDO_RECOVERY_JOURNAL_FULL", "The recovery journal is full" },
Expand All @@ -62,6 +62,7 @@ const struct errorInfo vdoStatusList[] = {
{ "VDO_READ_CACHE_BUSY", "Read cache has no free slots" },
{ "VDO_BIO_CREATION_FAILED", "Bio creation failed" },
{ "VDO_BAD_MAGIC", "Bad magic number" },
{ "VDO_BAD_NONCE", "Bad nonce" },
{ "VDO_JOURNAL_OVERFLOW", "Journal sequence number overflow" },
};

Expand Down
8 changes: 5 additions & 3 deletions utils/vdo/base/statusCodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* $Id: //eng/vdo-releases/magnesium/src/c++/vdo/base/statusCodes.h#3 $
* $Id: //eng/vdo-releases/magnesium/src/c++/vdo/base/statusCodes.h#5 $
*/

#ifndef STATUS_CODES_H
Expand Down Expand Up @@ -72,8 +72,8 @@ enum vdoStatusCodes {
VDO_UNKNOWN_PARTITION,
/** a partition already exists with a given id */
VDO_PARTITION_EXISTS,
/** the VDO is not in a clean state */
VDO_NOT_CLEAN,
/** the VDO is not in read-only mode */
VDO_NOT_READ_ONLY,
/** physical block growth of too few blocks */
VDO_INCREMENT_TOO_SMALL,
/** incorrect checksum */
Expand Down Expand Up @@ -108,6 +108,8 @@ enum vdoStatusCodes {
VDO_BIO_CREATION_FAILED,
/** bad magic number */
VDO_BAD_MAGIC,
/** bad nonce */
VDO_BAD_NONCE,
/** sequence number overflow */
VDO_JOURNAL_OVERFLOW,
/** one more than last error code */
Expand Down
4 changes: 3 additions & 1 deletion utils/vdo/base/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* $Id: //eng/vdo-releases/magnesium/src/c++/vdo/base/types.h#5 $
* $Id: //eng/vdo-releases/magnesium/src/c++/vdo/base/types.h#6 $
*/

#ifndef TYPES_H
Expand Down Expand Up @@ -336,6 +336,8 @@ typedef struct vdoConfig {
typedef struct vdoLoadConfig {
/** the offset on the physical layer where the VDO begins */
PhysicalBlockNumber firstBlockOffset;
/** the expected nonce of the VDO */
Nonce nonce;
/** the thread configuration of the VDO */
ThreadConfig *threadConfig;
/** the page cache size, in pages */
Expand Down
9 changes: 8 additions & 1 deletion utils/vdo/base/vdoLoad.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* $Id: //eng/vdo-releases/magnesium/src/c++/vdo/base/vdoLoad.c#3 $
* $Id: //eng/vdo-releases/magnesium/src/c++/vdo/base/vdoLoad.c#5 $
*/

#include "vdoLoad.h"
Expand Down Expand Up @@ -261,6 +261,12 @@ static int startVDODecode(VDO *vdo, bool validateConfig)
return VDO_SUCCESS;
}

if (vdo->loadConfig.nonce != vdo->nonce) {
return logErrorWithStringError(VDO_BAD_NONCE, "Geometry nonce %" PRIu64
" does not match superblock nonce %" PRIu64,
vdo->loadConfig.nonce, vdo->nonce);
}

BlockCount blockCount = vdo->layer->getBlockCount(vdo->layer);
return validateVDOConfig(&vdo->config, blockCount, true);
}
Expand Down Expand Up @@ -540,6 +546,7 @@ int loadVDO(PhysicalLayer *layer,
}

vdo->loadConfig.firstBlockOffset = getDataRegionOffset(geometry);
vdo->loadConfig.nonce = geometry.nonce;
result = loadSuperBlock(layer, getFirstBlockOffset(vdo), &vdo->superBlock);
if (result != VDO_SUCCESS) {
freeVDO(&vdo);
Expand Down
2 changes: 1 addition & 1 deletion utils/vdo/user/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# $Id: //eng/vdo-releases/magnesium/src/packaging/src-dist/user/utils/vdo/user/Makefile#3 $

VDO_VERSION = 6.1.1.12
VDO_VERSION = 6.1.1.24

UDS_DIR = ../../uds
VDO_BASE_DIR = ../base
Expand Down
4 changes: 2 additions & 2 deletions utils/vdo/user/vdoConfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* $Id: //eng/vdo-releases/magnesium/src/c++/vdo/user/vdoConfig.c#5 $
* $Id: //eng/vdo-releases/magnesium/src/c++/vdo/user/vdoConfig.c#6 $
*/

#include <uuid/uuid.h>
Expand Down Expand Up @@ -354,7 +354,7 @@ static int updateVDOSuperBlockState(PhysicalLayer *layer,

if (requireReadOnly && !inReadOnlyMode(vdo)) {
freeVDO(&vdo);
return logErrorWithStringError(VDO_NOT_CLEAN,
return logErrorWithStringError(VDO_NOT_READ_ONLY,
"Can't force rebuild on a normal VDO");
}

Expand Down
10 changes: 5 additions & 5 deletions vdo-manager/man/vdo.8
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
.\" 02110-1301, USA.
.\"
.\" $Id: //eng/vdo-releases/magnesium/src/python/vdo/man/vdo.8#11 $
.\" $Id: //eng/vdo-releases/magnesium/src/python/vdo/man/vdo.8#13 $
.
.\" Constants (as strings, for ease of use and consistency)
.ds ackThreadsDefault 1
Expand All @@ -43,8 +43,8 @@
.ds cpuThreadsMax 100
.ds deduplicationDefault enabled
.ds emulate512Default disabled
.ds hashZoneThreadsDefault 2
.ds hashZoneThreadsMin 1
.ds hashZoneThreadsDefault 1
.ds hashZoneThreadsMin 0
.ds hashZoneThreadsMax 100
.ds indexMemDefault 0.25
.ds indexMemIntMin 1
Expand Down Expand Up @@ -453,8 +453,8 @@ The logical size of the VDO volume.
.B Physical size
The size of a VDO volume's underlying physical storage.
.TP
.B Write policy
The configured value of the write policy (sync or async).
.B Configured write policy
The configured value of the write policy (sync, async or auto).
.TP
.B VDO Statistics
Output of the \fBvdostats\fP utility.
Expand Down
25 changes: 17 additions & 8 deletions vdo.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Summary: Management tools for Virtual Data Optimizer
Name: vdo
Version: 6.1.1.12
Version: 6.1.1.24
Release: %{spec_release}
License: GPLv2
Source: %{name}-%{version}.tgz
Expand All @@ -30,6 +30,7 @@ BuildRequires: python-devel
BuildRequires: systemd
BuildRequires: valgrind-devel
BuildRequires: zlib-devel
%{?systemd_requires}

# Disable an automatic dependency due to a file in examples/nagios.
%define __requires_exclude perl
Expand All @@ -50,13 +51,16 @@ make
make install DESTDIR=$RPM_BUILD_ROOT INSTALLOWNER= bindir=%{_bindir} \
defaultdocdir=%{_defaultdocdir} name=%{name} \
python_sitelib=%{python_sitelib} mandir=%{_mandir} \
unitdir=%{_unitdir}
unitdir=%{_unitdir} presetdir=%{_presetdir}

%post
systemctl enable vdo.service || :
%systemd_post vdo.service

%preun
systemctl disable vdo.service || :
%systemd_preun vdo.service

%postun
%systemd_postun_with_restart vdo.service

%files
#defattr(-,root,root)
Expand Down Expand Up @@ -162,6 +166,7 @@ systemctl disable vdo.service || :
%{python_sitelib}/%{name}/utils/__init__.pyc
%{python_sitelib}/%{name}/utils/__init__.pyo
%{_unitdir}/vdo.service
%{_presetdir}/97-vdo.preset
%dir %{_defaultdocdir}/%{name}
%license %{_defaultdocdir}/%{name}/COPYING
%dir %{_defaultdocdir}/%{name}/examples
Expand Down Expand Up @@ -191,7 +196,11 @@ systemctl disable vdo.service || :


%changelog
* Sat Feb 17 2018 - J. corwin Coburn <[email protected]> - 6.1.1.12-1
- Added support for 4.15 kernels.
- Modified spec files to support building on more distros.
- Removed unused code from the UDS module.
* Thu Mar 22 2018 - J. corwin Coburn <[email protected]> - 6.1.1.24-1
- Modified spec files to work with the Fedora copr repository.
- Removed obsolete nagios module.
- Fixed prerun handling of loaded kernel modules
- Modified spec files to use systemd macros
- Updated the vdo.8 man page
- Improved some error messages

0 comments on commit 75add3b

Please sign in to comment.