extended error messages in casadm --failover-activate

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski 2021-11-30 15:41:32 +01:00
parent 5c1987440e
commit 8f53682954
2 changed files with 10 additions and 1 deletions

View File

@ -3011,5 +3011,10 @@ int failover_activate(int cache_id, const char *cache_device)
} }
} }
return cas_ioctl(KCAS_IOCTL_FAILOVER_ACTIVATE, &data); if (cas_ioctl(KCAS_IOCTL_FAILOVER_ACTIVATE, &data) != SUCCESS) {
print_err(data.ext_err_code ? : KCAS_ERR_SYSTEM);
return FAILURE;
}
return SUCCESS;
} }

View File

@ -178,6 +178,10 @@ struct {
OCF_ERR_CACHE_STANDBY, OCF_ERR_CACHE_STANDBY,
"Operation not permitted in failover standby mode" "Operation not permitted in failover standby mode"
}, },
{
OCF_ERR_FAILOVER_ATTACHED,
"Cache device is attached, please detach it first with --failover-detach"
},
/* CAS kernel error mappings*/ /* CAS kernel error mappings*/
{ {