{"action":"created","issue":{"url":"https://api.github.com/repos/desec-io/desec-stack/issues/40","repository_url":"https://api.github.com/repos/desec-io/desec-stack","labels_url":"https://api.github.com/repos/desec-io/desec-stack/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/desec-io/desec-stack/issues/40/comments","events_url":"https://api.github.com/repos/desec-io/desec-stack/issues/40/events","html_url":"https://github.com/desec-io/desec-stack/issues/40","id":221958178,"number":40,"title":"Updating IP Address Immediately After Zone Creation Fails","user":{"login":"nils-wisiol","id":1026940,"avatar_url":"https://avatars0.githubusercontent.com/u/1026940?v=3","gravatar_id":"","url":"https://api.github.com/users/nils-wisiol","html_url":"https://github.com/nils-wisiol","followers_url":"https://api.github.com/users/nils-wisiol/followers","following_url":"https://api.github.com/users/nils-wisiol/following{/other_user}","gists_url":"https://api.github.com/users/nils-wisiol/gists{/gist_id}","starred_url":"https://api.github.com/users/nils-wisiol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nils-wisiol/subscriptions","organizations_url":"https://api.github.com/users/nils-wisiol/orgs","repos_url":"https://api.github.com/users/nils-wisiol/repos","events_url":"https://api.github.com/users/nils-wisiol/events{/privacy}","received_events_url":"https://api.github.com/users/nils-wisiol/received_events","type":"User","site_admin":false},"labels":[{"id":506766976,"url":"https://api.github.com/repos/desec-io/desec-stack/labels/prio:%20low","name":"prio: low","color":"fbca04","default":false},{"id":450873897,"url":"https://api.github.com/repos/desec-io/desec-stack/labels/wontfix","name":"wontfix","color":"ffffff","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-04-15T16:31:13Z","updated_at":"2017-04-18T07:50:55Z","closed_at":"2017-04-18T07:50:55Z","body":"Setting the `arecord` field on a domain immediately after it's creation fails and causes a 500 server error.\r\n\r\nSteps to reproduce (`bash`):\r\n\r\n    export DESEC_USERNAME=baz@bar.com\r\n    export DESEC_PASSWORD=123password\r\n    export DESEC_DOMAIN=baz.dedyn.io\r\n\r\n    http POST https://desec.nils.dedyn.io/api/v1/auth/register/ email:=\\\"${DESEC_USERNAME}\\\" password:=\\\"${DESEC_PASSWORD}\\\"\r\n    export DESEC_AUTH=$(http POST https://desec.nils.dedyn.io/api/v1/auth/login/ email:=\\\"${DESEC_USERNAME}\\\" password:=\\\"${DESEC_PASSWORD}\\\" | grep auth_token | egrep -o [a-z0-9]{40})\r\n    http POST https://desec.nils.dedyn.io/api/v1/domains/ Authorization:\"Token ${DESEC_AUTH}\" name:=\\\"${DESEC_DOMAIN}\\\"\r\n    http PATCH https://desec.nils.dedyn.io/api/v1/domains/${DESEC_DOMAIN}/ Authorization:\"Token ${DESEC_AUTH}\" arecord:=\\\"127.1.1.1\\\"\r\n\r\nThe reason appears to be that [this](https://github.com/desec-io/desec-stack/blob/0a7386a6da298bd5094362dc1b2def1e1505f2ca/api/desecapi/pdns.py#L52) request is made without pdns already having a SOA record for the domain (pdns reply: `{\"error\": \"No SOA found for domain 'baz.dedyn.io.'\"}`).\r\n\r\nI cannot pinpoint where exactly the SOA record is added later (any idea, @peterthomassen?); it appears to have something to do with the [cron job](https://github.com/desec-io/desec-stack/blob/a7618f03e1f3b3178ba337fd035b878dfcdd1f0e/nslord/cronhook/secure-zones.sh).\r\n\r\nThe error will cause any update to be lost (as would be expected by the client); however with the next non-erroring `POST` to that domain any previous error will be recovered, so in many cases this is not an urgent problem."},"comment":{"url":"https://api.github.com/repos/desec-io/desec-stack/issues/comments/294718676","html_url":"https://github.com/desec-io/desec-stack/issues/40#issuecomment-294718676","issue_url":"https://api.github.com/repos/desec-io/desec-stack/issues/40","id":294718676,"user":{"login":"peterthomassen","id":4242683,"avatar_url":"https://avatars1.githubusercontent.com/u/4242683?v=3","gravatar_id":"","url":"https://api.github.com/users/peterthomassen","html_url":"https://github.com/peterthomassen","followers_url":"https://api.github.com/users/peterthomassen/followers","following_url":"https://api.github.com/users/peterthomassen/following{/other_user}","gists_url":"https://api.github.com/users/peterthomassen/gists{/gist_id}","starred_url":"https://api.github.com/users/peterthomassen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterthomassen/subscriptions","organizations_url":"https://api.github.com/users/peterthomassen/orgs","repos_url":"https://api.github.com/users/peterthomassen/repos","events_url":"https://api.github.com/users/peterthomassen/events{/privacy}","received_events_url":"https://api.github.com/users/peterthomassen/received_events","type":"User","site_admin":false},"created_at":"2017-04-18T07:50:55Z","updated_at":"2017-04-18T07:50:55Z","body":"As discussed, our environment does not produce DNS requests to nslord, so the issue does not occur in practice."}}
{"actor":{"display_login":"peterthomassen"}}