[Samba] Upgrade from 4.6.7 to 4.17.4 fails with database problem (Failure during re-pack, so transaction must be aborted)

Ricardo Esteves mvrk at sapo.pt
Thu May 18 08:41:40 UTC 2023


Hi,

Thank you for help, probably updating using another host and use join, 
or demoting one of my DCs (i have 2, DC1, and DC2) upgrade and then join 
the demoted one, and then do the same for the other is the best way.

But actually last night i was able to do the inplace upgrade 
successfully , basically the problem was on DC1 (probably had some bad 
old entries on the db), what i did was transfer all the fsmo roles to 
DC2, demote DC1, and then i did the inplace upgrade of DC2 and went ok. 
Now i need to upgrade and join DC1 back.

Btw, in order to avoid the issue you mentioned (I would never recommend 
upgrading a self compiled version of Samba in this way. There have been 
instances of files being removed from the version of Samba that you are 
upgrading to, that still exist on disk) what i usually do is remove
/usr/local/samba/bin|sbin|share|lib|lib64|libexec
i leave only  /usr/local/samba/etc|private|var
and then i do the ./configure / make / make install

Best regards.

On 17/05/2023 16:11, Rowland Penny via samba wrote:
>
>
> On 17/05/2023 13:50, Ricardo Esteves wrote:
>> Hi,
>>
>> Strange, i don't know how that link went, but the msg i sent was with 
>> the answers to your questions. Let me send them again:
>>
>> Have you tried with the OS Samba packages ?
>> Just in case it is a compile problem ?
>>      - Yes, i get the same error when i start samba from the OS 
>> packages.
>>
>>
>> Can we confirm what version of Fedora your Samba domain is running on 
>> and what Samba version ?
>>      - Fedora 37 / Samba 4.6.7 (compiled from sources)
>
> So you are running a very EOL version of Samba on a fairly recent 
> version of Fedora, why ?
Well, i kept updating the OS, but i never updated Samba.
>
>>
>>
>>   What version of Fedora you are trying to join to your existing 
>> domain ?
>>      - I'm not trying to join any host. I'm upgrading samba on the 
>> 1st domain controller from 4.6.7 to 4.17.4 or to 4.18.2
>
> Ah we are getting to the crux of matter here, I would never recommend 
> upgrading a self compiled version of Samba in this way. There have 
> been instances of files being removed from the version of Samba that 
> you are upgrading to, that still exist on disk.
> I would recommend setting up a new computer (which may be a VM), 
> installing Samba on that and join that to the existing domain, the old 
> DC's can then be removed.
>
>>
>>
>>   What is the exact command you are running in your attempt to join 
>> to the domain ?
>>       - I'm not trying to join any host.
>>
>>   What is the error you get when the join fails ?
>>      - When i start samba on the DC after upgrading it, it doesn't 
>> start and i see on the log.samba this msg: Samba failed to prime 
>> database, error code 22[1]
>
> That is probably because your method of upgrading Samba has probably 
> wiped your database.
>
> Rowland
>


More information about the samba mailing list