Ravi Nori has uploaded a new change for review.

Change subject: core :  Invalid action group identifiers in the roles_groups 
table
......................................................................

core :  Invalid action group identifiers in the roles_groups table

invalid action groups in roles_groups table causes
NPE when listing permits using restapi.

The roles groups 130 and 131 as listed in roles_groups
table are not valid role group ids and are can be safely
removed. The ids were erroneosuly ntroduced into the
roles_groups table by commit c89b145f12d77a7271d63073d5.
The correct action group id for install vds and
upgrade oVirtNode is 101(EDIT_HOST_CONFIGURATION) and
is already present in the roles_groups table.

Change-Id: Ib511e7c3a657c884a92ddee5e7972bd3e7a95497
Bug-Url: https://bugzilla.redhat.com/1139533
Signed-off-by: Ravi Nori <[email protected]>
---
A 
packaging/dbscripts/upgrade/03_06_0360_remove_install_vds_upgrade_ovirt_node_action_group.sql
1 file changed, 38 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/23/32723/1

diff --git 
a/packaging/dbscripts/upgrade/03_06_0360_remove_install_vds_upgrade_ovirt_node_action_group.sql
 
b/packaging/dbscripts/upgrade/03_06_0360_remove_install_vds_upgrade_ovirt_node_action_group.sql
new file mode 100644
index 0000000..15b9af7
--- /dev/null
+++ 
b/packaging/dbscripts/upgrade/03_06_0360_remove_install_vds_upgrade_ovirt_node_action_group.sql
@@ -0,0 +1,38 @@
+-- remove install vds action group(130) and upgrade oVirt Node action group 
(131) to predefined roles
+Create or replace FUNCTION 
__temp_remove_install_vds_upgrade_node_action_group_03_06_0360()
+RETURNS VOID
+   AS $procedure$
+   DECLARE
+   v_SUPER_USER_ID_0001 UUID;
+   v_DATA_CENTER_ADMIN_ID UUID;
+   v_CLUSTER_ADMIN_ID UUID;
+
+BEGIN
+   v_SUPER_USER_ID_0001 := '00000000-0000-0000-0000-000000000001';
+   v_DATA_CENTER_ADMIN_ID := 'DEF00002-0000-0000-0000-DEF000000002';
+   v_CLUSTER_ADMIN_ID := 'DEF00001-0000-0000-0000-DEF000000001';
+
+-------------------------
+--- Update SuperUser role
+-------------------------
+DELETE FROM roles_groups WHERE role_id = v_SUPER_USER_ID_0001 AND 
action_group_id=130;
+DELETE FROM roles_groups WHERE role_id = v_SUPER_USER_ID_0001 AND 
action_group_id=131;
+
+--------------------------------
+-- UPDATE DATA_CENTER_ADMIN role
+--------------------------------
+DELETE FROM roles_groups WHERE role_id = v_DATA_CENTER_ADMIN_ID AND 
action_group_id=130;
+DELETE FROM roles_groups WHERE role_id = v_DATA_CENTER_ADMIN_ID AND 
action_group_id=131;
+
+--------------------------------
+-- UPDATE CLUSTER_ADMIN role
+--------------------------------
+DELETE FROM roles_groups WHERE role_id = v_CLUSTER_ADMIN_ID AND 
action_group_id=130;
+DELETE FROM roles_groups WHERE role_id = v_CLUSTER_ADMIN_ID AND 
action_group_id=131;
+
+RETURN;
+END; $procedure$
+LANGUAGE plpgsql;
+
+SELECT __temp_remove_install_vds_upgrade_node_action_group_03_06_0360();
+DROP function __temp_remove_install_vds_upgrade_node_action_group_03_06_0360();


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib511e7c3a657c884a92ddee5e7972bd3e7a95497
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to