CloudStack
  1. CloudStack
  2. CLOUDSTACK-1216

UUID is null for admin and failed to register user key with 4.1

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.1.0
    • Component/s: Management Server
    • Security Level: Public (Anyone can view this level - this is the default.)
    • Labels:
      None
    • Environment:
      Cent OS 6.3
      4.1 build

      Description

      Step 1 : Created new build from 4.1 branch
      Step 2 : Install and configured MS server
      Step 3 : Register registeruserkeys for user admin
      Account > Admin > View user > Admin > Generate Key

      Actual result

      Register user key failed with below error "Unable to execute API command registeruserkeys due to missing parameter id"

        Activity

        Hide
        Rayees Namathponnan added a comment -

        Min's comments below closing the defect

        UUID column is added later into CloudStack system, and we never set up not-null constraint on UUID since internally we still use internal DB id to identify resource.

        Thanks
        -min

        Show
        Rayees Namathponnan added a comment - Min's comments below closing the defect UUID column is added later into CloudStack system, and we never set up not-null constraint on UUID since internally we still use internal DB id to identify resource. Thanks -min
        Hide
        Rayees Namathponnan added a comment -

        HI Min,

        Thanks for fixing the issue

        Why we are allowing UUID is null ? i think we should not allow UUID null, is there any reason for this ?

        I removing the blocker from this defect

        mysql> desc user;
        -------------------------------------------------------------------------+

        Field Type Null Key Default Extra

        -------------------------------------------------------------------------+

        id bigint(20) unsigned NO PRI NULL auto_increment
        uuid varchar(40) YES UNI NULL  
        username varchar(255) NO   NULL  
        password varchar(255) NO   NULL  
        account_id bigint(20) unsigned NO MUL NULL  
        firstname varchar(255) YES   NULL  
        lastname varchar(255) YES   NULL  
        email varchar(255) YES   NULL  
        state varchar(10) NO   enabled  
        api_key varchar(255) YES UNI NULL  
        secret_key varchar(255) YES MUL NULL  
        created datetime NO   NULL  
        removed datetime YES MUL NULL  
        timezone varchar(30) YES   NULL  
        registration_token varchar(255) YES   NULL  
        is_registered tinyint(4) NO   0  
        region_id int(10) unsigned NO   NULL  
        incorrect_login_attempts int(10) unsigned NO   0  

        -------------------------------------------------------------------------+
        18 rows in set (0.00 sec)

        Show
        Rayees Namathponnan added a comment - HI Min, Thanks for fixing the issue Why we are allowing UUID is null ? i think we should not allow UUID null, is there any reason for this ? I removing the blocker from this defect mysql> desc user; ------------------------- ------------------- ---- --- ------- ---------------+ Field Type Null Key Default Extra ------------------------- ------------------- ---- --- ------- ---------------+ id bigint(20) unsigned NO PRI NULL auto_increment uuid varchar(40) YES UNI NULL   username varchar(255) NO   NULL   password varchar(255) NO   NULL   account_id bigint(20) unsigned NO MUL NULL   firstname varchar(255) YES   NULL   lastname varchar(255) YES   NULL   email varchar(255) YES   NULL   state varchar(10) NO   enabled   api_key varchar(255) YES UNI NULL   secret_key varchar(255) YES MUL NULL   created datetime NO   NULL   removed datetime YES MUL NULL   timezone varchar(30) YES   NULL   registration_token varchar(255) YES   NULL   is_registered tinyint(4) NO   0   region_id int(10) unsigned NO   NULL   incorrect_login_attempts int(10) unsigned NO   0   ------------------------- ------------------- ---- --- ------- ---------------+ 18 rows in set (0.00 sec)
        Hide
        ASF subversion and git services added a comment -

        Commit 1cf85aa87aee205470590534f9e9f3996eb6df7c in branch refs/heads/master from Min Chen
        [ https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;h=1cf85aa ]

        CLOUDSTACK-1216: insert UUID when we create "admin" user in DB.

        Show
        ASF subversion and git services added a comment - Commit 1cf85aa87aee205470590534f9e9f3996eb6df7c in branch refs/heads/master from Min Chen [ https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;h=1cf85aa ] CLOUDSTACK-1216 : insert UUID when we create "admin" user in DB.
        Hide
        ASF subversion and git services added a comment -

        Commit 94fc648525c5f923ab1bfd93f0f84e80f634dd03 in branch refs/heads/4.1 from Min Chen
        [ https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;h=94fc648 ]

        CLOUDSTACK-1216: insert UUID when we create "admin" user in DB.

        Show
        ASF subversion and git services added a comment - Commit 94fc648525c5f923ab1bfd93f0f84e80f634dd03 in branch refs/heads/4.1 from Min Chen [ https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;h=94fc648 ] CLOUDSTACK-1216 : insert UUID when we create "admin" user in DB.
        Hide
        Rayees Namathponnan added a comment -

        I am using rpm packaged version

        Show
        Rayees Namathponnan added a comment - I am using rpm packaged version
        Hide
        Min Chen added a comment -

        Please share the setup details. Also, please mention which build are you using, rpm version or built from source code?

        Show
        Min Chen added a comment - Please share the setup details. Also, please mention which build are you using, rpm version or built from source code?
        Hide
        Rayees Namathponnan added a comment -

        uuid is null for admin

        mysql> select * from user;
        ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

        id uuid username password account_id firstname lastname email state api_key secret_key created removed timezone registration_token is_registered region_id incorrect_login_attempts

        ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

        1 6e8f2f58-721a-11e2-b3d4-52b2d980df8a system 0.431363340868953 1 system cloud NULL enabled NULL NULL 2013-02-08 10:07:42 NULL NULL NULL 0 1 0
        2 NULL admin 5f4dcc3b5aa765d61d8327deb882cf99 2 admin cloud NULL enabled NULL NULL 2013-02-08 10:07:42 NULL NULL NULL 0 1 0

        ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

        2013-02-08 10:29:16,013 INFO [cloud.api.ApiServer] (catalina-exec-16:null) (userId=2 accountId=2 sessionId=6BCDC0D13B11D8CB909E8FD18C74903E) 10.216.133.42 – GET command=listUsers&response=json&sessionkey=4QDEWZBd1bAweF8umGJIWUHHtLM%3D&_=1360348308919 200 { "listusersresponse" : { "count":1 ,"user" : [

        {"username":"admin","firstname":"admin","lastname":"cloud","created":"2013-02-08T01:46:11-0800","state":"enabled","account":"admin","accounttype":1,"domainid":"3f54de3e-7217-11e2-b293-4290361b938f","domain":"ROOT","accountid":"6d692d20-7217-11e2-b293-4290361b938f","iscallerchilddomain":false,"jobstatus":0}

        ] } }
        2013-02-08 10:29:17,904 INFO [cloud.api.ApiServer] (catalina-exec-17:null) (userId=2 accountId=2 sessionId=6BCDC0D13B11D8CB909E8FD18C74903E) 10.216.133.42 – GET command=registerUserKeys&response=json&sessionkey=4QDEWZBd1bAweF8umGJIWUHHtLM%3D&_=1360348310804 431 Unable to execute API command registeruserkeys due to missing parameter id

        Show
        Rayees Namathponnan added a comment - uuid is null for admin mysql> select * from user; --- ------------------------------------ -------- -------------------------------- ---------- --------- -------- ----- ------- ------- ---------- ------------------- ------- -------- ------------------ ------------- --------- -------------------------+ id uuid username password account_id firstname lastname email state api_key secret_key created removed timezone registration_token is_registered region_id incorrect_login_attempts --- ------------------------------------ -------- -------------------------------- ---------- --------- -------- ----- ------- ------- ---------- ------------------- ------- -------- ------------------ ------------- --------- -------------------------+ 1 6e8f2f58-721a-11e2-b3d4-52b2d980df8a system 0.431363340868953 1 system cloud NULL enabled NULL NULL 2013-02-08 10:07:42 NULL NULL NULL 0 1 0 2 NULL admin 5f4dcc3b5aa765d61d8327deb882cf99 2 admin cloud NULL enabled NULL NULL 2013-02-08 10:07:42 NULL NULL NULL 0 1 0 --- ------------------------------------ -------- -------------------------------- ---------- --------- -------- ----- ------- ------- ---------- ------------------- ------- -------- ------------------ ------------- --------- -------------------------+ 2013-02-08 10:29:16,013 INFO [cloud.api.ApiServer] (catalina-exec-16:null) (userId=2 accountId=2 sessionId=6BCDC0D13B11D8CB909E8FD18C74903E) 10.216.133.42 – GET command=listUsers&response=json&sessionkey=4QDEWZBd1bAweF8umGJIWUHHtLM%3D&_=1360348308919 200 { "listusersresponse" : { "count":1 ,"user" : [ {"username":"admin","firstname":"admin","lastname":"cloud","created":"2013-02-08T01:46:11-0800","state":"enabled","account":"admin","accounttype":1,"domainid":"3f54de3e-7217-11e2-b293-4290361b938f","domain":"ROOT","accountid":"6d692d20-7217-11e2-b293-4290361b938f","iscallerchilddomain":false,"jobstatus":0} ] } } 2013-02-08 10:29:17,904 INFO [cloud.api.ApiServer] (catalina-exec-17:null) (userId=2 accountId=2 sessionId=6BCDC0D13B11D8CB909E8FD18C74903E) 10.216.133.42 – GET command=registerUserKeys&response=json&sessionkey=4QDEWZBd1bAweF8umGJIWUHHtLM%3D&_=1360348310804 431 Unable to execute API command registeruserkeys due to missing parameter id

          People

          • Assignee:
            Min Chen
            Reporter:
            Rayees Namathponnan
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development