Hi,
I installed foreman separately from a master, after I imported class from master, I found the agents could be cataloged from master with puppet agent —test any more, and there was even no error messages from command lines, it seems the only way to make it work is to apply classes to host groups in foreman. And when I tried to delete classes from foreman, I got :
Warning!
ERROR: update or delete on table "puppetclasses" violates foreign key constraint "environment_classes_puppetclass_id_fk" on table "environment_classes" DETAIL: Key (id)=(5) is still referenced from table "environment_classes”.
So how could I enable the catalog from both foreman and command-line, and how could delete classes from foreman? Thanks in advance.
Regards
He Junfeng
> Hi,
> I installed foreman separately from a master, after I imported class
> from master, I found the agents could be cataloged from master with
> puppet agent —test any more, and there was even no error messages from
> command lines, it seems the only way to make it work is to apply classes
> to host groups in foreman.
Sorry, I don't understand what's happening here. Are you saying that
the Puppet agent runs and makes no changes without error? Can you
provide logs?
Does your separate Puppet master have an ENC set up?
http://theforeman.org/manuals/1.5/index.html#3.5.5FactsandtheENC
> And when I tried to delete classes from
> foreman, I got :
>
>
> Warning!
>
> ERROR: update or delete on table "puppetclasses" violates foreign key
> constraint "environment_classes_puppetclass_id_fk" on table
> "environment_classes" DETAIL: Key (id)=(5) is still referenced from
> table "environment_classes”.
This is a known bug. If you want to remove the class from Foreman, do
so via the import - delete it from the Puppet master and then import the
change.
···
On 06/08/14 05:53, Junfeng He wrote:
–
Dominic Cleal
Red Hat Engineering
Yes, I did. Below is the log,
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Caching catalog for ca01.test.com
Info: Applying configuration version '1407309963'
Notice: Finished catalog run in 0.03 seconds
Now the classes can only be distributed from foreman.
···
On 8/6/14, 16:07, "Dominic Cleal" wrote:
On 06/08/14 05:53, Junfeng He wrote:
Hi,
I installed foreman separately from a master, after I imported class
from master, I found the agents could be cataloged from master with
puppet agent --test any more, and there was even no error messages from
command lines, it seems the only way to make it work is to apply classes
to host groups in foreman.
Sorry, I don’t understand what’s happening here. Are you saying that
the Puppet agent runs and makes no changes without error? Can you
provide logs?
Does your separate Puppet master have an ENC set up?
Foreman :: Manual
And when I tried to delete classes from
foreman, I got :
Warning!
ERROR: update or delete on table “puppetclasses” violates foreign key
constraint “environment_classes_puppetclass_id_fk” on table
"environment_classes" DETAIL: Key (id)=(5) is still referenced from
table “environment_classes”.
This is a known bug. If you want to remove the class from Foreman, do
so via the import - delete it from the Puppet master and then import the
change.
–
Dominic Cleal
Red Hat Engineering
–
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/d/optout.
Try running the ENC and see if it returns any output for your host:
/etc/puppet/node.rb ca01.test.com
You need to narrow down whether the ENC (and Foreman, which can be
viewed via the YAML button on a host's page) are returning no classes
for your host, or if the Puppet master isn't configured to execute
node.rb and so it's returning nothing.
···
--
Dominic Cleal
Red Hat Engineering
On 06/08/14 10:05, Junfeng He wrote:
Yes, I did. Below is the log,
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Caching catalog for ca01.test.com
Info: Applying configuration version '1407309963’
Notice: Finished catalog run in 0.03 seconds
Now the classes can only be distributed from foreman.
On 8/6/14, 16:07, “Dominic Cleal” dcleal+g@redhat.com wrote:
On 06/08/14 05:53, Junfeng He wrote:
Hi,
I installed foreman separately from a master, after I imported class
from master, I found the agents could be cataloged from master with
puppet agent --test any more, and there was even no error messages from
command lines, it seems the only way to make it work is to apply classes
to host groups in foreman.
Sorry, I don’t understand what’s happening here. Are you saying that
the Puppet agent runs and makes no changes without error? Can you
provide logs?
Does your separate Puppet master have an ENC set up?
Foreman :: Manual
And when I tried to delete classes from
foreman, I got :
Warning!
ERROR: update or delete on table “puppetclasses” violates foreign key
constraint “environment_classes_puppetclass_id_fk” on table
"environment_classes" DETAIL: Key (id)=(5) is still referenced from
table “environment_classes”.
This is a known bug. If you want to remove the class from Foreman, do
so via the import - delete it from the Puppet master and then import the
change.
–
Dominic Cleal
Red Hat Engineering
–
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/d/optout.