Import Puppet Classes - deletes assigned classes

Hi Everyone,

We recently upgraded our Foreman instance to 1.1 and found a very
unpleasant behavior of the importer:
We are now working on preparing our code for Puppet 3.
This means replacing all the "-" with "_" etc…
On Foreman 1.0.1, if I changed the class and imported it - the old class
still was in YAML, so I received an error report and could fix it without a
problem.
Now if the class is renamed - he just disappears from the ENC output, that
can lead to very uncomfortable situations if you are using lots of "purge"
like we do.

Any Suggestions? I checked "remove_classes_not_in_environment" option in
settings, but it had no effect.

Thanks in advance!

And one more strange thing - this how my class distribution graph now looks
like:

<https://lh5.googleusercontent.com/-WQyAXBrZV4E/UVvAaPQBZSI/AAAAAAACClA/4GGRGIzOkKQ/s1600/Screenshot+from+2013-04-03+08%3A32%3A41.png>

One more thing: here is what i receive in production log when i'm opening
statistics page:
Started GET "/statistics" for 192.168.1.5 at Wed Apr 03 10:43:55 +0300 2013
Processing by StatisticsController#index as HTML
skipped as it has has no label
Read fragment views/tabs_and_title_records-2 (0.2ms)
Rendered bookmarks/_list.html.erb (1.9ms)
Rendered bookmarks/_list.html.erb (247.6ms)
Rendered home/_settings.html.erb (5.4ms)
Write fragment views/tabs_and_title_records-2 (1.5ms)
Rendered home/_topbar.rhtml (266.8ms)
Rendered statistics/index.html.erb within layouts/application (284.7ms)
Completed 200 OK in 384ms (Views: 284.8ms | ActiveRecord: 32.3ms)

checked on fresh install today:
Installed foreman on Debian squeeze with Postresql, Added Smart Proxy and
imported classes.
Added class to new host, opened YAML and checked in database - class is
assigned.
deleted class from repo, made new import - class deleted despite to it was
assigned to host.
Should i open a bug in redmine?

OK, one more update:

Foreman does not deletes the class if it was assigned on the host group,
but he is deleting it if he was unassigned (good), or was assigned to host
(bad).

··· On Sunday, April 7, 2013 10:01:00 PM UTC+3, Andrei Burd wrote: > > checked on fresh install today: > Installed foreman on Debian squeeze with Postresql, Added Smart Proxy and > imported classes. > Added class to new host, opened YAML and checked in database - class is > assigned. > deleted class from repo, made new import - class deleted despite to it was > assigned to host. > Should i open a bug in redmine? >

This might be a bug indeed, please open a ticket with all possible
relevant info (e.g. logs) and we'll try our best to troubleshoot?

Ohad

··· On Wed, Apr 10, 2013 at 4:32 PM, Andrei Burd wrote: > OK, one more update: > > Foreman does not deletes the class if it was assigned on the host group, but > he is deleting it if he was unassigned (good), or was assigned to host > (bad). > > > On Sunday, April 7, 2013 10:01:00 PM UTC+3, Andrei Burd wrote: >> >> checked on fresh install today: >> Installed foreman on Debian squeeze with Postresql, Added Smart Proxy and >> imported classes. >> Added class to new host, opened YAML and checked in database - class is >> assigned. >> deleted class from repo, made new import - class deleted despite to it was >> assigned to host. >> Should i open a bug in redmine? > > -- > 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?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > >

Thanks Ohad, i opened a new Issue in Redmine,
Sorry for break into deep dive today, just did not wanted to open an issue
without confirmation.
Thanks for Foreman and deep dive!

