Migration Failed - CF DNS

Bug Report Template

Description

When attempting to migrate an account from one server to another (identical, updated setups both configured with CF DNS) the migration fails in the DNS stage. Trace is below; it claims the acct_migration record does not exist even though it’s created consistently throughout the migration process.

Steps to Reproduce

Run migration command from one server to another, whole process goes smoothly (including creation of DNS records) but fails at the last step, even with --force.

Expected Behavior

Successful migration

Actual Behavior

acct_migration DNS record is created, but migration doesn’t pass stage 0 and errors out.

Environment

ApisCP: 3.2.42
OS: 4.18.0-513.24.1.el8_9.x86_64

Additional Information

May or may not be relevant, but all accounts were created AFTER CF DNS records were created, and ApisCP did not create the “_apnscp_uuid” record. I’ve tried without it, and by manually creating it, and neither way allows a successful migration. That’s the only thing I can think of that might be affecting it.

Trace is below:

updating dns stage data
ERROR : Opcenter\Dns\Providers\Cloudflare\Module::remove_record(): Record __acct_migration.DOMAIN.com' (rr: TXT’, param: ') does not exist 0. Error_Reporter::add_error("Record %s’ (rr: %s', param: %s’) does not exist", [“__acct_migration.DOMAIN.com”, “TXT”, “”])
[/usr/local/apnscp/lib/log_wrapper.php:62]
1. error(“Record %s' (rr: %s’, param: `%s’) does not exist”, “__acct_migration.DOMAIN.com”, “TXT”, “”)
[/usr/local/apnscp/lib/Opcenter/Dns/Providers/Cloudflare/Module.php:283]
2. Opcenter\Dns\Providers\Cloudflare\Module->remove_record(“DOMAIN.com”, “__acct_migration”, “TXT”)
[/usr/local/apnscp/lib/Module/Skeleton/Standard.php:145]
3. Module\Skeleton\Standard->_invoke(“remove_record”, [“DOMAIN.com”, “__acct_migration”, “txt”])
[/usr/local/apnscp/lib/apnscpfunction.php:992]
4. apnscpFunctionInterceptor->call(“dns_remove_record”, [“DOMAIN.com”, “__acct_migration”, “txt”])
[/usr/local/apnscp/lib/apnscpfunction.php:932]
5. apnscpFunctionInterceptor->__call(“dns_remove_record”, [“DOMAIN.com”, “__acct_migration”, “txt”])
[/usr/local/apnscp/lib/CLI/Transfer.php:101]
6. CLI_Transfer->__call(“dns_remove_record”, [“DOMAIN.com”, “__acct_migration”, “txt”])
[/usr/local/apnscp/lib/CLI/Transfer.php:1883]
7. CLI_Transfer->set_migration_stage(“DOMAIN.com”, 1)
[/usr/local/apnscp/lib/CLI/Transfer.php:1845]
8. CLI_Transfer->_sync_update_stage()
[/usr/local/apnscp/lib/CLI/Transfer.php:200]
9. CLI_Transfer->process()
[/usr/local/apnscp/bin/scripts/transfersite.php:231]
INFO: __acct_migration.DOMAIN.com record reported present, but failed to remove
DEPRECATED: Implicit conversion from float 1.8103973150253296 to int loses precision
[/usr/local/apnscp/lib/CLI/Transfer.php:226]

     0. CLI_Transfer->process()
        [/usr/local/apnscp/bin/scripts/transfersite.php:231]

DEPRECATED: Implicit conversion from float 1.8103973150253296 to int loses precision
[/usr/local/apnscp/lib/CLI/Transfer.php:226]

     0. CLI_Transfer->process()
        [/usr/local/apnscp/bin/scripts/transfersite.php:231]

completed xfer DOMAIN.com (00:01:48)
Opcenter\Dns\Providers\Cloudflare\Module::remove_record(): Record __acct_migration.DOMAIN.com' (rr: TXT’, param: `') does not exist

This is crucial.

When a zone is existent in DNS the DNS is not clobbered, period. This includes the _apnscp_uuid marker. You may perform a manual reset with cpcmd -d <DOMAIN> dns:reset <DOMAIN> (or DNS > DNS Manager > Toolkit). This will remove any records that aren’t native to the account, so use with caution.

If UUID isn’t present, then the panel won’t make any unexpected assumptions about who’s hosting DNS.