CloudStack
  1. CloudStack
  2. CLOUDSTACK-4482

getVMPassword() API call does not retuen password for Vms that are deployed with password enabled templates.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: Management Server
    • Security Level: Public (Anyone can view this level - this is the default.)
    • Labels:
      None

      Description

      Steps to reproduce the problem:

      Provision a VM with password enabled templates.

      Use getVMPassword() to get the password for this use VM.

      We get the following error message - "No password for VM with specified id found"

      http://10.223.131.169:8080/client/api?command=getVMPassword&id=a974c8ab-e779-4de6-a1d1-26ac5c9c39cd&response=json&sessionkey=ciq%2FaAgf6%2Br1BiuGeyU2%2Fjic23s%3D&_=1377293331315

      { "getvmpasswordresponse" : {"uuidList":[

      {"uuid":"a974c8ab-e779-4de6-a1d1-26ac5c9c39cd","description":"vmId"}

      ],"errorcode":431,"cserrorcode":4350,"errortext":"No password for VM with specified id found."} }

      Management server logs:

      2013-08-23 14:18:03,240 DEBUG [cloud.api.ApiServlet] (catalina-exec-25:null) ===START=== 10.215.3.9 – GET command=getVMPassword&id=a974c8ab-e779-4de6-a1d1-26ac5c9c39cd&response=json&sessionkey=ciq%2FaAgf6%2Br1BiuGeyU2%2Fjic23s%3D&_=1377293331315
      2013-08-23 14:18:03,251 DEBUG [cloud.user.AccountManagerImpl] (catalina-exec-25:null) Access to VM[User|pass-2] granted to Acct[806a5eea-3861-4224-bfc4-59f0fc46a1af-tan] by DomainChecker_EnhancerByCloudStack_be12c9e3
      2013-08-23 14:18:03,253 INFO [cloud.api.ApiServer] (catalina-exec-25:null) No password for VM with specified id found.
      2013-08-23 14:18:03,253 DEBUG [cloud.api.ApiServlet] (catalina-exec-25:null) ===END=== 10.215.3.9 – GET command=getVMPassword&id=a974c8ab-e779-4de6-a1d1-26ac5c9c39cd&response=json&sessionkey=ciq%2FaAgf6%2Br1BiuGeyU2%2Fjic23s%3D&_=1377293331315

      Response when deploying the Vm has password field which I am able to use successfully to log into the Vm:

      org.apache.cloudstack.api.response.UserVmResponse/virtualmachine/ {"id":"a974c8ab-e779-4de6-a1d1-26ac5c9c39cd","name":"pass-2","displayname":"pass-2","account":"tan","domainid":"1e424c36-0b6e-11e3-bc0b-067150000428","domain":"ROOT","created":"2013-08-23T11:17:08-0700","state":"Running","haenable":false,"zoneid":"93368e7c-db1b-4344-8777-2a6e0507c2ba","zonename":"zone1","templateid":"dd5c6bb5-602a-4cc4-9328-a26096294cf7","templatename":"password-template","templatedisplaytext":"password-template","passwordenabled":true,"serviceofferingid":"e83c2f9a-cbdc-46dc-8743-c76f3c270e99","serviceofferingname":"tiny1","cpunumber":1,"cpuspeed":50,"memory":124,"guestosid":"1e4bb9ce-0b6e-11e3-bc0b-067150000428","rootdeviceid":0,"rootdevicetype":"ROOT","securitygroup":[],"password":"rJ3aivjax","nic":[{"id":"e9ed3363-1573-4f59-b2cb-a32c8a3c023d","networkid":"95528f66-22f8-4932-86b6-96b1183d5693","networkname":"tan","netmask":"255.255.255.0","gateway":"10.1.1.1","ipaddress":"10.1.1.149","isolationuri":"vlan://2309","broadcasturi":"vlan://2309","traffictype":"Guest","type":"Isolated","isdefault":true,"macaddress":"02:00:4e:ad:00:28"}],"hypervisor":"VMware","tags":[],"affinitygroup":[],"displayvm":true,"isdynamicallyscalable":false,"jobid":"850e7775-be7a-4216-b515-dcfc320b2260","jobstatus":0}

        Activity

        Sangeetha Hariharan created issue -
        Sangeetha Hariharan made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Critical [ 2 ]
        Description Steps to reproduce the problem:

        Provision a VM with password enabled templates.

        Use getVMPassword() to get the password for this use VM.

        We get the following error message - "No password for VM with specified id found"

        http://10.223.131.169:8080/client/api?command=getVMPassword&id=a974c8ab-e779-4de6-a1d1-26ac5c9c39cd&response=json&sessionkey=ciq%2FaAgf6%2Br1BiuGeyU2%2Fjic23s%3D&_=1377293331315

        { "getvmpasswordresponse" : {"uuidList":[{"uuid":"a974c8ab-e779-4de6-a1d1-26ac5c9c39cd","description":"vmId"}],"errorcode":431,"cserrorcode":4350,"errortext":"No password for VM with specified id found."} }
        Management server logs:

        2013-08-23 14:18:03,240 DEBUG [cloud.api.ApiServlet] (catalina-exec-25:null) ===START=== 10.215.3.9 -- GET command=getVMPassword&id=a974c8ab-e779-4de6-a1d1-26ac5c9c39cd&response=json&sessionkey=ciq%2FaAgf6%2Br1BiuGeyU2%2Fjic23s%3D&_=1377293331315
        2013-08-23 14:18:03,251 DEBUG [cloud.user.AccountManagerImpl] (catalina-exec-25:null) Access to VM[User|pass-2] granted to Acct[806a5eea-3861-4224-bfc4-59f0fc46a1af-tan] by DomainChecker_EnhancerByCloudStack_be12c9e3
        2013-08-23 14:18:03,253 INFO [cloud.api.ApiServer] (catalina-exec-25:null) No password for VM with specified id found.
        2013-08-23 14:18:03,253 DEBUG [cloud.api.ApiServlet] (catalina-exec-25:null) ===END=== 10.215.3.9 -- GET command=getVMPassword&id=a974c8ab-e779-4de6-a1d1-26ac5c9c39cd&response=json&sessionkey=ciq%2FaAgf6%2Br1BiuGeyU2%2Fjic23s%3D&_=1377293331315



        Steps to reproduce the problem:

        Provision a VM with password enabled templates.

        Use getVMPassword() to get the password for this use VM.

        We get the following error message - "No password for VM with specified id found"

        http://10.223.131.169:8080/client/api?command=getVMPassword&id=a974c8ab-e779-4de6-a1d1-26ac5c9c39cd&response=json&sessionkey=ciq%2FaAgf6%2Br1BiuGeyU2%2Fjic23s%3D&_=1377293331315

        { "getvmpasswordresponse" : {"uuidList":[{"uuid":"a974c8ab-e779-4de6-a1d1-26ac5c9c39cd","description":"vmId"}],"errorcode":431,"cserrorcode":4350,"errortext":"No password for VM with specified id found."} }


        Management server logs:

        2013-08-23 14:18:03,240 DEBUG [cloud.api.ApiServlet] (catalina-exec-25:null) ===START=== 10.215.3.9 -- GET command=getVMPassword&id=a974c8ab-e779-4de6-a1d1-26ac5c9c39cd&response=json&sessionkey=ciq%2FaAgf6%2Br1BiuGeyU2%2Fjic23s%3D&_=1377293331315
        2013-08-23 14:18:03,251 DEBUG [cloud.user.AccountManagerImpl] (catalina-exec-25:null) Access to VM[User|pass-2] granted to Acct[806a5eea-3861-4224-bfc4-59f0fc46a1af-tan] by DomainChecker_EnhancerByCloudStack_be12c9e3
        2013-08-23 14:18:03,253 INFO [cloud.api.ApiServer] (catalina-exec-25:null) No password for VM with specified id found.
        2013-08-23 14:18:03,253 DEBUG [cloud.api.ApiServlet] (catalina-exec-25:null) ===END=== 10.215.3.9 -- GET command=getVMPassword&id=a974c8ab-e779-4de6-a1d1-26ac5c9c39cd&response=json&sessionkey=ciq%2FaAgf6%2Br1BiuGeyU2%2Fjic23s%3D&_=1377293331315



        Response when deploying the Vm has password field which I am able to use successfully to log into the Vm:

        | org.apache.cloudstack.api.response.UserVmResponse/virtualmachine/{"id":"a974c8ab-e779-4de6-a1d1-26ac5c9c39cd","name":"pass-2","displayname":"pass-2","account":"tan","domainid":"1e424c36-0b6e-11e3-bc0b-067150000428","domain":"ROOT","created":"2013-08-23T11:17:08-0700","state":"Running","haenable":false,"zoneid":"93368e7c-db1b-4344-8777-2a6e0507c2ba","zonename":"zone1","templateid":"dd5c6bb5-602a-4cc4-9328-a26096294cf7","templatename":"password-template","templatedisplaytext":"password-template","passwordenabled":true,"serviceofferingid":"e83c2f9a-cbdc-46dc-8743-c76f3c270e99","serviceofferingname":"tiny1","cpunumber":1,"cpuspeed":50,"memory":124,"guestosid":"1e4bb9ce-0b6e-11e3-bc0b-067150000428","rootdeviceid":0,"rootdevicetype":"ROOT","securitygroup":[],"password":"rJ3aivjax","nic":[{"id":"e9ed3363-1573-4f59-b2cb-a32c8a3c023d","networkid":"95528f66-22f8-4932-86b6-96b1183d5693","networkname":"tan","netmask":"255.255.255.0","gateway":"10.1.1.1","ipaddress":"10.1.1.149","isolationuri":"vlan://2309","broadcasturi":"vlan://2309","traffictype":"Guest","type":"Isolated","isdefault":true,"macaddress":"02:00:4e:ad:00:28"}],"hypervisor":"VMware","tags":[],"affinitygroup":[],"displayvm":true,"isdynamicallyscalable":false,"jobid":"850e7775-be7a-4216-b515-dcfc320b2260","jobstatus":0} |

        Sangeetha Hariharan made changes -
        Fix Version/s 4.2.1 [ 12324940 ]
        Affects Version/s 4.2.0 [ 12323906 ]
        Component/s Management Server [ 12319617 ]
        Prachi Damle made changes -
        Priority Critical [ 2 ] Major [ 3 ]
        Abhinandan Prateek made changes -
        Assignee Harikrishna Patnala [ harikrishna.patnala ]
        Harikrishna Patnala made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Sangeetha Hariharan made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Harikrishna Patnala
            Reporter:
            Sangeetha Hariharan
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development