Cannot `lxc pull` file with "+" character #3499

Closed
powersj opened this Issue Jul 5, 2017 · 4 comments

Comments

Projects
None yet
2 participants

powersj commented Jul 5, 2017

Required information

  • Distribution: Ubuntu
  • Distribution version: Xenial (+lxd-stable ppa)
  • The output of "lxc info" or if that fails:
config: {}
api_extensions:
- storage_zfs_remove_snapshots
- container_host_shutdown_timeout
- container_syscall_filtering
- auth_pki
- container_last_used_at
- etag
- patch
- usb_devices
- https_allowed_credentials
- image_compression_algorithm
- directory_manipulation
- container_cpu_time
- storage_zfs_use_refquota
- storage_lvm_mount_options
- network
- profile_usedby
- container_push
- container_exec_recording
- certificate_update
- container_exec_signal_handling
- gpu_devices
- container_image_properties
- migration_progress
- id_map
- network_firewall_filtering
- network_routes
- storage
- file_delete
- file_append
- network_dhcp_expiry
- storage_lvm_vg_rename
- storage_lvm_thinpool_rename
- network_vlan
- image_create_aliases
- container_stateless_copy
- container_only_migration
- storage_zfs_clone_copy
- unix_device_rename
- storage_lvm_use_thinpool
- storage_rsync_bwlimit
- network_vxlan_interface
- storage_btrfs_mount_options
- entity_description
- image_force_refresh
- storage_lvm_lv_resizing
api_status: stable
api_version: "1.0"
auth: trusted
public: false
environment:
  addresses: []
  architectures:
  - x86_64
  - i686
  certificate: |
    -----BEGIN CERTIFICATE-----
    MIIFUDCCAzigAwIBAgIRAJtu+P0idhb0iTIgBYLb/xYwDQYJKoZIhvcNAQELBQAw
    NTEcMBoGA1UEChMTbGludXhjb250YWluZXJzLm9yZzEVMBMGA1UEAwwMcm9vdEB0
    b3Jrb2FsMB4XDTE3MDcwNTE4MDE0OVoXDTI3MDcwMzE4MDE0OVowNTEcMBoGA1UE
    ChMTbGludXhjb250YWluZXJzLm9yZzEVMBMGA1UEAwwMcm9vdEB0b3Jrb2FsMIIC
    IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAymLlqDxDehC+5tI90jfUJ0cD
    09ubRFBPyFWzNSwMyFmowS1kNaoKiClvRcksT7YjqH6cCSmfUYGYo7PygWY7USbp
    1BH66MOkL6k5Ufz90yQcxJIFht8163OFV6gmwsyoLQys47mzfFb5X6/nsuYmEDdl
    jdqTJzfKgszqiVI4lTGlL5ZQ2iHBxtc/uIZQmygyZpDxPU878gC4PiABWwN/OQTl
    ITGiBFQutGIfvcm+Cb54eeoTAd6M6Nm/z4h05eaJqHe4ke1N9jBRY//syMwEGJea
    hludnqe3R0Kj7vgp+pDyswUrKTzhtPx7TS/CbytbDqCW6Uglkoy/bdeg7MhteBY/
    H56dsjwTqkBwTpL1Bba5vLT6WX4AslBIrnHbEcunkjmXvdA1I6xDF9WwIuXhZwG9
    rEzNTSEhi3lMAYYuNysu3zLL0+OSjGGCG61b1f2fzbDvKagrzTXbWcuak04FwtqD
    R+toscQi2xccOhy5TqXJ7Nm5cuHDVtM1anteN+KnCi4pnMG0/I135qGxOFD9wIIn
    bosepZ+0EWtTa+xUykRNdFRCDbDm+FBEjyJLKElC8w2zVwcKRsdcKjYHIL6bVrpG
    wdmP49lHhxoK+VzzFtMZot8ZBNxUS8KOghyyQEwWNayEs7+qkWw1yAuKqRNkRJlK
    9NRXLnHuQBaujcR8QCkCAwEAAaNbMFkwDgYDVR0PAQH/BAQDAgWgMBMGA1UdJQQM
    MAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwJAYDVR0RBB0wG4IHdG9ya29hbIcE
    CvWoEocEwKh6AYcECgADATANBgkqhkiG9w0BAQsFAAOCAgEAMZOuJSeERtj/68PP
    4wKPkf+QqNV03VXWzJh0WYd0wLWmjVOOQqeTw8tFfOOVSRkminpmKzMknkkb1GWv
    YCRZaw2xUE1bqKnpJgAPPqTdFbePkylOaKAa5qDeqTtn8EHeEnNZhIc90HvPZmcH
    f5dG3b+EYYyOAEdr2VKnu4wW07C5cIZSKivKFpttapcajqguRBfpQf1mn9hsKo5H
    KQRVJdylCtZ5z2/bWYHY8tuKobBdPCFQ/PUWZbJ63wzQA4RqoEUS6r9bxiPH/oWL
    brn0GvmlsY7Uwv3pBFjnO7uee2Zg0TuRLicV/qxiJKUEOKOTL/GC0ABqgzW3ragG
    zpnGJpiiqQd0vKO73U0gNniBrkYLYmUERpv5iT1Kp9ffWBhAdpNqiz1B6MhggguH
    TOYWJs2AgfS2oFTkN9nkPhH87vwvIR57GPZWwDBHbr6DxtX3Frt4LfDwhNvHtu+s
    Upmy7xAhrYgKZHv3yhsO6/ZsK1+JJfCWSv5VpDRqXPCZfjm4O0KdTGaxgprceEXm
    fL5D2KgCHDB/wcjSAfJTjNqSM8do/KFr9DPJ11FQ2UhIPuhr+1wij9fFHer8IQkd
    EHhLj3iD1m99lR6agr5HE3W0j8lmGovPNgUltoBLTKvOR1mdPbSJzODRjAzz/dD7
    5p6UFOfVwzzcKy9vNo17L6QoHAE=
    -----END CERTIFICATE-----
  certificate_fingerprint: 3c80197437b99daad4967475e9feec0f936c1a3d5dec5791a3adbaa9d125ef88
  driver: lxc
  driver_version: 2.0.8
  kernel: Linux
  kernel_architecture: x86_64
  kernel_version: 4.4.0-83-generic
  server: lxd
  server_pid: 27153
  server_version: "2.15"
  storage: zfs
  storage_version: 0.6.5.6-0ubuntu16

