I opened a bug: Bug #9597: FK violation when trying to delete a discovered host after provision - Discovery - Foreman
and started working on a solution.
If you have some more details or different steps to reproduce please add
them to the bug so I can test them too.
···
On Sat, Feb 28, 2015 at 6:31 PM, Stefan Lasiewski wrote:Oh, you are right. My issue is different from the parent issue. I was
confused by the thread.I will try and gather more info on Monday. Should I file a bug?
– Stefan
On Feb 28, 2015 8:27 AM, “Ori Rabin” orrabin@gmail.com wrote:Stefan,
I didn’t notice you are deleting through hammer,
pleas run ‘hammer -d host delete --id 83’ to get some more details about
the errorOn Sat, Feb 28, 2015 at 6:25 PM, Ori Rabin orrabin@gmail.com wrote:
Stefan,
patch 161 is not for this case, it fixes Anil’s problem but you are
getting another error (the same as Oleg).
Once I have steps to reproduce or answers to what I asked Oleg I will
try and reproduce your error and open up a bug or provide you with a
workaround.
If you can provide a part of the log around the error please do.
ThanksOn Sat, Feb 28, 2015 at 4:01 AM, Stefan Lasiewski stefan@stefanco.com >>> wrote:
I should point out, I’m not using Staypuft. I’m only using Foreman 1.7
and Foreman Discovery 2.0.0-1.-= Stefan
On Friday, February 27, 2015 at 5:13:08 PM UTC-8, Stefan Lasiewski >>>> wrote:
This is happening to me as well. I’ve been testing Foreman Discovery
2.0 on and off since RC1 was released, so I’m not sure my use case would be
helpful for you. What I see is that I cannot delete the host.stefanl@foreman:~ $ hammer host delete --id 83
Could not delete the host:
ERROR: update or delete on table “hosts” violates foreign key
constraint “tokens_host_id_fk” on table “tokens”
DETAIL: Key (id)=(83) is still referenced from table “tokens”.
stefanl@foreman:~ $How would I apply patch 161 to my Foreman system which was installed
using RPMs?Would the current fix be to delete the host from the Postgres database?
-= Stefan
-= Stefan
On Thursday, February 26, 2015 at 1:46:22 PM UTC-8, Ori Rabin wrote:
Anil, thanks for opening the bug.
Oleg, this is a different error, your validation is for
‘tokens_host_id_fk’ and not ‘discovery_attribute_sets_host_id_fk’.
Did this happen just for hosts that were already discovered and just
rebooted with the new issue or new discovered hosts too?
Did this happen also with hosts you created in the UI or just hosts
you provisioned from discovery?
Glad you found a workaround for now and looking forward to hear if
this can be recreated or exists only on a fresh installation.On Thu, Feb 26, 2015 at 11:18 PM, Oleg Mcnoleg stockf...@gmail.com >>>>>> wrote:
I was able to delete this host using a similar workaround in the
below.https://bugzilla.redhat.com/show_bug.cgi?id=1177145
- moved the host to development environment (from Production)
- turned the host to “managed” in the UI
and then was able to delete it.I will try and recreate the issue and report back with full steps.
–
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/d/optout.–
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.–
You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/NP182Z6qlwA/unsubscribe.
To unsubscribe from this group and all its topics, 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.–
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.