[Spacewalk-list] bug in channel.software.mergeErrata?

Tomáš Kašpárek tkaspare at redhat.com
Tue Sep 12 07:11:43 UTC 2017


Hello,

I'll try to reproduce the issue as it looks like a bug in our code, 
especially if someone else could confirm that after upgrade to 2.6 this 
can be seen consistently on any machine.
The changes in commit 95345b58a86b134084bcc5a8c07ae452f1574670 are not 
causing this as the change is about requesting repodata regeneration 
only once instead of twice.

Tomas

On 09/11/2017 03:40 PM, Florian Gleixner wrote:
> Am 30.08.2017 um 15:33 schrieb Lichtinger, Bernhard:
>> Hello,
>>
>> I see a strange behavior of spacewalk using 
>> spacewalk-manage-channel-lifecycle:
>> Everytime I promote a channel all erratas which source and 
>> destination channel have in common are removed from the source channel.
>>
>> For example: source channel has 4 (newer) errata more than the 
>> destination channel. Then after running 
>> "spacewalk-manage-channel-lifecycle -c source_channel --promote" my 
>> destination channel has all old errata plus the 4 new ones, but my 
>> source channel has only the 4 new errata left.
>>
>> The rpm packages in each channel are still linked to the errata, but 
>> the source channel looses all "old" erratas.
>>
>> It happens with all my channels, RHEL-6,7 and SLES-11,12.
>>
>> I have spacewalk-2.6 on centos-7. I can also reproduce the behavior 
>> on my test machine with spacewalk-2.6 on centos-6:
>> I have 2 phases for spacewalk-manage-channel-lifecycle defined: test 
>> and prod.
>> So I have 3 baselines of channels: daily (is synced daily with 
>> upstream repos), test and prod.
>>
>> For a fresh start I clear all erratas from the database:
>> rhnschema=# truncate rhnErrata CASCADE;;
>>
>> After a full sync of daily with upstream repo, errata count for my 
>> channels:
>> daily:    590
>> test:    0
>> prod:    0
>>
>> After "spacewalk-manage-channel-lifecycle -c daily --promote" errata 
>> count for my channels:
>> daily:    590
>> test:    590
>> prod:    0
>>
>> After "spacewalk-manage-channel-lifecycle -c test --promote" errata 
>> count for my channels:
>> daily:    590
>> test:    590
>> prod:    590
>>
>> So far everything is ok.
>>
>> Now I after a second "spacewalk-manage-channel-lifecycle -c daily 
>> --promote" errata count for my channels:
>> daily:    0
>> test:    590
>> prod:    590
>>
>> And after a second "spacewalk-manage-channel-lifecycle -c test 
>> --promote" errata count for my channels:
>> daily:    0
>> test:    0
>> prod:    590
>>
>> With the next sync of daily with upstream daily gets again all erratas:
>> daily:    590
>> test:    0
>> prod:    590
>>
>> And this cycle can go on and on.
>>
>> I am not sure, but I think this started after the upgrade from 2.5 to 
>> 2.6, but I could not find any relevant changes in the source code of 
>> the channel.software.mergeErrata API call. This is all code which was 
>> not touched in recent times.
>>
>> So, is this a bug in spacewalk or did I only break my installations?
>>
>>
>
> Hi,
>
> i did some more debugging, and when turning on hibernate logging i see 
> a delete command, that seems to be responsible for deleting erratas in 
> this case:
>
> [2017-09-05 17:44:44,128] DEBUG - Pre-invalidating space 
> [rhnChannelErrata]
> [2017-09-05 17:44:44,128] DEBUG - Deleting collection: 
> [com.redhat.rhn.domain.channel.Channel.erratas#212]
> [2017-09-05 17:44:44,128] DEBUG - about to open PreparedStatement 
> (open PreparedStatements: 0, globally: 0)
> [2017-09-05 17:44:44,128] DEBUG - delete from rhnChannelErrata where 
> channel_id=?
> [2017-09-05 17:44:44,128] DEBUG - delete from rhnChannelErrata where 
> channel_id=?
> [2017-09-05 17:44:44,130] DEBUG - done deleting collection
>
> Digging in spacewalks source i could not find many changes in 2.6 that 
> can be responsible for that. One candidate is commit 
> 95345b58a86b134084bcc5a8c07ae452f1574670 from Tomas Lestach, but i do 
> not fully understand the code, so probably Tomas or another one can 
> have a look at our issue? If you need more logs, we can send them.
>
> Thanks
>
> Florian
>
>
>
>
>
>
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20170912/93c341f5/attachment.htm>


More information about the Spacewalk-list mailing list