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

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

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 <rohit.ya...@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 <rohit.ya...@shapeblue.com>

----


> CentOS6 kvm hosts stop working after upgrade
> --------------------------------------------
>
>                 Key: CLOUDSTACK-9452
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9452
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Rohit Yadav
>            Assignee: Rohit Yadav
>            Priority: Blocker
>
> Recently patchviasocket script was rewritten in python from perl, but it uses 
> argparse causing failures on centos6 hosts with python 2.6 which may not have 
> it pre-installed. The fix would be to use optparse etc. instaed of argparse 
> as it's introduced only in python 2.7.
> Error log;
> DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-3 
> (logid:005ad4fd) Executing: 
> /usr/share/cloudstack-common/scripts/vm/hypervisor/kvm/patchviasocket.py -n 
> r-148-VM -p %t                                                                
>                                                  
> emplate=domP%name=r-148-VM%eth2ip=10.1.34.18%eth2mask=255.255.224.0%gateway=10.1.63.254%eth0ip=10.1.1.1%eth0mask=255.255.255.0%domain=cs2cloud.internal%cidrsize=24%dhcprange=10.1.1.1%eth1ip=
>                                                                               
>                                    
> 169.254.1.214%eth1mask=255.255.0.0%type=router%disable_rp_filter=true%dns1=8.8.8.8%dns2=8.8.4.4%baremetalnotificationsecuritykey=4XFrHwfZgVr6DrJhgoBuNgbc5Vk7ACm90TW3GgYk9-O7TgNY9LXn_FNcm9Sdc
>                                                                               
>                                    
> IEnwSTktEx3K_a7ng2K4fpyUg%baremetalnotificationapikey=k3ja_d3xCTT78-ow30eah6TCvqYB3IIXYtKeaDJ4_TMdD7BbZbHhp07dVKXPiM5ee3xFn2wqSIxuX5LsObQYDg%host=10.2.3.61%port=8080
> DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-3 
> (logid:005ad4fd) Exit value is 1
> DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-3 
> (logid:005ad4fd) Traceback (most recent call last):  File 
> "/usr/share/cloudstack-common/scripts/vm/hypervisor/kvm/patc                  
>                                                                               
>                  hviasocket.py", line 25, in <module>    import 
> argparseImportError: No module named argparse
> DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-3 
> (logid:005ad4fd) passcmd failed:Traceback (most recent call last):  File 
> "/usr/share/cloudstack-common/scripts/vm/hype                                 
>                                                                               
>   rvisor/kvm/patchviasocket.py", line 25, in <module>    import 
> argparseImportError: No module named argparse



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

Reply via email to