Alon Bar-Lev has posted comments on this change. Change subject: dbutils: Enable unlock utility handle all entities ......................................................................
Patch Set 2: (3 comments) https://gerrit.ovirt.org/#/c/38946/2/packaging/dbscripts/unlock_entity.sh File packaging/dbscripts/unlock_entity.sh: Line 19: -s HOST - The database servername for the database (def. ${DBFUNC_DB_HOST}) Line 20: -p PORT - The database port for the database (def. ${DBFUNC_DB_PORT}) Line 21: -u USER - The username for the database (def. ${DBFUNC_DB_USER}) Line 22: -d DATABASE - The database name (def. ${DBFUNC_DB_DATABASE}) Line 23: -t TYPE - The object type {all| vm | template | disk | snapshot} space after all to be consistent? Line 24: If "all" is used then no ENTITIES are expected. Line 25: -r - Recursive, unlocks all disks under the selected vm/template. Line 26: -q - Query db and display a list of the locked entites. Line 27: ENTITIES - The list of object names in case of vm/template, UUIDs in case of a disk Line 208: IDS="$@" Line 209: Line 210: [ -n "${TYPE}" ] || die "Please specify type" Line 211: [ -z "${IDS}" -a -z "${QUERY}" -a "${TYPE}" != "all" ] && die "Please specify ids or query" Line 212: [ -n "${IDS}" -a -n "${QUERY}" -a "${TYPE}" != "all" ] && die "Please specify one ids or query" nicer will be: [ -n "${TYPE}" ] || die "Please specify type" if [ "${TYPE}" != "all" ]; then [ -z "${IDS}" -a -z "${QUERY}" ] && die "Please specify ids or query" [ -n "${IDS}" -a -n "${QUERY}" ] && die "Please specify one ids or query" fi Line 213: Line 214: if [ -n "${QUERY}" ]; then Line 215: entity_query "${TYPE}" Line 216: else Line 214: if [ -n "${QUERY}" ]; then Line 215: entity_query "${TYPE}" Line 216: else Line 217: if [ "${TYPE}" = "all" ]; then Line 218: entity_unlock "${TYPE}" "" "$(whoami)" ${RECURSIVE} id -un will be better than legacy whoami Line 219: else Line 220: echo "Caution, this operation may lead to data corruption and should be used with care. Please contact support prior to running this command" Line 221: echo "Are you sure you want to proceed? [y/n]" Line 222: read answer -- To view, visit https://gerrit.ovirt.org/38946 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I494dece6ba871727750f3fccacd95490294bea6e Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Simone Tiraboschi <stira...@redhat.com> Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches