You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by cloudtrends <gi...@git.apache.org> on 2015/01/14 12:53:47 UTC

[GitHub] cloudstack pull request: under windows environment the publicKeyPa...

GitHub user cloudtrends opened a pull request:

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

    under windows environment  the publicKeyPath and privateKeyPath should replace from \...

    Under windows environment the publicKeyPath and privateKeyPath should replace from \  to / when send them into injectkeys.py

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

    $ git pull https://github.com/cloudtrends/cloudstack master

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

    https://github.com/apache/cloudstack/pull/66.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 #66
    
----
commit 13d65691358946feebd80c9e905a4f374459a39d
Author: cloudtrends <23...@qq.com>
Date:   2015-01-14T11:51:18Z

    under windows the publicKeyPath and privateKeyPath should replace from \ to / when send them into injectkeys.py

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: under windows environment the publicKeyPa...

Posted by cloudtrends <gi...@git.apache.org>.
Github user cloudtrends commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/66#discussion_r22991914
  
    --- Diff: server/src/com/cloud/server/ConfigurationServerImpl.java ---
    @@ -894,6 +894,13 @@ protected void injectSshKeysIntoSystemVmIsoPatch(String publicKeyPath, String pr
             } else {
                 command = new Script("/bin/bash", s_logger);
             }
    +        String osname = System.getProperty("os.name");
    --- End diff --
    
    Hi  karuturi ,
    
    thanks for your kindly help , yes , I should use the isOnWindows function .
    
    ChunFeng 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: under windows environment the publicKeyPa...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: under windows environment the publicKeyPa...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the pull request:

    https://github.com/apache/cloudstack/pull/66#issuecomment-69908275
  
    In case of windows, python scripts are executed and I think it runs fine from cygwin. Is this change targeted to make it work from cmd?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: under windows environment the publicKeyPa...

Posted by cloudtrends <gi...@git.apache.org>.
Github user cloudtrends commented on the pull request:

    https://github.com/apache/cloudstack/pull/66#issuecomment-70043494
  
    My test environment is on Windows 2008 & cygwin 64 bits version .
    
    I can reoccur the error's by below python scripts:
    
    ---------------------------  cygwin_python_test.py -------------------
    import os.path
    import sys
    file_name = sys.argv[1]
    if os.path.exists(file_name):
        print file_name
    else:
        print "can not find"
    -------------------------------- end  --------------------------
    
    test it by , touch a file : F:/sourcecode/python/a-exist.txt
    
    First test with Backslash :  
    $ python cygwin_python_test.py  F:\sourcecode\python\a-exist.txt
    can not find
    
    Then with slash : 
    
    $ python cygwin_python_test.py  F:/sourcecode/python/a-exist.txt
    F:/sourcecode/python/a-exist.txt
    
    ------------
    
    So , I thinks we should change the backslash to slash in windows environment .



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: under windows environment the publicKeyPa...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/66#discussion_r22932788
  
    --- Diff: server/src/com/cloud/server/ConfigurationServerImpl.java ---
    @@ -894,6 +894,13 @@ protected void injectSshKeysIntoSystemVmIsoPatch(String publicKeyPath, String pr
             } else {
                 command = new Script("/bin/bash", s_logger);
             }
    +        String osname = System.getProperty("os.name");
    +        if (osname.startsWith("Windows")) {
    +            scriptPath = scriptPath.replaceAll("\\\\" ,"/" );
    --- End diff --
    
     testWindowsScript#ConfigurationServerImplTest TestCase might break with this change. 
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: under windows environment the publicKeyPa...

Posted by cloudtrends <gi...@git.apache.org>.
Github user cloudtrends commented on the pull request:

    https://github.com/apache/cloudstack/pull/66#issuecomment-70043778
  
    Hi karuturi ,
    
    thanks for point out that I should use isOnWindows function , very appreciation.
    
    
    ChunFeng



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: under windows environment the publicKeyPa...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/66#discussion_r22932649
  
    --- Diff: server/src/com/cloud/server/ConfigurationServerImpl.java ---
    @@ -894,6 +894,13 @@ protected void injectSshKeysIntoSystemVmIsoPatch(String publicKeyPath, String pr
             } else {
                 command = new Script("/bin/bash", s_logger);
             }
    +        String osname = System.getProperty("os.name");
    --- End diff --
    
    There is an isOnWindows() function in this class which can be reused


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: under windows environment the publicKeyPa...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the pull request:

    https://github.com/apache/cloudstack/pull/66#issuecomment-70210894
  
    Thanks for the patch. Agree to the slash change. I am pushing this to master(4.6). Let me know if you want it on any other branch.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---