You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/03/14 16:40:42 UTC

[jira] [Commented] (CLOUDSTACK-9593) User data check is inconsistent with python

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

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

Github user cloudmonger commented on the issue:

    https://github.com/apache/cloudstack/pull/1760
  
    ### ACS CI BVT Run
     **Sumarry:**
     Build Number 466
     Hypervisor xenserver
     NetworkType Advanced
     Passed=104
     Failed=1
     Skipped=7
    
    _Link to logs Folder (search by build_no):_ https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
    
    
    **Failed tests:**
    * test_routers_network_ops.py
    
     * test_03_RVR_Network_check_router_state Failed
    
    
    **Skipped tests:**
    test_01_test_vm_volume_snapshot
    test_vm_nic_adapter_vmxnet3
    test_static_role_account_acls
    test_11_ss_nfs_version_on_ssvm
    test_nested_virtualization_vmware
    test_3d_gpu_support
    test_deploy_vgpu_enabled_vm
    
    **Passed test suits:**
    test_deploy_vm_with_userdata.py
    test_affinity_groups_projects.py
    test_portable_publicip.py
    test_over_provisioning.py
    test_global_settings.py
    test_scale_vm.py
    test_service_offerings.py
    test_routers_iptables_default_policy.py
    test_loadbalance.py
    test_routers.py
    test_reset_vm_on_reboot.py
    test_deploy_vms_with_varied_deploymentplanners.py
    test_network.py
    test_router_dns.py
    test_non_contigiousvlan.py
    test_login.py
    test_deploy_vm_iso.py
    test_list_ids_parameter.py
    test_public_ip_range.py
    test_multipleips_per_nic.py
    test_regions.py
    test_affinity_groups.py
    test_network_acl.py
    test_pvlan.py
    test_volumes.py
    test_nic.py
    test_deploy_vm_root_resize.py
    test_resource_detail.py
    test_secondary_storage.py
    test_vm_life_cycle.py
    test_disk_offerings.py


> User data check is inconsistent with python
> -------------------------------------------
>
>                 Key: CLOUDSTACK-9593
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9593
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>    Affects Versions: 4.4.2, 4.4.3, 4.3.2, 4.5.1, 4.4.4, 4.5.2, 4.6.0, 4.6.1, 4.6.2, 4.7.0, 4.7.1, 4.8.0, 4.9.0
>            Reporter: Marc-Aurèle Brothier
>            Assignee: Marc-Aurèle Brothier
>
> The user data is validated through the Apache commons codec library, but this library does not check that the length is a multiple of 4 characters. The RFC does not require it either. But the python script in the virtual router that loads the user data does check for the possible padding presence, requiring the string to be a multiple of 4 characters.
> {code:python}
> >>> import base64
> >>> base64.b64decode('foo')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/base64.py", line 78, in b64decode
>     raise TypeError(msg)
> TypeError: Incorrect padding
> >>> base64.b64decode('foo=')
> '~\x8a'
> {code}
> Currently since the java check is less restrictive, the user data gets saved into the database but the VR script crashes when it receives this VM user data. On a single VM it is not really a problem. The critical issue is when a VR is restarted. The invalid pythonic base64 string makes the vmdata.py script crashed, resulting in a VR not starting at all.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)