[postfix] Migrate to lmdb #3120
No reviewers
Labels
No labels
ai-review-please
freeze-break-request
post-freeze
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
infra/ansible!3120
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "zlopez/ansible:13035"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This change will migrate postfix from bdb to lmdb.
See infra/tickets#13035 for more
details.
Signed-off-by: Michal Konecny mkonecny@redhat.com
3b8f9b5f41to94b8759b10This is pretty invasive, so I think it will have to wait for after freeze?
Or do you want to try and land it before then?
For the rhel10 moving, we could just do a much smaller change to use lmdb for only rhel10 hosts?
Or just do it manually until after freeze.
@ -9,1 +9,4 @@- name: Make sure postfix-lmdb is installedansible.builtin.package:state: presendShould be 'present' ?
Oops, will fix
@ -10,0 +10,4 @@- name: Make sure postfix-lmdb is installedansible.builtin.package:state: presendname: postfix-lmdbSadly, there's no postfix-lmdb package in rhel/epel8... so we will need to exclude pagure from these changes.
Didn't checked that out, I'm also not sure if this will be needed on RHEL 10, maybe it will be part of postfix.
I added a when that will skip this for RHEL 8 and older.
@ -25,6 +33,57 @@- base- smtp_auth_relay- name: Read the config fileI assume this section is just to migrate things in place, and can be removed after run?
Perhaps it would be better as just a stand alone playbook we run once after landing this?
Yeah, this should be run only once. I can prepare separate manual playbook for that. When I wrote it I wasn't sure what will be the best option, but separate manually run playbook makes sense.
@kevin wrote in #3120 (comment):
I marked the PR as post-freeze as it's an invasive change. As this needs changes in
main.cffile I wasn't sure how to specify it only for rhel10, as it's not really clear which template will be used.So I'm thinking what is best approach here. I have few options in mind
main.cffiles to use lmdb in role, we will need to have specific one for pagure or any other machine that doesn't support lmdb. We will move all the other changes to manual playbook, which will need to be run once for each machine.There is another problem with manual playbook that the first restart of postfix will fail as the
*.lmdbfile will not be in place. So it will be to execute postfix role, manual role and postfix role again, this will be needed during migration or when the machine will be installed again from scratch.btree/bhashentries inmain.cffile tolmdbwhen executed, but that means every time the postfix playbook is executed, it will replace those changesI think the third approach is best option. What do you think @kevin?
I think 3 sounds fine, but also... instead of a manual playbook, how about we setup a handler and notify it when the postfix.cf changes to run the commands to generate the lmdb databases, but before we restart postfix?
Then it could all be in the playbook, but it's a lot simpler ?
94b8759b10toc9fb38000f103a51fcd77fdfb301dc@kevin wrote in #3120 (comment):
I think I addressed the RHEL8 machines and the handler approach in latest commit. Feel free to check it out.
f7dd1203b73ea4c13f573ea4c13f57251a7a1a17I addressed the last ansible-lint error in #3172
I guess this handler will work. It seems pretty unelegant, but I cant think of a more clean way to do it.
@ -43,3 +43,4 @@ wsgi_procs: 4wsgi_threads: 4zabbix_macros:'VFS.FS.FSTYPE.MATCHES': '^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs|nfs)$'postfix_group:pkgsmissing space after : ?
You are right, let me fix that.
@ -387,3 +387,3 @@##alias_maps = dbm:/etc/aliasesalias_maps = hash:/etc/aliasesalias_maps = btree:/etc/aliaseswhy not just leave these as hash? shouldn't change until they go eol...
I didn't checked what was there before, will put it back to hash, no need to change it.
@kevin wrote in #3120 (comment):
I agree, it's not elegant, but I couldn't think of any better way as well. I still don't understand why there are different commands for conversion of
/etc/aliasesand everything else.251a7a1a17cfef783390b356c2ed415cb507cbcc5cb507cbccee60b1003bee60b1003bd4b957a92eI fixed the ansible-lint errors in #3184
Let me merge this and test it out on staging first.