Results 1 to 5 of 5

Thread: rename domain : fails

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Posts
    3
    Rep Power
    6

    Default rename domain : fails

    Hi all,
    I am migrating a domain.no to our zimbra server. In order for us to be able to send mail to domain.no during the migration, I had planned to migrate to domain-mig.no and then rename domain-mig.no to domain.no

    Renaming domains does not seem to work properly.
    Renaming works when the domain is empty:

    Code:
    prov> gaa domain.md
    prov> rd domain.md domain-foo.md
    domain domain.md renamed to domain-foo.md
    But a domain with 100 users (and no mail) fails.
    Code:
    prov> rd domain-mig.no domain.no
    Exception in thread "main" java.util.MissingFormatArgumentException: Format specifier 's'
    	at java.util.Formatter.format(Formatter.java:2429)
    	at java.util.Formatter.format(Formatter.java:2364)
    	at java.lang.String.format(String.java:2558)
    	at com.zimbra.cs.account.ldap.RenameDomain.warn(RenameDomain.java:807)
    	at com.zimbra.cs.account.ldap.RenameDomain.warn(RenameDomain.java:802)
    	at com.zimbra.cs.account.ldap.RenameDomain.access$400(RenameDomain.java:53)
    	at com.zimbra.cs.account.ldap.RenameDomain$RenameDomainVisitor.fixupForeignTarget(RenameDomain.java:747)
    	at com.zimbra.cs.account.ldap.RenameDomain$RenameDomainVisitor.handleForeignAlias(RenameDomain.java:713)
    	at com.zimbra.cs.account.ldap.RenameDomain$RenameDomainVisitor.visit(RenameDomain.java:451)
    	at com.zimbra.cs.account.ldap.LdapProvisioning.searchObjects(LdapProvisioning.java:1115)
    	at com.zimbra.cs.account.ldap.LdapProvisioning.searchObjects(LdapProvisioning.java:1055)
    	at com.zimbra.cs.account.ldap.RenameDomain.execute(RenameDomain.java:116)
    	at com.zimbra.cs.account.ldap.LdapProvisioning.renameDomain(LdapProvisioning.java:2177)
    	at com.zimbra.cs.account.ProvUtil.doRenameDomain(ProvUtil.java:873)
    	at com.zimbra.cs.account.ProvUtil.execute(ProvUtil.java:676)
    	at com.zimbra.cs.account.ProvUtil.interactive(ProvUtil.java:2028)
    	at com.zimbra.cs.account.ProvUtil.main(ProvUtil.java:2157)
    Restarting the rename will fail too:

    Code:
    prov> rd domain-mig.no domain.no 
    [] WARN: domain domain-mig.no is shutdown
    ERROR: service.FAILURE (system failure: unknown phase: ,FIX_FOREIGN_ALIASES) (cause: java.lang.IllegalArgumentException No enum const class com.zimbra.cs.account.ldap.RenameDomain$RenamePhase.,FIX_FOREIGN_ALIASES)
    Now you have two domains domain.no and domain-mig.no in a shutdown, locked state. There doesn't seem to be any way to get out of this mess except for deleting the two domains and starting from scratch.

    I am aware of other domain rename issues ( Rename Issues ), but this one does not seem to be documented anywhere.

    Have you had similar experiences with domain renaming?
    Is there a way to unlock the domains after a failed rename? Why is the rename failing? What are my alternatives?
    Code:
    # zmcontrol -v
    
    Release 5.0.16_GA_2921.RHEL5_64_20090429021719 RHEL5_64 NETWORK edition
    Tia,
    Kacper Wysocki
    Infrastructure Consultant

  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    You didn't run the correct command for renaming, it should be:

    Code:
    zmprov -l rd testold.com testnew.com
    If you look at the '-l' option in "zmprov help commands" you'll see it's important.

    renameDomain(rd) {domain|id} {newDomain}
    -- NOTE: renameDomain can only be used with "zmprov -l/--ldap"

    Code:
    zmprov -l md domain.com zimbraDomainStatus active
    
    zmmailboxdctl restart
    
    zmprov gd domain.com | grep Status
    
    zmprov -l gd domain.com | grep Status
    The last two commands should return 'active'.
    Last edited by phoenix; 06-24-2009 at 04:43 AM.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    Join Date
    Jun 2009
    Posts
    3
    Rep Power
    6

    Default

    Thanks for your reply pheonix, but I sure did run zmprov -l.
    Had I forgotten to do so, zmprov would have notified me:
    Code:
    # su - zimbra -c 'zmprov'
    prov> rd domain.no domain-mig.no
    renameDomain can only be used with  "zmprov -l/--ldap"
    I tried your suggested fix:
    Code:
    # su - zimbra -c 'zmprov -l'
    prov> md domain-mig.no zimbraDomainStatus active
    ERROR: service.INVALID_REQUEST (invalid request: domain domain-mig.no is being renamed, cannot change zimbraDomainStatus)
    It seems that there is some sort of internal flag that disallows changes to the domain.

    I also tried deleting the domain:
    Code:
    # su - zimbra -c 'zmprov -l'
    prov> gaa nr-mig.no
    prov> md domain-mig.no zimbraNotebookAccount ''
    prov> dd domain-mig.no
    ERROR: account.DOMAIN_NOT_EMPTY (domain not empty: domain-mig.no. You may beed to remove the value in zimbraNotebookAccount attribute before deleting accounts in this domain.)
    this too seems to fail. It is turning into quite the problem :-P

  4. #4
    Join Date
    Jun 2009
    Location
    Oakland, CA
    Posts
    58
    Rep Power
    6

    Default

    Was there ever resolution here? I am going to be doing this soon and want to avoid total disaster.

  5. #5
    Join Date
    Jun 2009
    Posts
    3
    Rep Power
    6

    Default no resolution

    Nope, the resolution was to avoid renaming the domain altogether, and to work around the limitation by creating the domain with the following property:
    zimbraMailTransport: smtp:customer-mta.customer-domain.com:25
    during the migration.

Similar Threads

  1. Replies: 7
    Last Post: 04-27-2009, 02:49 AM
  2. Replies: 20
    Last Post: 03-18-2008, 05:37 AM
  3. [SOLVED] Remove main domain!
    By zibra in forum Administrators
    Replies: 11
    Last Post: 09-27-2007, 08:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •