cobbler / koan

koan - kickstart over a network
https://koan.readthedocs.io/en/latest/
GNU General Public License v2.0
43 stars 32 forks source link

koan: Error with --update-files: curl: option --output : is unknown #20

Open plakdawa opened 8 years ago

plakdawa commented 8 years ago

Received the following error when using koan --update-files (ip and hostname modified below):

# koan --update-files
- looking for Cobbler at http://<ip>:80/cobbler_api
- Auto detected: <hostname>
- template map: {'/var/lib/cobbler/templates/pdit_ntp_conf.template': '/etc/ntp.conf'}
- processing for files to download...
- file: /etc/ntp.conf
- ['/usr/bin/curl', 'http://<ip>/cblr/svc/op/template/system/<hostname>/path/_etc_ntp.conf', '--output ', '/etc/ntp.conf']
curl: option --output : is unknown
curl: try 'curl --help' or 'curl --manual' for more information
command failed (2)

Confirmed that curl works fine by running the command manually. The template was properly rendered.

The version of koan:

# rpm -q koan
koan-2.6.11-7.1.noarch

The system is OracleLinux 7.2 which is binary compatible with RHEL 7.2

# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.2 (Maipo)
atimermann commented 8 years ago

Fix is quite simple: In app.py:

I changed here: cmd = ["/usr/bin/curl", url , "--output ", save_as] to cmd = ["/usr/bin/curl", url , "--output", save_as]