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

config validate should fail on configfiles in windows format #2631

Closed
ChrisMir opened this issue Jan 6, 2019 · 1 comment
Closed

config validate should fail on configfiles in windows format #2631

ChrisMir opened this issue Jan 6, 2019 · 1 comment

Comments

@ChrisMir
Copy link

ChrisMir commented Jan 6, 2019

RancherOS Version: (ros os version)
1.4.2 & 1.5.0

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

This has kept me busy for quiet some time. I composed a cloud-config.yml with notepad++ including basic networking and my ssh key. Moved the file to the installation device, validated (correctly) and installed ros with it, only to find out my ssh key was not accepted.

After some time I opened the configfile with vi, when I saw ^M at the end of each line, windows format!
So, changed the format to unix, redo all the steps and everything worked as expected.

I'd suggest the config validation function would at least give a warning when it encounters a windowformatted file

@kingsd041
Copy link
Contributor

In the RancherOS v1.5.1-rc1 version, we added verification of the windows format.

[root@rancher rancher]# ros config validate -i windows-format-test.yml
FATA[0000] file format shouldn't contain CRLF characters

@ChrisMir Thank you for your feedback

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