diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_backend_gluster.c index 30a41369a3cc3e86c2147a7ab1f69cc6c9421a82..93dce4042f80b9690b118eac1fe8391335bad920 100644 --- a/src/storage/storage_backend_gluster.c +++ b/src/storage/storage_backend_gluster.c @@ -537,9 +537,22 @@ virStorageBackendGlusterFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED, } +static int +virStorageBackendGlusterCheckPool(virStoragePoolObjPtr pool, + bool *active) +{ + /* Return previous state remembered by the status XML. If the pool is not + * available we will fail to refresh it and end up in the same situation. + * This will save one attempt to open the connection to the remote server */ + *active = pool->active; + return 0; +} + + virStorageBackend virStorageBackendGluster = { .type = VIR_STORAGE_POOL_GLUSTER, + .checkPool = virStorageBackendGlusterCheckPool, .refreshPool = virStorageBackendGlusterRefreshPool, .findPoolSources = virStorageBackendGlusterFindPoolSources,