Bug #9193
closedForeman-config script broken
Description
The foreman-config script seems to be broken. When using -k/-v to set config values, the script simply returns a list of the current config values:
$ foreman-config -k key -v value
foreman-config script is deprecated. Please consider using `foreman-rake config` instead
administrator: ...
authorize_login_delegation: ...
authorize_login_delegation_api: ...
...
Instead, I would like it to actually update my configs. After come digging, I found the underlying 'rake' command was wrong:
https://github.com/theforeman/foreman/blob/1.7.1/script/foreman-config#L47
should be
exec('rake', '--', 'config', *rake_args)
This happens on at least:
Foreman 1.7.1, Ubuntu 14.04 LTS, Ruby 1.9.3
Updated by Lukas Zapletal almost 10 years ago
- Category set to Packaging
I just tested this on CentOS 6/7 and it works fine.
foreman-rake config -- -k puppet_interval -v 99
I am almost sure that we have it correctly. Can you paste bin your error and how to reproduce it?
Updated by William Hutson almost 10 years ago
Lukas Zapletal wrote:
I just tested this on CentOS 6/7 and it works fine.
foreman-rake config -- -k puppet_interval -v 99
I am almost sure that we have it correctly. Can you paste bin your error and how to reproduce it?
Hey Lukas,
Here's what I'm doing:
ubuntu@puppet:~$ sudo su - foreman s /bin/bash -k puppet_interval -v 99
foreman@puppet:~$ /usr/sbin/foreman-rake config -
administrator: ...
authorize_login_delegation: ...
authorize_login_delegation_api: ...
Note it's just listing the configs. But if I move the '--':
foreman@puppet:~$ /usr/sbin/foreman-rake -- config -k puppet_interval -v 99
99
I'm not sure if this is an Ubuntu issue, or a me issue :p
As a side note, this ticket is about the foreman-config (deprecated) script, which is being used by the puppet-foreman module, not foreman-rake.
Thanks for taking a look!
Updated by William Hutson almost 10 years ago
William Hutson wrote:
Lukas Zapletal wrote:
I just tested this on CentOS 6/7 and it works fine.
foreman-rake config -- -k puppet_interval -v 99
I am almost sure that we have it correctly. Can you paste bin your error and how to reproduce it?
Hey Lukas,
Here's what I'm doing:
ubuntu@puppet:~$ sudo su - foreman
s /bin/bash-k puppet_interval -v 99
foreman@puppet:~$ /usr/sbin/foreman-rake config -
administrator: ...
authorize_login_delegation: ...
authorize_login_delegation_api: ...Note it's just listing the configs. But if I move the '--':
foreman@puppet:~$ /usr/sbin/foreman-rake -- config -k puppet_interval -v 99
99I'm not sure if this is an Ubuntu issue, or a me issue :p
As a side note, this ticket is about the foreman-config (deprecated) script, which is being used by the puppet-foreman module, not foreman-rake.
Thanks for taking a look!
Rake version:
foreman@puppet:~$ /usr/sbin/foreman-rake --version
rake, version 10.4.2
Updated by Lukas Zapletal almost 10 years ago
- Pull request https://github.com/theforeman/foreman/pull/2122 added
- Pull request deleted (
)
Ok. Tested.
Updated by Anonymous almost 10 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset f05c31020587fa3f58e08a26a47530bd1ef26509.
Updated by Dominic Cleal almost 10 years ago
- Assignee set to William Hutson
- Translation missing: en.field_release set to 32