You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by rhtyd <gi...@git.apache.org> on 2016/08/10 08:49:37 UTC

[GitHub] cloudstack pull request #1633: CLOUDSTACK-9452: use optparse instead of argp...

GitHub user rhtyd opened a pull request:

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

    CLOUDSTACK-9452: use optparse instead of argparse in patchviasocket

    Use optparse that is supported by python 2.3+, instead of argparse that is
    supported by python 2.7+. On KVM hosts which don't have python-argparse pkg
    installed, the patchviasocket script will break. This fixes so that patchviasocket
    would work on CentOS6 KVM hosts, or KVM hosts without python 2.7/argparse in
    general.
    
    The patchviasocket script was rewritten as a Python script from PR #1533
    
    @blueorangutan package

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

    $ git pull https://github.com/shapeblue/cloudstack patchviasocket-49-py26fix

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

    https://github.com/apache/cloudstack/pull/1633.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 #1633
    
----
commit bfbf9f45ad8ca7247fb96005d47afeb7131ba216
Author: Rohit Yadav <ro...@shapeblue.com>
Date:   2016-08-10T08:43:40Z

    CLOUDSTACK-9452: use optparse instead of argparse in patchviasocket
    
    Use optparse that is supported by python 2.3+, instead of argparse that is
    supported by python 2.7+. On KVM hosts which don't have python-argparse pkg
    installed, the patchviasocket script will break. This fixes so that patchviasocket
    would work on CentOS6 KVM hosts, or KVM hosts without python 2.7/argparse in
    general.
    
    The patchviasocket script was rewritten as a Python script from PR #1533
    
    Signed-off-by: Rohit Yadav <ro...@shapeblue.com>

----


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1633
  
    CentOS6 default/epel repos don't have python 2.7 :) There are large installations running old code, old hardware, old kernels/OSs; they will get upgraded over time, but they need to be supported for the time being. Lastly, I could make the same argument for our usage of Java6/7, why aren't we running Java8. Java7 has eoled, but most of us I know are still using it in production.


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

Posted by sverrirab <gi...@git.apache.org>.
Github user sverrirab commented on the issue:

    https://github.com/apache/cloudstack/pull/1633
  
    The reason for my suggestion is that I don't think anyone should be running python 2.6 in production.   The last update for it was in 2008 so I would consider it risky at this point.


---
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 #1633: [blocker] CLOUDSTACK-9452: use optparse inste...

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

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


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1633
  
    @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

Posted by wido <gi...@git.apache.org>.
Github user wido commented on the issue:

    https://github.com/apache/cloudstack/pull/1633
  
    @rhtyd I'm fine with adding it as a dependency.
    
    Perception is different here I think. My personal opinion is that nobody should be running CentOS 6 with CloudStack in production just as much as you shouldn't use Ubuntu 12.04 anymore for CloudStack.
    
    I'm against writing code which brings in legacy instead of removing it.


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1633
  
    @wido I'm sorry we will need to support CentOS6 kvm hosts, just because you don't use it does not mean we should not support for people. It is a valid `blocker` as the KVM CentOS6 hosts have stopped working from deploying VMs.
    
    `optparse` is deprecated which does not mean that it will fail or won't be available. We can have another way of fixing this: (1) revert #1533, (2) add a package dependency `python-argparse` on (at least centos6) rpms to ensure that argparse will be available on centos6/7 hosts. Which way should we go, if not the way PR fixes it?


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1633
  
    @wido @sverrirab will adding python-argparse as a dependency be an acceptable solution to the problem? this package is available on el6, but python 2.7 is not available (without using one of the 3rd party repositories).


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1633
  
    Packaging result: \u2716centos6 \u2714centos7 \u2714debian repo: http://packages.shapeblue.com/cloudstack/pr/1633
    Job ID-73


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1633
  
    @karuturi @jburwell @wido @sverrirab please review, it's a blocker for kvm centos6 hosts without argparse/python2.7 installed.
    
    I could run an existing test: (gave same results before and after the change)
    $ python ./scripts/vm/hypervisor/kvm/test_patchviasocket.py
    ERROR: unable to connect to /tmp/tmpDuudOL.sck - Permission denied
    .ERROR: unable to open /tmp/tmpoEzOGN.sck - Permission denied
    .ERROR: ssh public key not found on host at must-not-exist
    .ERROR: unable to connect to /tmp/tmpm2rGlP.sck - Connection refused
    .ERROR: must-not-exist socket not found
    ..
    ----------------------------------------------------------------------
    Ran 6 tests in 1.633s
    
    OK


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

Posted by sverrirab <gi...@git.apache.org>.
Github user sverrirab commented on the issue:

    https://github.com/apache/cloudstack/pull/1633
  
    adding the python-argparse dependency is fine by me.  I have not tested that combination though.


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

Posted by sverrirab <gi...@git.apache.org>.
Github user sverrirab commented on the issue:

    https://github.com/apache/cloudstack/pull/1633
  
    The updated script that now depends on python 2.7 (or python 2.6 + argparse I assume) is replacing the perl installation requirement that was there before.  Would it not be the correct solution to require python 2.7 to be installed?  If the hosts are dedicated KVM hosts that should be relatively low risk?


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

Posted by wido <gi...@git.apache.org>.
Github user wido commented on the issue:

    https://github.com/apache/cloudstack/pull/1633
  
    Do we seriously want to write code that still works on CentOS 6 or systems without Python 2.7?
    
    Looking at the Python website: https://docs.python.org/2/library/optparse.html
    
    <pre>Deprecated since version 2.7: The optparse module is deprecated and will not be developed further; development will continue with the argparse module.</pre>
    
    I wouldn't call this a blocker at all. CentOS 6 is pre-historic and we can't go back to using a old module like OptParse.
    
    Sorry, -1 for me on this one.


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1633
  
    @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1633
  
    Packaging result: \u2714centos6 \u2714centos7 \u2714debian repo: http://packages.shapeblue.com/cloudstack/pr/1633
    Job ID-75


---
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.
---