··· On Wednesday, April 10, 2013 4:58:20 PM UTC+3, ohad wrote: > > This might be a bug indeed, please open a ticket with all possible > relevant info (e.g. logs) and we'll try our best to troubleshoot? > > Ohad > > On Wed, Apr 10, 2013 at 4:32 PM, Andrei Burd <burda...@gmail.com> > wrote: > > OK, one more update: > > > > Foreman does not deletes the class if it was assigned on the host group, > but > > he is deleting it if he was unassigned (good), or was assigned to host > > (bad). > > > > > > On Sunday, April 7, 2013 10:01:00 PM UTC+3, Andrei Burd wrote: > >> > >> checked on fresh install today: > >> Installed foreman on Debian squeeze with Postresql, Added Smart Proxy > and > >> imported classes. > >> Added class to new host, opened YAML and checked in database - class is > >> assigned. > >> deleted class from repo, made new import - class deleted despite to it > was > >> assigned to host. > >> Should i open a bug in redmine? > > > > -- > > 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?hl=en. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > >

> Thanks Ohad, i opened a new Issue in Redmine,
> Sorry for break into deep dive today, just did not wanted to open an issue
> without confirmation.

no worries, feel free to create issues as you see fit, worse case
we'll close them :slight_smile:

cheers,
Ohad

··· On Wed, Apr 10, 2013 at 10:28 PM, Andrei Burd wrote: > Thanks for Foreman and deep dive! > > > On Wednesday, April 10, 2013 4:58:20 PM UTC+3, ohad wrote: >> >> This might be a bug indeed, please open a ticket with all possible >> relevant info (e.g. logs) and we'll try our best to troubleshoot? >> >> Ohad >> >> On Wed, Apr 10, 2013 at 4:32 PM, Andrei Burd wrote: >> > OK, one more update: >> > >> > Foreman does not deletes the class if it was assigned on the host group, >> > but >> > he is deleting it if he was unassigned (good), or was assigned to host >> > (bad). >> > >> > >> > On Sunday, April 7, 2013 10:01:00 PM UTC+3, Andrei Burd wrote: >> >> >> >> checked on fresh install today: >> >> Installed foreman on Debian squeeze with Postresql, Added Smart Proxy >> >> and >> >> imported classes. >> >> Added class to new host, opened YAML and checked in database - class is >> >> assigned. >> >> deleted class from repo, made new import - class deleted despite to it >> >> was >> >> assigned to host. >> >> Should i open a bug in redmine? >> > >> > -- >> > 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?hl=en. >> > For more options, visit https://groups.google.com/groups/opt_out. >> > >> > > > -- > 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?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > >

Hi Ohad, I received it again today - class did not pass validation after
import and foreman took it out of hosts not hostgroups. deleted more that
300 exported resources collected =)

··· On Wednesday, April 10, 2013 10:35:34 PM UTC+3, ohad wrote: > > On Wed, Apr 10, 2013 at 10:28 PM, Andrei Burd <burda...@gmail.com> > wrote: > > Thanks Ohad, i opened a new Issue in Redmine, > > Sorry for break into deep dive today, just did not wanted to open an > issue > > without confirmation. > > no worries, feel free to create issues as you see fit, worse case > we'll close them :) > > cheers, > Ohad > > Thanks for Foreman and deep dive! > > > > > > On Wednesday, April 10, 2013 4:58:20 PM UTC+3, ohad wrote: > >> > >> This might be a bug indeed, please open a ticket with all possible > >> relevant info (e.g. logs) and we'll try our best to troubleshoot? > >> > >> Ohad > >> > >> On Wed, Apr 10, 2013 at 4:32 PM, Andrei Burd > wrote: > >> > OK, one more update: > >> > > >> > Foreman does not deletes the class if it was assigned on the host > group, > >> > but > >> > he is deleting it if he was unassigned (good), or was assigned to > host > >> > (bad). > >> > > >> > > >> > On Sunday, April 7, 2013 10:01:00 PM UTC+3, Andrei Burd wrote: > >> >> > >> >> checked on fresh install today: > >> >> Installed foreman on Debian squeeze with Postresql, Added Smart > Proxy > >> >> and > >> >> imported classes. > >> >> Added class to new host, opened YAML and checked in database - class > is > >> >> assigned. > >> >> deleted class from repo, made new import - class deleted despite to > it > >> >> was > >> >> assigned to host. > >> >> Should i open a bug in redmine? > >> > > >> > -- > >> > 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?hl=en. > >> > For more options, visit https://groups.google.com/groups/opt_out. > >> > > >> > > > > > -- > > 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?hl=en. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > >