cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [2/2] git commit: updated refs/heads/4.9 to cc0e2a6
Date Mon, 22 Aug 2016 11:06:10 GMT
Merge pull request #1649 from shapeblue/4.9-upgraderolescriptfix

CLOUDSTACK-9463: Fix dynamic-roles migrate script for old formatThe old
format included the full class name such as:;1

The migration script did not consider this format and fails. With this fix
the migration script will process both the formats, including processing a file with mixed format, for example:

    $ cat
    ### Account commands

    $ python scripts/util/ -d -f
    Apache CloudStack Role Permission Migration Tool
    (c) Apache CloudStack Authors and the ASF, under the Apache License, Version 2.0

    Running this migration tool will remove any default-role permissions from cloud.role_permissions.
Do you want to continue? [y/N]y
    The file has been deprecated and moved at:
    Running SQL query: DELETE FROM `cloud`.`role_permissions` WHERE `role_id` in (1,2,3,4);
    Running SQL query: INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`,
`permission`, `sort_order`) values (UUID(), 1, '*', 'ALLOW', 0);
    Running SQL query: INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`,
`permission`, `sort_order`) values (UUID(), 2, 'deleteAccount', 'ALLOW', 0);
    Running SQL query: INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`,
`permission`, `sort_order`) values (UUID(), 2, 'markDefaultZoneForAccount', 'ALLOW', 1);
    Static role permissions from have been migrated into the db
    Running SQL query: UPDATE `cloud`.`configuration` SET value='true' where name='dynamic.apichecker.enabled'
    Dynamic role based API checker has been enabled!

/cc @jburwell @karuturi @PaulAngus

Since we don't have any upgrade/marvin tests for this, the changes have been verified with
above test as the script works against a A manual verification by anyone
else would be required to validate the changes.

* pr/1649:
  CLOUDSTACK-9463: Fix dynamic-roles migrate script for old format

Signed-off-by: Rohit Yadav <>


Branch: refs/heads/4.9
Commit: cc0e2a6b0649807629ff48c4c22c05b81907db7f
Parents: 1060dc4 f699fd4
Author: Rohit Yadav <>
Authored: Mon Aug 22 16:35:51 2016 +0530
Committer: Rohit Yadav <>
Committed: Mon Aug 22 16:35:51 2016 +0530

 scripts/util/ | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

View raw message