Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Cloud-config doesn't seem to work with encoding: "gz+b64" or encoding: "gzip+base64" #2284

Closed
josmo opened this issue Mar 12, 2018 · 4 comments

Comments

@josmo
Copy link

josmo commented Mar 12, 2018

RancherOS Version: (ros os version)
ros version v1.0.1
also tried version v1.2.0 from os image rancher/os:v1.2.0

Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.)
AWS

While trying to use user-data with gzip/base64 encoding for the content it seems to ignore gzip.
tried encoding set to gz+b64 or gzip+base64

  - path: /home/rancher/vpn_server.config
    permissions: "0644"
    owner: root
    encoding: "gzip+base64"
    content: $(content in b64/gzip)

expected:
creates /home/rancher/vpn_server.config file

Actual:
creates a weird directory I imagined because it's ignoring the gzip portion.

@Jason-ZW Jason-ZW self-assigned this Mar 20, 2018
@Jason-ZW
Copy link

Jason-ZW commented Mar 26, 2018

@josmo Are you sure can create a weird directory? It should create nothing when set encoding "gzip+base64" base the current code logic. Could you please check and let me know system-docker log with the command system-docker logs -f console and the result shoud contain an error log such like this level=error msg="Error writing file" err="Unable to write file with encoding gzip+base64" path= .

@josmo
Copy link
Author

josmo commented Apr 2, 2018

@Jason-ZW looks like you're correct. With gzip+base64 it does give that error. I know there was a scenario where it created a weird directory, but looks like I can't repro now. Seems like 1.4 will support the gzip+base64 encoding at the file level :)

@kingsd041
Copy link
Contributor

@josmo
It has been fixed in rancherosv1.4.0-rc1 and I have tested it

@josmo
Copy link
Author

josmo commented May 18, 2018

@kingsd041
Thanks a bunch!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants