Hello,
I dumped zone, fixed TTL (detected TTL is 1, so I set 7200). Then I got the following error messages:
$ octodns-sync --config-file=./env/production.yaml zajezyk.pl. --doit
2018-02-18T19:39:31 [140516258113280] INFO Manager __init__: config_file=./env/production.yaml
2018-02-18T19:39:31 [140516258113280] INFO Manager __init__: max_workers=1
2018-02-18T19:39:31 [140516258113280] INFO Manager __init__: max_workers=False
2018-02-18T19:39:31 [140516258113280] INFO Manager sync: eligible_zones=['zajezyk.pl.'], eligible_targets=[], dry_run=False, force=False
2018-02-18T19:39:31 [140516258113280] INFO Manager sync: zone=zajezyk.pl.
2018-02-18T19:39:31 [140516258113280] INFO Manager sync: sources=['config'] -> targets=['cloudflare_shared']
2018-02-18T19:39:31 [140516258113280] INFO YamlProvider[config] populate: found 6 records
2018-02-18T19:39:31 [140516258113280] INFO CloudflareProvider[cloudflare_shared] plan: desired=zajezyk.pl.
2018-02-18T19:39:32 [140516258113280] INFO CloudflareProvider[cloudflare_shared] populate: found 6 records
2018-02-18T19:39:32 [140516258113280] INFO CloudflareProvider[cloudflare_shared] plan: Creates=0, Updates=6, Deletes=0, Existing Records=6
2018-02-18T19:39:32 [140516258113280] INFO Manager
********************************************************************************
* zajezyk.pl.
********************************************************************************
* cloudflare_shared (CloudflareProvider)
* Update
* <TxtRecord TXT 1, x._domainkey.zajezyk.pl., ['v=DKIM1\; k=rsa\; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAomyrwWA5VA6NlUFafVCBKYOanaZesoWMsIxk4QALoSw3bUUwIf8tRMxetOi9gBxqScXwjdqz5mu8+qtZrdGeh1UdvIFCX3r/dC7GYzK7uiNGi2bIRrjsrssLmHzlnNuI3IZ9G2PSrYcYqrkCX4TQhE0rj5hI2zNVW06RoTiJMqRh29GoKS07InYjaQXiND7Nief8MoJD1cGmGky6sHvsO1kwL1KbGfqXbw2bawpm0jUQUVCjBGm/kuteq2GlirooVeKI3OsC8NjW8mOuAKy+ECGajo59HNoI2gM4hNpbegSjm/DS5TnJoarSpk4a66bmWDBayoEmjHFWUFBZsKac9QIDAQAB']> ->
* <TxtRecord TXT 7200, x._domainkey.zajezyk.pl., ['v=DKIM1\; k=rsa\; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAomyrwWA5VA6NlUFafVCBKYOanaZesoWMsIxk4QALoSw3bUUwIf8tRMxetOi9gBxqScXwjdqz5mu8+qtZrdGeh1UdvIFCX3r/dC7GYzK7uiNGi2bIRrjsrssLmHzlnNuI3IZ9G2PSrYcYqrkCX4TQhE0rj5hI2zNVW06RoTiJMqRh29GoKS07InYjaQXiND7Nief8MoJD1cGmGky6sHvsO1kwL1KbGfqXbw2bawpm0jUQUVCjBGm/kuteq2GlirooVeKI3OsC8NjW8mOuAKy+ECGajo59HNoI2gM4hNpbegSjm/DS5TnJoarSpk4a66bmWDBayoEmjHFWUFBZsKac9QIDAQAB']> (config)
* Update
* <TxtRecord TXT 1, _domainkey.zajezyk.pl., ['o=~']> ->
* <TxtRecord TXT 7200, _domainkey.zajezyk.pl., ['o=~']> (config)
* Update
* <ARecord A 1, zajezyk.pl., ['185.23.21.15']> ->
* <ARecord A 7200, zajezyk.pl., ['185.23.21.15']> (config)
* Update
* <ARecord A 1, www.zajezyk.pl., ['185.23.21.15']> ->
* <ARecord A 7200, www.zajezyk.pl., ['185.23.21.15']> (config)
* Update
* <TxtRecord TXT 1, zajezyk.pl., ['v=spf1 a mx include:_spf.zenbox.pl -all']> ->
* <TxtRecord TXT 7200, zajezyk.pl., ['v=spf1 a mx include:_spf.zenbox.pl -all']> (config)
* Update
* <TxtRecord TXT 1, _dmarc.zajezyk.pl., ['v=DMARC1\; p=none\; sp=none\; rua=mailto:[email protected]']> ->
* <TxtRecord TXT 7200, _dmarc.zajezyk.pl., ['v=DMARC1\; p=none\; sp=none\; rua=mailto:[email protected]']> (config)
* Summary: Creates=0, Updates=6, Deletes=0, Existing Records=6
********************************************************************************
2018-02-18T19:39:32 [140516258113280] INFO CloudflareProvider[cloudflare_shared] apply: making changes
Traceback (most recent call last):
File "/home/adas/.virtualenvs/infra/bin/octodns-sync", line 11, in <module>
sys.exit(main())
File "/home/adas/.virtualenvs/infra/local/lib/python2.7/site-packages/octodns/cmds/sync.py", line 39, in main
dry_run=not args.doit, force=args.force)
File "/home/adas/.virtualenvs/infra/local/lib/python2.7/site-packages/octodns/manager.py", line 313, in sync
total_changes += target.apply(plan)
File "/home/adas/.virtualenvs/infra/local/lib/python2.7/site-packages/octodns/provider/base.py", line 157, in apply
self._apply(plan)
File "/home/adas/.virtualenvs/infra/local/lib/python2.7/site-packages/octodns/provider/cloudflare.py", line 285, in _apply
getattr(self, '_apply_{}'.format(class_name))(change)
File "/home/adas/.virtualenvs/infra/local/lib/python2.7/site-packages/octodns/provider/cloudflare.py", line 252, in _apply_Update
self._apply_Create(change)
File "/home/adas/.virtualenvs/infra/local/lib/python2.7/site-packages/octodns/provider/cloudflare.py", line 248, in _apply_Create
self._request('POST', path, data=content)
File "/home/adas/.virtualenvs/infra/local/lib/python2.7/site-packages/octodns/provider/cloudflare.py", line 68, in _request
resp.raise_for_status()
File "/home/adas/.virtualenvs/infra/local/lib/python2.7/site-packages/requests/models.py", line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.cloudflare.com/client/v4/zones/e63fd9e266f8b6ba6f227901ee7294fc/dns_records
For debug purpuses I added
if resp.status_code != 200:
import pdb; pdb.set_trace()
in cloudflare.py in 68-69 lines.
Next to I got following result:
$ octodns-sync --config-file=./env/production.yaml zajezyk.pl. --doit
2018-02-18T19:41:06 [140449092114176] INFO Manager __init__: config_file=./env/production.yaml
2018-02-18T19:41:06 [140449092114176] INFO Manager __init__: max_workers=1
2018-02-18T19:41:06 [140449092114176] INFO Manager __init__: max_workers=False
2018-02-18T19:41:06 [140449092114176] INFO Manager sync: eligible_zones=['zajezyk.pl.'], eligible_targets=[], dry_run=False, force=False
2018-02-18T19:41:06 [140449092114176] INFO Manager sync: zone=zajezyk.pl.
2018-02-18T19:41:06 [140449092114176] INFO Manager sync: sources=['config'] -> targets=['cloudflare_shared']
2018-02-18T19:41:06 [140449092114176] INFO YamlProvider[config] populate: found 6 records
2018-02-18T19:41:06 [140449092114176] INFO CloudflareProvider[cloudflare_shared] plan: desired=zajezyk.pl.
2018-02-18T19:41:08 [140449092114176] INFO CloudflareProvider[cloudflare_shared] populate: found 6 records
2018-02-18T19:41:08 [140449092114176] INFO CloudflareProvider[cloudflare_shared] plan: Creates=0, Updates=6, Deletes=0, Existing Records=6
2018-02-18T19:41:08 [140449092114176] INFO Manager
********************************************************************************
* zajezyk.pl.
********************************************************************************
* cloudflare_shared (CloudflareProvider)
* Update
* <TxtRecord TXT 1, x._domainkey.zajezyk.pl., ['v=DKIM1\; k=rsa\; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAomyrwWA5VA6NlUFafVCBKYOanaZesoWMsIxk4QALoSw3bUUwIf8tRMxetOi9gBxqScXwjdqz5mu8+qtZrdGeh1UdvIFCX3r/dC7GYzK7uiNGi2bIRrjsrssLmHzlnNuI3IZ9G2PSrYcYqrkCX4TQhE0rj5hI2zNVW06RoTiJMqRh29GoKS07InYjaQXiND7Nief8MoJD1cGmGky6sHvsO1kwL1KbGfqXbw2bawpm0jUQUVCjBGm/kuteq2GlirooVeKI3OsC8NjW8mOuAKy+ECGajo59HNoI2gM4hNpbegSjm/DS5TnJoarSpk4a66bmWDBayoEmjHFWUFBZsKac9QIDAQAB']> ->
* <TxtRecord TXT 7200, x._domainkey.zajezyk.pl., ['v=DKIM1\; k=rsa\; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAomyrwWA5VA6NlUFafVCBKYOanaZesoWMsIxk4QALoSw3bUUwIf8tRMxetOi9gBxqScXwjdqz5mu8+qtZrdGeh1UdvIFCX3r/dC7GYzK7uiNGi2bIRrjsrssLmHzlnNuI3IZ9G2PSrYcYqrkCX4TQhE0rj5hI2zNVW06RoTiJMqRh29GoKS07InYjaQXiND7Nief8MoJD1cGmGky6sHvsO1kwL1KbGfqXbw2bawpm0jUQUVCjBGm/kuteq2GlirooVeKI3OsC8NjW8mOuAKy+ECGajo59HNoI2gM4hNpbegSjm/DS5TnJoarSpk4a66bmWDBayoEmjHFWUFBZsKac9QIDAQAB']> (config)
* Update
* <TxtRecord TXT 1, _domainkey.zajezyk.pl., ['o=~']> ->
* <TxtRecord TXT 7200, _domainkey.zajezyk.pl., ['o=~']> (config)
* Update
* <ARecord A 1, zajezyk.pl., ['185.23.21.15']> ->
* <ARecord A 7200, zajezyk.pl., ['185.23.21.15']> (config)
* Update
* <ARecord A 1, www.zajezyk.pl., ['185.23.21.15']> ->
* <ARecord A 7200, www.zajezyk.pl., ['185.23.21.15']> (config)
* Update
* <TxtRecord TXT 1, zajezyk.pl., ['v=spf1 a mx include:_spf.zenbox.pl -all']> ->
* <TxtRecord TXT 7200, zajezyk.pl., ['v=spf1 a mx include:_spf.zenbox.pl -all']> (config)
* Update
* <TxtRecord TXT 1, _dmarc.zajezyk.pl., ['v=DMARC1\; p=none\; sp=none\; rua=mailto:[email protected]']> ->
* <TxtRecord TXT 7200, _dmarc.zajezyk.pl., ['v=DMARC1\; p=none\; sp=none\; rua=mailto:[email protected]']> (config)
* Summary: Creates=0, Updates=6, Deletes=0, Existing Records=6
********************************************************************************
2018-02-18T19:41:08 [140449092114176] INFO CloudflareProvider[cloudflare_shared] apply: making changes
> /home/adas/.virtualenvs/infra/local/lib/python2.7/site-packages/octodns/provider/cloudflare.py(70)_request()
-> resp.raise_for_status()
(Pdb) print(resp)
<Response [400]>
(Pdb) resp.status_code
400
(Pdb) resp.json()
{u'errors': [{u'message': u'The record already exists.', u'code': 81057}], u'messages': [], u'result': None, u'success': False}
Stale