Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relocate_by_id - fatal error: Unknown meta file requested #4848

Open
Devstellar opened this issue Mar 16, 2024 · 6 comments
Open

relocate_by_id - fatal error: Unknown meta file requested #4848

Devstellar opened this issue Mar 16, 2024 · 6 comments
Assignees

Comments

@Devstellar
Copy link
Contributor

Today I migrated some servers from 3.4 to 3.6.... all ok.
But, trying to use relocate_by_id to migrate any mailboxes to uuid storage is not working and I can't understand why.

Example:
relocate_by_id 'user/[email protected]'

Relocating: user/aaaaa.bbbb/web [email protected]
fatal error: Unknown meta file requested

@Devstellar
Copy link
Contributor Author

Devstellar commented Mar 16, 2024

Seems related to issue #4409 but my configure is not "bare".

Mar 16 21:10:19 local6:debug relocate_by_id: relocate_by_id[2501774]: requested meta partition directory for unknown partition 'default'

Version is 3.6.4

In imapd.conf:

configdirectory: /cyrimap
defaultpartition: default
partition-default: /cyrimap/part1

Looking for meta:

# cyr_info conf-all -C /etc/imapd.conf -M /etc/cyrus | grep -i meta
metapartition_files:
sieve_extensions: fileinto reject vacation vacation-seconds notify include envelope environment body relational regex subaddress copy date index imap4flags imapflags mailbox mboxmetadata servermetadata variables editheader extlists duplicate ihave fcc special-use redirect-dsn redirect-deliverby mailboxid vnd.cyrus.log x-cyrus-log vnd.cyrus.jmapquery x-cyrus-jmapquery vnd.cyrus.imip snooze vnd.cyrus.snooze x-cyrus-snooze

@elliefm
Copy link
Contributor

elliefm commented Mar 17, 2024

Mar 16 21:10:19 local6:debug relocate_by_id: relocate_by_id[2501774]: requested meta partition directory for unknown partition 'default'

I think that log message is misleading, it's not that the partition 'default' is unknown, you just don't have a meta partition for that partition, which should be okay.

fatal error: Unknown meta file requested

That's the real problem, it's asked for a metafile that it doesn't recognise

Can you apply a patch, rebuild, and try again? If so, this patch will make it log the bad metafile. What number does it log?

diff --git a/imap/mboxname.c b/imap/mboxname.c
index 2f048c2d0..1f4271412 100644
--- a/imap/mboxname.c
+++ b/imap/mboxname.c
@@ -2163,6 +2163,7 @@ EXPORTED char *mboxname_metapath(const char *partition,
     case 0:
         break;
     default:
+        syslog(LOG_ERR, "Unknown meta file requested: %d", metafile);
         fatal("Unknown meta file requested", EX_SOFTWARE);
     }
 

@Devstellar
Copy link
Contributor Author

Can you apply a patch, rebuild, and try again? If so, this patch will make it log the bad metafile. What number does it log?

Done: 7

Mar 18 05:55:16 local6:debug relocate_by_id: relocate_by_id[3309087]: requested meta partition directory for unknown partition 'default'
Mar 18 05:55:16 local6:err relocate_by_id: relocate_by_id[3309087]: Unknown meta file requested: 7

@elliefm
Copy link
Contributor

elliefm commented Mar 20, 2024

Ah.h -- 7 is META_DAV, which is conditional in this switch statement in 3.6.

Looks like your 3.6 build was configured without --enable-http, or the build couldn't find sqlite and so disabled all the DAV functionality.

I think usually there wouldn't be any DAV metadata on a server that doesn't have it, so I guess that implies that this server used to have http/dav enabled at some point, probably before you upgraded. If you rebuild with http/dav enabled, that might solve the problem.

You're right that this is related to #4409, and it was fixed in 3.8+ by #4412.

If you don't want to enable http, this commit might get you going on 3.6 without it: 7b8c76f, which you can get as a patch file here: https://github.com/cyrusimap/cyrus-imapd/commit/7b8c76f99f23e861450f26d801133ca9fc34a500.patch

Does this help?

@elliefm elliefm self-assigned this Mar 20, 2024
@Devstellar
Copy link
Contributor Author

Yes, server is configured without http, but the server has never had it.

The patch worked. I have relocated several mailboxes now without issue.

@elliefm
Copy link
Contributor

elliefm commented Mar 21, 2024

Great, thanks for checking that. I'll get that patch included in future releases of 3.6, so you won't need to do the same thing next time you upgrade :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants