Foreman Smart Parameters won't override or update

Hi All,

I am running into an issue where I have made an update to a puppet class,
and imported the changes. The problem is that the old parameters (which do
not exist with the class anymore) will not delete. I am not sure if it is
an issue with the database backend or not.

Output from importing new class from web interface:

Started POST "/environments/obsolete_and_new" for 0.0.0.0 at 2014-01-01
11:44:52 -0500

Processing by EnvironmentsController#obsolete_and_new as HTML

Parameters: {"utf8"=>"✓", "authenticity_token"=>"XXXXXXXXXXXXXXXX",
"changed"=>{"updated"=>{"dev"=>"{"yum":{"obsolete":["kernel_update"]}}",
"production"=>"{"yum":{"obsolete":["kernel_update"]}}"}},
"commit"=>"Update"}

Redirected to https://puppet.example.com/environments

Completed 302 Found in 14ms (ActiveRecord: 3.2ms

Nothing actually updates.

From the command line, the foreman-rake utility shows no updates need done.

Any help is appreciated!

Thanks!

Some Additional Information:

puppet-3.4.1-1.el6.noarch

ruby193-puppet-3.1.1-6.el6.noarch

puppet-server-3.4.1-1.el6.noarch

puppetdb-1.5.2-1.el6.noarch

puppetdb-terminus-1.5.2-1.el6.noarch

ruby193-rubygem-foreman_discovery-1.1.1-1.el6.noarch

rubygem-foreman_api-0.1.9-1.el6.noarch

foreman-installer-1.3.1-1.el6.noarch

ruby193-rubygem-puppetdb_foreman-0.0.4-2.el6.noarch

ruby193-rubygem-foreman_hooks-0.3.3-1.el6.noarch

foreman-proxy-1.3.0-1.el6.noarch

ruby193-rubygem-foreman_discovery-doc-1.1.1-1.el6.noarch

foreman-1.3.2-1.el6.noarch

ruby193-rubygem-foreman_hooks-doc-0.3.3-1.el6.noarch

ruby193-rubygem-foremancli-1.0-6.el6.noarch

rubygem-hammer_cli_foreman-0.0.15-1.el6.noarch

foreman-postgresql-1.3.2-1.el6.noarch

So an update on this issue:

I removed the affected class completely from Foreman and re-added it. That
finally removed the non-existent class parameter. Has anyone else ran into
any similar situations like this? This is the first time I have seen this
issue.

Thanks!

> Hi All,
>
> I am running into an issue where I have made an update to a puppet class,
> and imported the changes. The problem is that the old parameters (which do
> not exist with the class anymore) will not delete. I am not sure if it is
> an issue with the database backend or not.
>

As far as I remember, we decided against deleting parameters with data from
the database, even if they are no longer assigned to a particular
class/environment…
can you:

  1. confirm that they are still visible in the class parameters?
  2. open a bug with a steps to reproduce?

thanks
Ohad

··· On Wed, Jan 1, 2014 at 9:28 PM, wrote:

Output from importing new class from web interface:

Started POST “/environments/obsolete_and_new” for 0.0.0.0 at 2014-01-01
11:44:52 -0500

Processing by EnvironmentsController#obsolete_and_new as HTML

Parameters: {“utf8”=>“✓”, “authenticity_token”=>“XXXXXXXXXXXXXXXX”,
“changed”=>{“updated”=>{“dev”=>"{“yum”:{“obsolete”:[“kernel_update”]}}",
“production”=>"{“yum”:{“obsolete”:[“kernel_update”]}}"}},
“commit”=>“Update”}

Redirected to https://puppet.example.com/environments

Completed 302 Found in 14ms (ActiveRecord: 3.2ms

Nothing actually updates.

From the command line, the foreman-rake utility shows no updates need done.

Any help is appreciated!

Thanks!


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.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.

Ok, final update on this. I really feel lame…but I figured out what I
was doing. I was editing my puppet module and changing the name of one of
the smart parameters that was being overridden. The puppet class would
import ok…but the old parameter and new parameter were both present
(causing errors on runs). My issue was that I was setting the new
parameter, but not deleting the old one before submitting. This resulted
in an error in saving any changes.

> Ok, final update on this. I really feel lame…but I figured out what I
> was doing. I was editing my puppet module and changing the name of one of
> the smart parameters that was being overridden. The puppet class would
> import ok…but the old parameter and new parameter were both present
> (causing errors on runs). My issue was that I was setting the new
> parameter, but not deleting the old one before submitting. This resulted
> in an error in saving any changes.
>

Ah, good to know, I assume that what I was referring earlier was to leaving
the parameters value in the db, but they no longer linked to the class.

Ohad

··· On Wed, Jan 1, 2014 at 10:29 PM, wrote:


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.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Ohad,

You are correct. The values stay in the database, but do not link to any
class.

Thanks!

Chuck

··· On Wednesday, January 1, 2014 4:19:31 PM UTC-5, ohad wrote: > > > > > On Wed, Jan 1, 2014 at 10:29 PM, <gilbe...@gmail.com > wrote: > >> Ok, final update on this. I really feel lame.....but I figured out what >> I was doing. I was editing my puppet module and changing the name of one >> of the smart parameters that was being overridden. The puppet class would >> import ok....but the old parameter and new parameter were both present >> (causing errors on runs). My issue was that I was setting the new >> parameter, but not deleting the old one before submitting. This resulted >> in an error in saving any changes. >> > > Ah, good to know, I assume that what I was referring earlier was to > leaving the parameters value in the db, but they no longer linked to the > class. > > Ohad > >> >> >> -- >> 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-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/groups/opt_out. >> > >