While attempting to use migrate-ds-admin.pl, I received the following errors: Global symbol "$admininf" requires explicit package name at /usr/lib64/dirsrv/perl/AdminMigration.pm line 298. Global symbol "$admininf" requires explicit package name at /usr/lib64/dirsrv/perl/AdminMigration.pm line 300. Compilation failed in require at /usr/sbin/migrate-ds-admin.pl line 24. BEGIN failed--compilation aborted at /usr/sbin/migrate-ds-admin.pl line 24. According to richm, this was introduced when getInfs was recently added.
Created attachment 510767 [details] Patch
Comment on attachment 510767 [details] Patch I don't think this will work - ConsoleVersion is in one of the Inf objects in the @infs array. You'll need to add some sort of routine that gets a value given a list of Inf objects - it should return the first value found. The @infs list is in order with the "admin" first - it should pull the value from that - if using redhat-ds-admin, then it will pull the value from the redhat-admin.inf, otherwise, from the generic admin.inf
Created attachment 510878 [details] 0001-Bug-718079-Perl-errors-when-running-migrate-ds-admin.patch
Created attachment 510891 [details] 0001-Bug-718079-Perl-errors-when-running-migrate-ds-admin.patch
To ssh://git.fedorahosted.org/git/389/admin.git 81f194a..26efc6d master -> master commit 26efc6d06796e1493763eab3e67e02034a44c432 Author: Rich Megginson <rmeggins> Date: Fri Jul 1 09:17:15 2011 -0600 Reviewed by: nkinder, nhosoi (Thanks!) Branch: master Fix Description: We may not have a single $admininf object if there is a skin package, so get the first value from the list of Inf objects. Added a new function getInfsVal to get the value from a list of Inf objects given a section and a parameter. 30updateglobalprefs was using the wrong map - we don't need the configds map if we're just doing updates. during migration ConfigDirectoryAdminID can be just a userid - do not assume it will always be a DN Had to amend my previous patch - ConfigDirectoryAdminID was not being set Platforms tested: Fedora 15 x86_64 Flag Day: no Doc impact: no
I am getting the same error mentioned in comment#0. [root@rheltest ~]# migrate-ds-admin.pl Global symbol "$admininf" requires explicit package name at /usr/lib64/dirsrv/perl/AdminMigration.pm line 298. Global symbol "$admininf" requires explicit package name at /usr/lib64/dirsrv/perl/AdminMigration.pm line 300. Compilation failed in require at /usr/sbin/migrate-ds-admin.pl line 24. BEGIN failed--compilation aborted at /usr/sbin/migrate-ds-admin.pl line 24. [root@rheltest ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.1 (Santiago) [root@rheltest ~]# rpm -qa | grep 389 389-console-1.1.7-1.el6.noarch 389-ds-console-doc-1.2.6-1.el6.noarch 389-ds-base-devel-1.2.8.2-1.el6_1.5.x86_64 389-ds-base-1.2.8.2-1.el6_1.5.x86_64 389-adminutil-1.1.14-1.el6.x86_64 389-admin-console-1.1.7-1.el6.noarch 389-adminutil-devel-1.1.14-1.el6.x86_64 389-ds-base-debuginfo-1.2.8.2-1.el6_1.3.x86_64 389-ds-base-libs-1.2.8.2-1.el6_1.5.x86_64 389-admin-1.1.18-4.el6.x86_64 389-ds-1.2.1-2.el6.noarch 389-admin-console-doc-1.1.7-1.el6.noarch 389-ds-console-1.2.6-1.el6.noarch [root@rheltest ~]# rpm -qa | grep redhat redhat-ds-admin-9.0.0-0.2.el6.x86_64 redhat-idm-console-9.0.0-1.el6.x86_64 redhat-logos-60.0.14-1.el6.noarch redhat-menus-14.0.0-3.el6.noarch redhat-ds-console-9.0.0-1.el6.noarch redhat-ds-console-doc-9.0.0-1.el6.noarch redhat-lsb-4.0-3.el6.x86_64 redhat-ds-base-9.0.0-0.17.el6dsrv.x86_64 redhat-admin-console-9.0.0-1.el6.noarch redhat-admin-console-doc-9.0.0-1.el6.noarch redhat-bookmarks-6-1.el6.noarch redhat-lsb-graphics-4.0-3.el6.x86_64 redhat-lsb-printing-4.0-3.el6.x86_64 redhat-ds-9.0.0-1.el6.x86_64 redhat-indexhtml-6-1.el6.noarch redhat-release-server-6Server-6.1.0.2.el6.x86_64 [root@rheltest ~]# After upgrading to the latest packages : [root@rhel61 ~]# migrate-ds-admin.pl Could not find any instances in the old directory '/opt/389-ds' to migrate. 389 Directory Server Migration Program Version 1.2.8.5 INTRODUCTION This script will copy instances (data and configuration) from the old server root directory to their new FHS locations. This script does a copy only - the data in the old instances will be left untouched. The old instances must be shutdown first to ensure that the databases are copied safely. During migration your migrated instances will be started. USAGE /usr/sbin/migrate-ds-admin.pl [--options] -- [args] options: --help This message --version Print the version and exit --debug Turn on debugging --oldsroot The old server root directory to migrate from --actualsroot This is the old location of the old server root. See below. --silent Use silent setup - no user input --file=name Use the file 'name' in .inf format to supply the default answers --keepcache Do not delete the temporary .inf file generated by this program --logfile Log migration messages to this file - otherwise, a temp file will be used --instance By default, all directory server instances will be migrated. You can use this argument to specify one or more (e.g. -i slapd-foo -i slapd-bar) if you do not want to migrate all of them. --cross See below. For all options, you can also use the short name e.g. -h, -d, etc. For the -d argument, specifying it more than once will increase the debug level e.g. -ddddd args: You can supply default .inf data in this format: section.param=value e.g. General.FullMachineName=foo.example.com or "slapd.Suffix=dc=example,dc=com" Values passed in this manner will override values in an .inf file given with the -f argument. actualsroot: This is used when you must migrate from one machine to another. The usual case is that you have mounted the old server root on a different root directory, either via a network mount, or by copying a tarball made using a relative directory on the source machine to the Hence VERIFIED.