*_pkey bugs

Trying to get through some provisioning use-cases with the latest
nightly builds and am getting stuck on:

https://bugzilla.redhat.com/show_bug.cgi?id=1079999
http://projects.theforeman.org/issues/4731
http://projects.theforeman.org/issues/4932

is anyone actively looking at these?

Mike

··· -- Mike McCune mmccune AT redhat.com Red Hat Engineering | Portland, OR Systems Management | 650-254-4248

I fixed this issue that happens only on PostgreSQL by adding a rake task

rake db:sequences:reset

https://github.com/theforeman/foreman/pull/1337

I think the issue happens when data is migrated to a database using COPY rather than INSERT, then the sequence is not updated.

Can somebody verify if this has ever happened on MySQL or SQLite3?

The fix setval() is only a PostgreSQL function

SELECT setval('environments_id_seq', (SELECT MAX(id) FROM environments));

Regards,

Joseph

··· ----- Original Message ----- > From: "Mike McCune" > To: foreman-dev@googlegroups.com > Sent: Friday, March 28, 2014 5:52:16 AM > Subject: [foreman-dev] *_pkey bugs > > Trying to get through some provisioning use-cases with the latest > nightly builds and am getting stuck on: > > https://bugzilla.redhat.com/show_bug.cgi?id=1079999 > http://projects.theforeman.org/issues/4731 > http://projects.theforeman.org/issues/4932 > > is anyone actively looking at these? > > Mike > -- > Mike McCune > mmccune AT redhat.com > Red Hat Engineering | Portland, OR > Systems Management | 650-254-4248 > > -- > You received this message because you are subscribed to the Google Groups > "foreman-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-dev+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. >

> I fixed this issue that happens only on PostgreSQL by adding a rake task
>
> rake db:sequences:reset
>
> https://github.com/theforeman/foreman/pull/1337
>
> I think the issue happens when data is migrated to a database using COPY rather than INSERT, then the sequence is not updated.
>
> Can somebody verify if this has ever happened on MySQL or SQLite3?
>
> The fix setval() is only a PostgreSQL function
>
> SELECT setval('environments_id_seq', (SELECT MAX(id) FROM environments));
>
> Regards,
>
> Joseph
We chatted online a bit to clarify this issue was seen on a production
install, not on an install where a db was copied. Also I did some
testing and was able to reproduce on a clean foreman nightly install
with orgs and locations enabled.

-Justin

··· On 03/30/2014 04:45 AM, Joseph Magen wrote:

----- Original Message -----

From: “Mike McCune” mmccune@redhat.com
To: foreman-dev@googlegroups.com
Sent: Friday, March 28, 2014 5:52:16 AM
Subject: [foreman-dev] *_pkey bugs

Trying to get through some provisioning use-cases with the latest
nightly builds and am getting stuck on:

https://bugzilla.redhat.com/show_bug.cgi?id=1079999
Bug #4731: Creating domain when organization selected produces duplicate key error - Foreman
Bug #4932: Creating Compute Resource results in DB error - Foreman

is anyone actively looking at these?

Mike

Mike McCune
mmccune AT redhat.com
Red Hat Engineering | Portland, OR
Systems Management | 650-254-4248


You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

>> I fixed this issue that happens only on PostgreSQL by adding a rake task
>>
>> rake db:sequences:reset
>>
>> https://github.com/theforeman/foreman/pull/1337
>>
>> I think the issue happens when data is migrated to a database using
>> COPY rather than INSERT, then the sequence is not updated.
>>
>> Can somebody verify if this has ever happened on MySQL or SQLite3?
>>
>> The fix setval() is only a PostgreSQL function
>>
>> SELECT setval('environments_id_seq', (SELECT MAX(id) FROM
>> environments));
>>
>> Regards,
>>
>> Joseph
> We chatted online a bit to clarify this issue was seen on a production
> install, not on an install where a db was copied. Also I did some
> testing and was able to reproduce on a clean foreman nightly install
> with orgs and locations enabled.
>
> -Justin

Also, I wanted to share that it seems to be isolated to Rails 3.2.8
(which el6 production installs use). I was able to see it on my dev
install when locking my rails & active record to those versions. What
is special about domains (and a couple other models), i do not know.

-Justin

··· On 03/30/2014 12:13 PM, Justin Sherrill wrote: > On 03/30/2014 04:45 AM, Joseph Magen wrote:

----- Original Message -----

From: “Mike McCune” mmccune@redhat.com
To: foreman-dev@googlegroups.com
Sent: Friday, March 28, 2014 5:52:16 AM
Subject: [foreman-dev] *_pkey bugs

Trying to get through some provisioning use-cases with the latest
nightly builds and am getting stuck on:

https://bugzilla.redhat.com/show_bug.cgi?id=1079999
Bug #4731: Creating domain when organization selected produces duplicate key error - Foreman
Bug #4932: Creating Compute Resource results in DB error - Foreman

is anyone actively looking at these?

Mike

Mike McCune
mmccune AT redhat.com
Red Hat Engineering | Portland, OR
Systems Management | 650-254-4248


You received this message because you are subscribed to the Google
Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it,
send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.