Bug 789094

Summary: unable to successfully run `setup-ds-admin.pl -u`
Product: Red Hat Enterprise Linux 6 Reporter: Joshua Roys <roysjosh>
Component: 389-ds-baseAssignee: Rich Megginson <rmeggins>
Status: CLOSED WORKSFORME QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1CC: jgalipea
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-28 01:48: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:

Description Joshua Roys 2012-02-09 19:33:23 UTC
Description of problem:
Coming from a 1.2.8.3 install, `setup-ds-admin.pl --update` is unable to successfully run to completion.

Version-Release number of selected component (if applicable):
389-admin-1.1.25-1.el6.x86_64
389-admin-console-1.1.8-1.el6.noarch
389-admin-console-doc-1.1.8-1.el6.noarch
389-adminutil-1.1.14-2.el6.x86_64
389-adminutil-devel-1.1.14-2.el6.x86_64
389-ds-base-1.2.9.14-1.el6_2.2.x86_64
389-ds-base-libs-1.2.9.14-1.el6_2.2.x86_64

Steps to Reproduce:
1. install 1.2.8.3
2. update to 1.2.9.14
3. attempt to run `setup-ds-admin.pl -u`
  
Actual results:
+Running stage runinst update /usr/share/dirsrv/updates/50fixNsState.pl
+Converted old nsState val in cn=replica,cn=dc\3Dctisl\2Cdc\3Dgtri\2Cdc\3Dorg,cn=mapping tree,cn=config from 0200000000000000ddd92f4f00000000000000000000000001000000000000000100000000000000 to 0200000000000000ddd92f4f00000000000000000000000000000000000000000100000000000000
Error updating entry 'cn=replica,cn=dc\3Dctisl\2Cdc\3Dgtri\2Cdc\3Dorg,cn=mapping tree,cn=config'.  Error: Server is unwilling to perform
Could not reconfigure the admin server.
Exiting . . .

Expected results:
Successful update.

Additional info:
<richm> roysjosh_: looks like a bug in upgrade - try moving /usr/share/dirsrv/updates/50fixNsState.pl out of the updates directory
<roysjosh_> ok
<roysjosh_> richm, yep, that allows it to finish
<richm> roysjosh_: please file a ticket or a bug if you are Red Hat customer

Comment 2 Nathan Kinder 2012-02-27 21:52:36 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/309

Comment 3 Rich Megginson 2012-03-06 21:25:03 UTC
Did you upgrade from 32-bit to 64-bit?
What version of perl are you using?
Can you provide the output of
perl -V
?

I tried to reproduce by going from 1.2.8.3 -> 1.2.10.3 - it worked - it did not change the value from 0200000000000000ddd92f4f00000000000000000000000001000000000000000100000000000000 to 0200000000000000ddd92f4f00000000000000000000000000000000000000000100000000000000

What should happen is this:

during yum/rpm upgrade, the %posttrans script does this:
shutdown all servers
run setup-ds.pl -u in offline mode - this should fix nsState and update the value directly in the dse.ldif
start up the servers

then, after yum upgrade, when you run setup-ds-admin.pl -u, the value should already have been fixed, so nothing should be done

So I'm not sure why it is trying to update the value in setup-ds-admin.pl -u

Comment 4 Joshua Roys 2012-03-08 18:45:02 UTC
No, no upgrades here.  We started with a fresh install of RHEL6 and installed 389-ds 1.2.8.3 on it.  (We had rolled our own from the rhel5 srpms initially, FYI in our own koji instance.)

perl-5.10.1-119.el6_1.1.x86_64

Summary of my perl5 (revision 5 version 10 subversion 1) configuration:
   
  Platform:
    osname=linux, osvers=2.6.18-274.3.1.el5, archname=x86_64-linux-thread-multi
    uname='linux hs20-bc2-5.build.redhat.com 2.6.18-274.3.1.el5 #1 smp fri aug 26 18:49:02 edt 2011 x86_64 x86_64 x86_64 gnulinux '
    config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DDEBUGGING=-g -Dversion=5.10.1 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl5 -Dsitearch=/usr/local/lib64/perl5 -Dprivlib=/usr/share/perl5 -Darchlib=/usr/lib64/perl5 -Dvendorlib=/usr/share/perl5/vendor_perl -Dvendorarch=/usr/lib64/perl5/vendor_perl -Dinc_version_list=5.10.0 -Darchname=x86_64-linux-thread-multi -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dscriptdir=/usr/bin'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.4.5 20110214 (Red Hat 4.4.5-6)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -fstack-protector'
    libpth=/usr/local/lib64 /lib64 /usr/lib64
    libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.12'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL
                        USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
                        USE_PERLIO USE_REENTRANT_API
  Built under linux
  Compiled at Oct  4 2011 10:53:24
  @INC:
    /usr/local/lib64/perl5
    /usr/local/share/perl5
    /usr/lib64/perl5/vendor_perl
    /usr/share/perl5/vendor_perl
    /usr/lib64/perl5
    /usr/share/perl5
    .


The only reason I tried to run it by hand is that I noticed that the version in the console was still 1.2.8.3 (and still is even after running it by hand + removing that file to get it to work- but that's a different issue).

If you can't reproduce, feel free to close as WORKSFORME.

Comment 5 Rich Megginson 2012-03-08 19:06:55 UTC
(In reply to comment #4)
> No, no upgrades here.  We started with a fresh install of RHEL6 and installed
> 389-ds 1.2.8.3 on it.  (We had rolled our own from the rhel5 srpms initially,
> FYI in our own koji instance.)
> 
> perl-5.10.1-119.el6_1.1.x86_64
> 

ok - does not appear to be perl related

> 
> 
> The only reason I tried to run it by hand is that I noticed that the version in
> the console was still 1.2.8.3 (and still is even after running it by hand +
> removing that file to get it to work- but that's a different issue).

So you started with RHEL6 - then installed your own 1.2.8.3 built from srpm - then did a yum upgrade to 1.2.9.14?

I'm trying to figure out if the upgrade to 1.2.9.14 ran the setup-ds.pl -u while the servers were offline and, if so, why it did not fix nsstate.

The issue is that setup-ds-admin.pl -u must run while the servers are online, and nsState cannot be modified while the servers are online.

You might be able to do this:
shutdown all servers
run setup-ds.pl -u in offline mode
startup all servers
run setup-ds-admin.pl -u

> 
> If you can't reproduce, feel free to close as WORKSFORME.

So far I can't, but I feel I must not be doing exactly what you did.

Comment 6 Joshua Roys 2012-03-16 18:44:40 UTC
Looking at the /var/log/yum.logs the history is a little more complicated than I remember: 1.2.7.5 -> 1.2.8.1 -> 1.2.8.3 -> 1.2.9.14.

We have Spacewalk running and pushing out updates automatically, so some 389 packages were updated without me noticing for a few days.  I'm guessing the update scripts were ran properly (although they may have barfed about the nsState then, too).  A look at the rpm scripts says that the upgrade would have stopped, upgraded, started 389.

Again, the only real reason I attempted to (re-?)run the upgrade script was the annoying little Version string in the console that still says 1.2.8.3.  As somewhat of a perfectionist this bothers me :)  If you can't reproduce any of these things then I am perfectly okay with closing this out.