Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,27 @@ public void storagePoolRefresh(StoragePool pool) {
}

private void checkNetfsStoragePoolMounted(String uuid) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is called only once by

if (type == StoragePoolType.NetworkFilesystem) {
checkNetfsStoragePoolMounted(name);
}

this PR seems not needed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeanvetorello
have you faced any issue in your testing ? any logs ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the help ,
I’m going to open an issue describing the problem in detail, along with the logs, to see if you can help resolve it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @jeanvetorello

did you face the issue #11697 when you test with this patch or not ?

String targetPath = _mountPoint + File.separator + uuid;
int mountpointResult = Script.runSimpleBashScriptForExitValue("mountpoint -q " + targetPath);
if (mountpointResult != 0) {
String errMsg = String.format("libvirt failed to mount storage pool %s at %s", uuid, targetPath);
logger.error(errMsg);
throw new CloudRuntimeException(errMsg);
try {
// lookup the storage pool definition
Connect conn = LibvirtConnection.getConnection();
StoragePool pool = conn.storagePoolLookupByUUIDString(uuid);
LibvirtStoragePoolDef def = getStoragePoolDef(conn, pool);

// Skip mountpoint check if pool type is RBD
if (def.getPoolType() == LibvirtStoragePoolDef.PoolType.RBD) {
logger.debug("Skipping mountpoint check for RBD pool " + uuid);
return;
}

String targetPath = _mountPoint + File.separator + uuid;
int mountpointResult = Script.runSimpleBashScriptForExitValue("mountpoint -q " + targetPath);
if (mountpointResult != 0) {
String errMsg = String.format("libvirt failed to mount storage pool %s at %s", uuid, targetPath);
logger.error(errMsg);
throw new CloudRuntimeException(errMsg);
}
} catch (LibvirtException e) {
throw new CloudRuntimeException("Failed to check storage pool type for " + uuid, e);
}
}

Expand Down
Loading