Eli Mesika has posted comments on this change.

Change subject: [WIP] core: adding unlock_disks.sh script(#868638)
......................................................................


Patch Set 6: (5 inline comments)

....................................................
File backend/manager/dbscripts/dbfunctions.sh
Line 380:    echo $(execute_command "${cmd}" ${DATABASE} ${SERVERNAME} ${PORT} 
| sed 's/^ *//g' | head -2 | tail -1 | tr -d ' ')
Line 381: }
Line 382: 
Line 383: #unlocks the given VM/Template disks or a given disk
Line 384: #in case of VM/Template the id is the name, in case of a disk, the id 
is teh disk UUID
Done
Line 385: unlock_disks() {
Line 386:    local object_type=${1}
Line 387:    local id=${2}
Line 388: 


Line 397: 
Line 398:    if [ "${CMD}" != "" ]; then
Line 399:        execute_command "$CMD" "${DATABASE}" "${SERVERNAME}" "${PORT}"
Line 400:        if [ $? -eq 0 ]; then
Line 401:            printf "unlock_disks completes successfully."
Done
Line 402:        else
Line 403:            printf "unlock_disks completes with errors.."
Line 404:        fi
Line 405:    fi


Line 399:        execute_command "$CMD" "${DATABASE}" "${SERVERNAME}" "${PORT}"
Line 400:        if [ $? -eq 0 ]; then
Line 401:            printf "unlock_disks completes successfully."
Line 402:        else
Line 403:            printf "unlock_disks completes with errors.."
Done
Line 404:        fi
Line 405:    fi


....................................................
File backend/manager/dbscripts/unlock_disks.sh
Line 44:     esac
Line 45: done
Line 46: 
Line 47: if [[ -n "${TYPE}" -a -n "${ID}" ]]; then
Line 48:     unlock_disks ${TYPE} ${ID}
No, those values has defaults and can be overridden by giving them in the 
command parameters , the variables representing them are visible to all 
functions including the unlock_disks function
Line 49: else
Line 50:     usage();
Line 51: fi
Line 52: 


....................................................
Commit Message
Line 5: CommitDate: 2012-10-23 17:38:53 +0200
Line 6: 
Line 7: [WIP] core: adding unlock_disks.sh script(#868638)
Line 8: 
Line 9: Adding a new script that enables to unlock all VM/Template disks or a
Changed the text as requested 

About displaying what is locked , maybe adding a -l flag ?
What do you think ?
Line 10: specific disk if it is in the LOCKED state.
Line 11: Only plugged disks are considered as candidates of this command.
Line 12: 
Line 13: The new script can be invoked basically by


--
To view, visit http://gerrit.ovirt.org/8688
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3f1712fb945933d92ee9a6b97bc71d4ba3a01597
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Ayal Baron <aba...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Itamar Heim <ih...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to