Foreman - import changes puppet classes does not work

Hi,

I use foreman 1.4.0~rc1-1, Ubuntu 12.04

I create follow class.

class tp_test {
file {'testfile':
path => '/tmp/testfile',
ensure => present,
mode => 0640,
content => "I'm a test file.",
}
}

Import runs fine via GUI: Configure -> puppet classes -> Import from …
I don't assign this class to any host.

Now I change this file:

class tp_test {
file {'testfile':
path => '/tmp/testfile',
ensure => present,
mode => 0644,
content => "Another mode and content",
}
}

Again to try an import: Configure -> puppet classes -> Import from …

Result: No changes to your enviroments detected.

I tried it on a console too:

  1. delete class tp_test via foreman gui.
  2. import class
    root@myhost:/usr/share/foreman# RAILS_ENV=production rake
    puppet:import:puppet_classes
    Evaluating possible changes to your installation
    Scheduled changes to your environment
    New environments
    [deprecated] I18n.enforce_available_locales will default to true in the
    future. If you really want to skip validation of your locale you can set
    I18n.enforce_available_locales = false to avoid this message.
    production : tp_test
    Updated environments
    Delete environments

Proceed with these modifications? <yes|no> yes
Import complete

  1. change content of file and run import again
    root@myhost:/usr/share/foreman# RAILS_ENV=production rake
    puppet:import:puppet_classes
    Evaluating possible changes to your installation
    No changes detected

What have I to change in my setup, or is this a bug?

Best regards,
thomas.

That's correct behaviour - as far as Foreman's concerned, the class
hasn't changed in a meaningful way.

Foreman only records the class names, parameters and default values.
Since you haven't changed how the class looks externally, no import to
Foreman is required, and it won't record any changes.

However Puppet will pick up the change and should correctly change the
mode and file content on the next checkin.

··· -- Dominic Cleal Red Hat Engineering

On 07/03/14 12:49, tp wrote:

Hi,

I use foreman 1.4.0~rc1-1, Ubuntu 12.04

I create follow class.

class tp_test {
file {‘testfile’:
path => ‘/tmp/testfile’,
ensure => present,
mode => 0640,
content => “I’m a test file.”,
}
}

Import runs fine via GUI: Configure -> puppet classes -> Import from …
I don’t assign this class to any host.

Now I change this file:

class tp_test {
file {‘testfile’:
path => ‘/tmp/testfile’,
ensure => present,
mode => 0644,
content => “Another mode and content”,
}
}

Again to try an import: Configure -> puppet classes -> Import from …

Result: No changes to your enviroments detected.

I tried it on a console too:

  1. delete class tp_test via foreman gui.
  2. import class
    root@myhost:/usr/share/foreman# RAILS_ENV=production rake
    puppet:import:puppet_classes
    Evaluating possible changes to your installation
    Scheduled changes to your environment
    New environments
    [deprecated] I18n.enforce_available_locales will default to true in the
    future. If you really want to skip validation of your locale you can set
    I18n.enforce_available_locales = false to avoid this message.
    production : tp_test
    Updated environments
    Delete environments

Proceed with these modifications? <yes|no> yes
Import complete

  1. change content of file and run import again
    root@myhost:/usr/share/foreman# RAILS_ENV=production rake
    puppet:import:puppet_classes
    Evaluating possible changes to your installation
    No changes detected

What have I to change in my setup, or is this a bug?

Best regards,
thomas.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com
mailto:foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com
mailto:foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.