Bug 725542
| Summary: | Instance upgrade fails when upgrading 389-ds-base package | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Retired] 389 | Reporter: | Rob Crittenden <rcritten> | ||||||
| Component: | Install/Uninstall | Assignee: | Rich Megginson <rmeggins> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Viktor Ashirov <vashirov> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 1.2.9 | CC: | amsharma, edewata, nhosoi, nkinder, rmeggins, sramling | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | i686 | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | |||||||||
| : | 725912 (view as bug list) | Environment: | |||||||
| Last Closed: | 2015-12-07 17:06:47 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 434915, 639035, 708096, 725912 | ||||||||
| Attachments: |
|
||||||||
|
Description
Rob Crittenden
2011-07-25 19:45:58 UTC
I could reproduce the problem on my 32-bit laptop.
It may not be very accurate, but this diff works around the problem...
# diff /tmp/50fixNsState.pl.orig 50fixNsState.pl
51c51
< my $tssecs = ($ts - 0x01B21DD213814000) / 10000000;
---
> my $tssecs = $ts / 1000000 - 455204129;
Igmore my previous comment...
0x01B21DD213814000 = 122192928000000000
0x01B21DD213814000 / 10000000 = 12219292800
So, the work around would be:
my $tssecs = $ts / 1000000 - 12219292800;
or
my $tssecs = $ts / 1000000 - 0x2D8539C80;
Just great - rhel5 32-bit perl is not built with support for long long :-( (In reply to comment #3) > Just great - rhel5 32-bit perl is not built with support for long long :-( Are we filing a bug against 32-bit perl? I think it's a serious bug for perl users... (In reply to comment #4) > (In reply to comment #3) > > Just great - rhel5 32-bit perl is not built with support for long long :-( > > Are we filing a bug against 32-bit perl? I think it's a serious bug for perl > users... I'll try to find out. But we may not have a choice - we may have to find a workaround for 32-bit perl Created attachment 515383 [details]
0001-Bug-725542-Instance-upgrade-fails-when-upgrading-389.patch
Created attachment 515384 [details]
0001-Bug-725542-Instance-upgrade-fails-when-upgrading-389.patch
To ssh://git.fedorahosted.org/git/389/ds.git
c5bd907..077544c master -> master
commit 077544cad896413ec32801b565fbe220c91bc04e
Author: Rich Megginson <rmeggins>
Date: Tue Jul 26 14:46:05 2011 -0600
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: On 32-bit platforms, the pack 'Q' format specifier is not
available unless perl is explicitly compiled with 64-bit long long support.
Unfortunately, on RHEL/Fedora platforms, it is not. Same with native suppor
t
for 64-bit values - fortunately, the bigint package is available, so we use
it.
Additionally, the format flags '>' and '<' for little/big endianness are not
available on perl 5.8 and earlier, so they are not very portable. Finally,
the way we write the 32-bit unique id generator state is simply not usable.
We already skip it if going from 32-bit to 64-bit, so just ignore it if
going from 32-bit to 32-bit. The fix is to unpack the 64-bit integer
values using two 32-bit values, using 'V' first, then 'N' if we think the
value might be big-endian (e.g. sparc). For short values, 'v' or 'n'.
The 64-bit values are stored with the low part first, followed by the high
part. We convert these two 32-bit values to a native 64-bit value to
perform computations with it, then convert it back to two 32-bit values.
Then pack the values using the format for the current platform -
unfortunately we do not use a platform independent way to store the
nsState values.
Platforms tested: RHEL6 x86_64 and RHEL5 i386
Flag Day: no
Doc impact: no
Try upgrading from RHEL5 32-bit to RHEL6 32-bit Tested upgrade/migration of DS90 from DS8.2 on the listed platforms. RHEL4-32 to RHEL6-32 RHEL5-32 to RHEL6-32 setup-ds.pl -u, upgraded the instance successfully. Hence marking the bug as verified. |