[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15773072#comment-15773072
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9704:
--------------------------------------------

GitHub user sateesh-chodapuneedi opened a pull request:

    https://github.com/apache/cloudstack/pull/1862

    CLOUDSTACK-9704 Remove dependency on VmwareContext object to fetch systemVM 
keyfile

    Jira
    ===
    CLOUDSTACK-9704 Remove dependency on VmwareContext object to fetch system 
VM key file
    
    Description
    ========
    While remote executing commands/scripts through SSH in VR, ACS uses system 
vm keyfile.
    ACS is fetching this key file using VMwareContext object which encapsulates 
vCenter connection handle.
    This is inefficient because of dependency on getServiceContext() which 
means a vCenter connection
    handle which is not required just to fetch a file in name space in 
management server.
    
    Fix
    ===
    Implement a method to fetch system vm key file by using Script class 
instead of VmwareManagerImpl. Ensure this implementation is not present in 
VmwareManagerImpl itself because fetching the manager object from VmwareContext 
object unnecessarily adds dependency on session object just to search for 
keyfile in class path.
    
    Signed-off-by: Sateesh Chodapuneedi <sateesh.chodapune...@accelerite.com>

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sateesh-chodapuneedi/cloudstack 
pr-cloudstack-9704

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1862.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1862
    
----
commit 02bd90c424966c81c57bed9b8fc9f530e0b97b7d
Author: Sateesh Chodapuneedi <sateesh.chodapune...@accelerite.com>
Date:   2016-12-23T02:17:43Z

    CLOUDSTACK-9704 Remove dependency on VmwareContext object to fetch system 
VM key file
    
    While remote executing commands/scripts through SSH in VR, ACS uses system 
vm keyfile.
    ACS is fetching this key file using VMwareContext object which encapsulates 
vCenter connection handle.
    This is inefficient because of dependency on getServiceContext() which 
means a vCenter connection
    handle which is not required just to fetch a file in name space in 
management server.
    
    Signed-off-by: Sateesh Chodapuneedi <sateesh.chodapune...@accelerite.com>

----


> Remove dependency on VmwareContext object to fetch system VM key file
> ---------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9704
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9704
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Sateesh Chodapuneedi
>            Assignee: Sateesh Chodapuneedi
>
> While remote executing commands/scripts in VR, ACS uses system vm keyfile. 
> ACS is fetching this key file using following code
> {code:title=Fetching keyfile|borderStyle=solid}
> VmwareManager mgr = 
> getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
> File systemVmKeyFile = mgr.getSystemVMKeyFile();
> {code}
> This is inefficient because dependency on getServiceContext() in above code 
> means a vCenter connection handle which is not required just to fetch a file 
> in name space in management server.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to