Change in vdsm[master]: gluster: Unbreak gluster management
nsoffer at redhat.com
nsoffer at redhat.com
Fri Nov 20 21:40:25 UTC 2015
Nir Soffer has uploaded a new change for review.
Change subject: gluster: Unbreak gluster management
......................................................................
gluster: Unbreak gluster management
In commit 61d7427fc1 (build: Introduce --enable-gluster-mgmt option) we
renamed makePublic, but only for the cli module used by vdsm, breaking
gluster management.
Since there are no tests for this code, the breakage was hidden. The
only clue was a skipped test in gluster_cli_tests:
test_parseStorageDevices SKIP: cannot import name makePublic
This patch completes the partial rename.
Change-Id: I7efeb994e15f397714cbbd9d8f4c1882f3cb1c15
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M vdsm/gluster/api.py
M vdsm/gluster/gfapi.py
M vdsm/gluster/hooks.py
M vdsm/gluster/services.py
M vdsm/gluster/storagedev.py
M vdsm/gluster/tasks.py
6 files changed, 28 insertions(+), 28 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/48872/1
diff --git a/vdsm/gluster/api.py b/vdsm/gluster/api.py
index 47d5dda..24a1352 100644
--- a/vdsm/gluster/api.py
+++ b/vdsm/gluster/api.py
@@ -30,7 +30,7 @@
from storage import mount
import exception as ge
-from . import makePublic
+from . import gluster_mgmt_api
from . import safeWrite
import fstab
import logging
@@ -109,7 +109,7 @@
return additionalFeatures
- at makePublic
+ at gluster_mgmt_api
def getGeoRepKeys():
try:
with open(GEOREP_PUB_KEY_PATH, 'r') as f:
@@ -119,7 +119,7 @@
return pubKeys
- at makePublic
+ at gluster_mgmt_api
def updateGeoRepKeys(userName, geoRepPubKeys):
try:
userInfo = getpwnam(userName)
@@ -170,7 +170,7 @@
raise ge.GlusterGeoRepPublicKeyWriteFailedException(err=[str(e)])
- at makePublic
+ at gluster_mgmt_api
def createMountBrokerRoot(userName):
try:
getpwnam(userName)
@@ -185,7 +185,7 @@
return
- at makePublic
+ at gluster_mgmt_api
def mountMetaVolume(metaVolumeName):
def _metaVolumeFstabUpdate(metaVolumeName):
try:
@@ -232,7 +232,7 @@
return True
- at makePublic
+ at gluster_mgmt_api
def snapshotScheduleDisable():
command = [_snapSchedulerPath.cmd, "disable_force"]
rc, out, err = utils.execCmd(command)
@@ -242,7 +242,7 @@
return True
- at makePublic
+ at gluster_mgmt_api
def snapshotScheduleFlagUpdate(value):
if not os.path.exists(LOCK_FILE_DIR):
try:
@@ -271,7 +271,7 @@
return True
- at makePublic
+ at gluster_mgmt_api
def processesStop():
command = ["/bin/sh", _stopAllProcessesPath.cmd]
rc, out, err = utils.execCmd(command)
diff --git a/vdsm/gluster/gfapi.py b/vdsm/gluster/gfapi.py
index e5105fc..ab4e079 100644
--- a/vdsm/gluster/gfapi.py
+++ b/vdsm/gluster/gfapi.py
@@ -22,7 +22,7 @@
import os
import exception as ge
-from . import makePublic
+from . import gluster_mgmt_api
GLUSTER_VOL_PROTOCOL = 'tcp'
@@ -95,7 +95,7 @@
raise ge.GlfsFiniException(rc=rc)
- at makePublic
+ at gluster_mgmt_api
def volumeStatvfsGet(volumeId, host=GLUSTER_VOL_HOST,
port=GLUSTER_VOL_PORT,
protocol=GLUSTER_VOL_PROTOCOL):
@@ -211,7 +211,7 @@
from vdsm import utils
- at makePublic
+ at gluster_mgmt_api
def volumeStatvfs(volumeName, host=GLUSTER_VOL_HOST,
port=GLUSTER_VOL_PORT,
protocol=GLUSTER_VOL_PROTOCOL):
@@ -242,7 +242,7 @@
res['f_namemax']))
- at makePublic
+ at gluster_mgmt_api
def volumeEmptyCheck(volumeName, host=GLUSTER_VOL_HOST,
port=GLUSTER_VOL_PORT,
protocol=GLUSTER_VOL_PROTOCOL):
diff --git a/vdsm/gluster/hooks.py b/vdsm/gluster/hooks.py
index 1d662bc..7f8013e 100644
--- a/vdsm/gluster/hooks.py
+++ b/vdsm/gluster/hooks.py
@@ -28,7 +28,7 @@
import selinux
import exception as ge
from functools import wraps
-from . import makePublic
+from . import gluster_mgmt_api
from . import safeWrite
_glusterHooksPath = '/var/lib/glusterd/hooks/1'
@@ -80,7 +80,7 @@
return wrapper
- at makePublic
+ at gluster_mgmt_api
def hooksList():
"""
It scans files which starts from HookStatus.ENABLE or HookStatus.DISABLE
@@ -140,7 +140,7 @@
@checkArgs
- at makePublic
+ at gluster_mgmt_api
def hookEnable(glusterCmd, hookLevel, hookName):
enabledFile, disabledFile = _getHookFileNames(glusterCmd,
hookLevel.lower(), hookName)
@@ -161,7 +161,7 @@
@checkArgs
- at makePublic
+ at gluster_mgmt_api
def hookDisable(glusterCmd, hookLevel, hookName):
enabledFile, disabledFile = _getHookFileNames(glusterCmd,
hookLevel.lower(), hookName)
@@ -180,7 +180,7 @@
@checkArgs
- at makePublic
+ at gluster_mgmt_api
def hookRead(glusterCmd, hookLevel, hookName):
"""
Returns:
@@ -234,7 +234,7 @@
@checkArgs
- at makePublic
+ at gluster_mgmt_api
def hookUpdate(glusterCmd, hookLevel, hookName, hookData, hookMd5Sum):
try:
return _hookUpdateOrAdd(glusterCmd, hookLevel, hookName, hookData,
@@ -245,7 +245,7 @@
@checkArgs
- at makePublic
+ at gluster_mgmt_api
def hookAdd(glusterCmd, hookLevel, hookName, hookData, hookMd5Sum,
enable=False):
hookPath = os.path.join(_glusterHooksPath, glusterCmd, hookLevel.lower())
@@ -270,7 +270,7 @@
@checkArgs
- at makePublic
+ at gluster_mgmt_api
def hookRemove(glusterCmd, hookLevel, hookName):
enabledFile, disabledFile = _getHookFileNames(glusterCmd,
hookLevel.lower(),
diff --git a/vdsm/gluster/services.py b/vdsm/gluster/services.py
index 385a00f..782afb6 100644
--- a/vdsm/gluster/services.py
+++ b/vdsm/gluster/services.py
@@ -20,7 +20,7 @@
import exception as ge
from vdsm.tool import service
-from . import makePublic
+from . import gluster_mgmt_api
SUPPORTED_SERVICES = frozenset(("glusterd",
@@ -109,7 +109,7 @@
return statusOutput
- at makePublic
+ at gluster_mgmt_api
def servicesAction(serviceNames, action):
"""
Returns:
@@ -120,7 +120,7 @@
return _action(serviceNames, action)
- at makePublic
+ at gluster_mgmt_api
def servicesGet(serviceNames):
"""
Returns:
diff --git a/vdsm/gluster/storagedev.py b/vdsm/gluster/storagedev.py
index 1e4402c..7ce4498 100644
--- a/vdsm/gluster/storagedev.py
+++ b/vdsm/gluster/storagedev.py
@@ -36,7 +36,7 @@
import fstab
import exception as ge
-from . import makePublic
+from . import gluster_mgmt_api
log = logging.getLogger("Gluster")
@@ -123,14 +123,14 @@
log.error("Error: %s" % e.message)
- at makePublic
+ at gluster_mgmt_api
def storageDevicesList():
blivetEnv = blivet.Blivet()
_reset_blivet(blivetEnv)
return _parseDevices(blivetEnv.devices)
- at makePublic
+ at gluster_mgmt_api
def createBrick(brickName, mountPoint, devNameList, fsType=DEFAULT_FS_TYPE,
raidParams={}):
def _getDeviceList(devNameList):
diff --git a/vdsm/gluster/tasks.py b/vdsm/gluster/tasks.py
index 8defd9b..c531785 100644
--- a/vdsm/gluster/tasks.py
+++ b/vdsm/gluster/tasks.py
@@ -20,7 +20,7 @@
import logging
import exception as ge
-from . import makePublic
+from . import gluster_mgmt_api
from . import cli
from cli import TaskType
@@ -51,7 +51,7 @@
"data": summary}
- at makePublic
+ at gluster_mgmt_api
def tasksList(taskIds=[]):
details = {}
tasks = cli.volumeTasks()
--
To view, visit https://gerrit.ovirt.org/48872
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7efeb994e15f397714cbbd9d8f4c1882f3cb1c15
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
More information about the vdsm-patches
mailing list