Issue description

Attempting to pull a file with a "+" in the filename fails. This used to work :)

Steps to reproduce

  1. lxc launch ubuntu-daily:x x
  2. lxc exec x -- touch my+file
  3. lxc file pull x/root/my+file .

Actual Results

"error: not found"

Expected results

The file should transfer over. Doing the same steps above, but with filename of "myfile' works as expected. The use case is pulling a built deb that has the '+' symbol in it out of a container (e.g. cloud-init-0.7.9+199.g4d9f24f-1.el7.centos.src.rpm)

Owner

stgraber commented Jul 5, 2017

I think we may have fixed that already as we had a similar report for spaces a few days ago which was fixed with URL encoding. Let me try with master.

Owner

stgraber commented Jul 5, 2017

stgraber@castiana:~/data/code/lxc/lxd (stgraber/master)$ touch 1+2
stgraber@castiana:~/data/code/lxc/lxd (stgraber/master)$ lxc file push 1+2 docker/root/
stgraber@castiana:~/data/code/lxc/lxd (stgraber/master)$ lxc file pull docker/root/1+2 .

So yeah, this has been fixed already.

@stgraber stgraber closed this Jul 5, 2017

Owner

stgraber commented Jul 5, 2017

I didn't include that commit in my last cherry-pick for Ubuntu as it didn't apply cleanly, but I'll tweak it and upload the fix now, I believe the conflict was only in the testsuite which can be ignored.

powersj commented Jul 5, 2017

Thanks @stgraber!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment