Project

General

Profile

Actions

Bug #9193

closed

Foreman-config script broken

Added by William Hutson about 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Packaging
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

Actions #1

Updated by Lukas Zapletal about 9 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?

Actions #2

Updated by William Hutson about 9 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
foreman@puppet:~$ /usr/sbin/foreman-rake config -
-k puppet_interval -v 99
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!

Actions #3

Updated by William Hutson about 9 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
foreman@puppet:~$ /usr/sbin/foreman-rake config -
-k puppet_interval -v 99
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!

Rake version:

foreman@puppet:~$ /usr/sbin/foreman-rake --version
rake, version 10.4.2

Actions #4

Updated by Lukas Zapletal about 9 years ago

  • Pull request https://github.com/theforeman/foreman/pull/2122 added
  • Pull request deleted ()

Ok. Tested.

Actions #5

Updated by Anonymous about 9 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Dominic Cleal about 9 years ago

  • Assignee set to William Hutson
  • translation missing: en.field_release set to 32
Actions

Also available in: Atom PDF