Alon Bar-Lev has uploaded a new change for review. Change subject: packaging: move /rhev/data-center to /var/lib/vdsm/data-center ......................................................................
packaging: move /rhev/data-center to /var/lib/vdsm/data-center rhev is a trademark should not be in ovirt. It is not FHS compliant to add /whatever to filesystem. Change-Id: I4ed316fedbf2e4d7e5bf741b7c77a39704994ae7 Signed-off-by: Alon Bar-Lev <[email protected]> --- M configure.ac M tests/getAllVolumesTests.py M vdsm.spec.in M vdsm/storage/fileSD.py M vdsm/storage/fileVolume.py 5 files changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/8500/1 diff --git a/configure.ac b/configure.ac index 450f714..665f1c6 100644 --- a/configure.ac +++ b/configure.ac @@ -75,7 +75,7 @@ AC_SUBST([vdsmexecdir], ['${libexecdir}/vdsm']) AC_SUBST([vdsmhooksdir], ['${vdsmexecdir}/hooks']) AC_SUBST([vdsmtsdir], ['${sysconfdir}/pki/vdsm']) -AC_SUBST([vdsmrepo], ['/rhev/data-center']) +AC_SUBST([vdsmrepo], ['${vdsmlibdir}/data-center']) AC_SUBST([vdsmpylibdir], ['${pyexecdir}/vdsm']) AC_SUBST([vdsmtooldir], ['${vdsmpylibdir}/tool']) AC_SUBST([vdsmtestsdir], ['${datarootdir}/vdsm/tests']) diff --git a/tests/getAllVolumesTests.py b/tests/getAllVolumesTests.py index ffc12c5..fe4c7b9 100644 --- a/tests/getAllVolumesTests.py +++ b/tests/getAllVolumesTests.py @@ -62,7 +62,7 @@ Input file name: 'glob_<sdName>.out Input file format: str(glob.glob(<imgsDir>)) When - <imgsDir> = /rhev/data-center/mnt/<mntPoint>/<sdName>/images/*.meta + <imgsDir> = @vdsmlibdir@/data-center/mnt/<mntPoint>/<sdName>/images/*.meta """ sdPath, globExp = volMetaPattern.split('/images') sdHead, sdName = os.path.split(sdPath) diff --git a/vdsm.spec.in b/vdsm.spec.in index 716489a..8e9fbba 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -460,6 +460,14 @@ fi %post +# upgrade old locations +if [ -d /rhev/data-center ]; then + mv /rhev/data-center %{_localstatedir}/lib/vdsm/data-center.new && \ + rm -rf %{_localstatedir}/lib/vdsm/data-center && + mv %{_localstatedir}/lib/vdsm/data-center.new %{_localstatedir}/lib/vdsm/data-center && + rm -rf /rhev +fi + # set the vdsm "secret" password for libvirt %{_bindir}/vdsm-tool set-saslpasswd diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py index 054fadb..bb0f0ba 100644 --- a/vdsm/storage/fileSD.py +++ b/vdsm/storage/fileSD.py @@ -64,7 +64,7 @@ def getDomUuidFromMetafilePath(metafile): # Metafile path has pattern: - # /rhev/data-center/mnt/export-path/sdUUID/dom_md/metadata + # @vdsmlibdir@/data-center/mnt/export-path/sdUUID/dom_md/metadata metaList = os.path.normpath(metafile).split('/') return metaList[-3] diff --git a/vdsm/storage/fileVolume.py b/vdsm/storage/fileVolume.py index 0aa9043..08fc8b8 100644 --- a/vdsm/storage/fileVolume.py +++ b/vdsm/storage/fileVolume.py @@ -40,7 +40,7 @@ def getDomUuidFromVolumePath(volPath): # Volume path has pattern: - # /rhev/data-center/spUUID/sdUUID/images/imgUUID/volUUID + # @vdsmlibdir@/data-center/spUUID/sdUUID/images/imgUUID/volUUID # sdUUID position after data-center sdUUIDPos = 3 -- To view, visit http://gerrit.ovirt.org/8500 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4ed316fedbf2e4d7e5bf741b7c77a39704994ae7 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
