Cleanup LV status computation
Cleanup LV status computation

Currently, when seeing if a LV is degraded or not (i.e. virtual volume),
we first attach to the device (which does an lvdisplay), then do a lvs
in order to display the lv_attr. This generates two external commands to
do (almost) the same thing.

This patch changes the Attach() method for LVs to call lvs and display
both the major/minor (needed for attach) and the lv_status (needed for
GetSyncStatus). Thus, later in GetSyncStatus, we don't need to run lvs
again, and instead just return the value computed in Attach().

Reviewed-by: imsnah


ganeti/ganeti,mbakke/ganeti,dimara/ganeti,dimara/ganeti,andir/ganeti,mbakke/ganeti,ganeti-github-testing/ganeti-test-1,ganeti/ganeti,yiannist/ganeti,onponomarev/ganeti,apyrgio/ganeti,grnet/snf-ganeti,leshchevds/ganeti,leshchevds/ganeti,bitemyapp/ganeti,andir/ganeti,leshchevds/ganeti,grnet/snf-ganeti,bitemyapp/ganeti,yiannist/ganeti,apyrgio/snf-ganeti,andir/ganeti,yiannist/ganeti,apyrgio/snf-ganeti,apyrgio/ganeti,ganeti-github-testing/ganeti-test-1,ganeti/ganeti,mbakke/ganeti,onponomarev/ganeti