#49754 Instance created using dscreate can't be upgraded
Closed: wontfix 3 years ago Opened 3 years ago by vashirov.

Issue Description

I had an instance created using dscreate. I ran dnf update 389-ds-base to update to the latest rpm available in repos and noticed that it hanged during upgrade script.

RPM scriptlet was running perl /usr/sbin/setup-ds.pl -u -s General.UpdateMode=offline and it consumed all available memory and eventually got killed by OOM.

Package Version and Platform

389-ds-base-1.4.0.9-2.fc28.x86_64

Steps to reproduce

[root@server ~]# dscreate example > test                                                                                                                                    
[root@server ~]# dscreate fromfile test
READY: Preparing installation for localhost
READY: Beginning installation for localhost
Created symlink /etc/systemd/system/multi-user.target.wants/dirsrv@localhost.service → /usr/lib/systemd/system/dirsrv@.service.                                             
FINISH: Completed installation for localhost
FINISH: Command succeeded
[root@server ~]# stop-dirsrv
Stopping instance "localhost"
[root@server ~]# perl  /usr/sbin/setup-ds.pl -u -s General.UpdateMode=offline
Updating instance (slapd-localhost)...
Out of memory!

Output with trace generates huge file

[root@server ~]# perl -d:Trace /usr/sbin/setup-ds.pl -u -s General.UpdateMode=offline -ddddd 2> debug

Looks like it loops infinitely in /usr/lib64/dirsrv/perl/DSUtil.pm at line 1026

 1010 # like File::Path mkpath, except we can set the owner and perm
1011 # of each new path and parent path created
1012 sub makePaths {
1013     my ($path, $mode, $user, $group) = @_;
1014     my $uid = getpwnam $user;
1015     my $gid = -1; # default to leave it alone
1016     my $mode_string = "";
1017 
1018     if ($group) {
1019         $gid = getgrnam $group;
1020     }
1021     my @dirnames = ($path);
1022     my $parent = $path;
1023     for ($parent = dirname($parent);
1024          $parent and ($parent ne "/");
1025          $parent = dirname($parent)) {
1026         unshift @dirnames, $parent;
1027     }

Metadata Update from @vashirov:
- Custom field component adjusted to None
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None
- Custom field type adjusted to None
- Custom field version adjusted to None

3 years ago

This is expected as we are supposed to get rid of the perl installer. The idea was that we do not need an upgrade script. The core server will do all changes needed (fedse.c). So the spec file needs updating to NOT call the "setup-ds.pl -u", but... the core server self-updating is not complete. We still need to evaluate what needs to be done (or not done)

Metadata Update from @mreynolds:
- Issue assigned to mreynolds

3 years ago

Metadata Update from @mreynolds:
- Issue set to the milestone: 1.4.0

3 years ago

Metadata Update from @mreynolds:
- Custom field reviewstatus adjusted to review (was: None)

3 years ago

Metadata Update from @vashirov:
- Custom field reviewstatus adjusted to ack (was: review)

3 years ago

Metadata Update from @mreynolds:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

3 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/2813

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: fixed)

2 years ago

Login to comment on this ticket.

Metadata
Attachments 1
Attached 3 years ago View Comment
Related Pull Requests