mvds-bbtk commented on issue #13292:
URL: https://github.com/apache/cloudstack/issues/13292#issuecomment-5815174148
@DaanHoogland I checked the code with AI and as far as I can interpret
correctly it seems to be only used to retrieve UUID info when vhd disk files
are stored on block storage. NFS based storage doesn't seem to use this module.
Here are all the lvhdutil module references in this file:
Import
import lvhdutil (top of file)
Usages (4 total)
getPrimarySRPath() — builds the SR path for iSCSI storage:
python
primarySRDir = lvhdutil.VG_PREFIX + primaryStorageSRUuid
return os.path.join(lvhdutil.VG_LOCATION, primarySRDir)
Uses two module-level constants: lvhdutil.VG_PREFIX and lvhdutil.VG_LOCATION.
scanParent() — resolves the parent UUID of an LVM-backed VHD:
python
vhdInfo = vhdutil.getVHDInfoLVM(lvName, lvhdutil.extractUuid, vgName)
Passes lvhdutil.extractUuid as a callback/function reference (not called
directly here — it's handed to vhdutil.getVHDInfoLVM).
getParent() — for the iSCSI branch, resolves a VHD's parent:
python
parentUUID = vhdutil.getParent(path, lvhdutil.extractUuid)
Again, lvhdutil.extractUuid is passed as a callback, this time to
vhdutil.getParent.
I've put a message in the XCP-NG forum to ask for the replacement module
that can provide the same functionality. For my particular situation, I think
just skipping the load of the lvhdutil will not impact any storage operations
since the lvhdutil is behind the isISCSI branch, f.e.
def getPrimarySRPath(primaryStorageSRUuid, isISCSI):
if isISCSI:
primarySRDir = lvhdutil.VG_PREFIX + primaryStorageSRUuid
return os.path.join(lvhdutil.VG_LOCATION, primarySRDir)
else:
return os.path.join(SR.MOUNT_BASE, primaryStorageSRUuid)
So in case of NFS storage I guess the isISCSI branch is false and lvhdutil
isn't used.
Marc
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]