Problem with dns proxy (integration with powerdns)

Problem:

I configured dns proxy for foreman, using powerdns backend:
Can’t add or edit hosts in foreman, I get following errors:
Create IPv4 DNS record for patsy-buffett.example.com task failed with the following error: ERF12-2357 [ProxyAPI::ProxyException]: Unable to set DNS entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://foreman-01.example.com:8443/dns

but hosts are added or edited in powerdns mysql database:

# pdnsutil list-zone example.com | grep pa
patsy-buffett.example.com.     86400   IN      A       10.12.2.71

Expected outcome:
Be able to add or edit host

Foreman and Proxy versions:
foreman-proxy - 1.22.0
foreman 1.22.0

Foreman and Proxy plugin versions:

[root@foreman-01 ~]# dpkg -l | grep -e proxy-dns -e foreman
ii  foreman                               1.22.0-1                                   amd64        Systems management web interface
ii  foreman-cli                           1.22.0-1                                   all          metapackage providing hammer CLI for Foreman
ii  foreman-debug                         1.22.0-1                                   all          provides support utility foreman-debug.
ii  foreman-installer                     1.22.0-1                                   all          Automated puppet-based installer for The Foreman
ii  foreman-libvirt                       1.22.0-1                                   all          metapackage providing libvirt dependencies for Foreman
ii  foreman-mysql2                        1.22.0-1                                   all          metapackage providing mysql2 dependencies for Foreman
ii  foreman-proxy                         1.22.0-1                                   all          RESTful proxies for DNS, DHCP, TFTP, and Puppet
ii  ruby-foreman-deface                   1.3.2-1                                    all          Foreman Deface Plugin Dependency
ii  ruby-foreman-dhcp-browser             0.0.8-1                                    all          Foreman DHCP browser Plugin
ii  ruby-foreman-discovery                15.0.1-1                                   all          Foreman Discovery Plugin
ii  ruby-hammer-cli-foreman               0.17.0-1                                   all          Foreman commands for Hammer
ii  ruby-smart-proxy-dns-powerdns         0.3.0-1                                    all          PowerDNS DNS provider plugin for Foreman's smart proxy

Other relevant data:

logs from proxy.log:

2019-08-12T10:49:56  [D] accept: 10.12.0.60:44980
2019-08-12T10:49:56  [D] Rack::Handler::WEBrick is invoked.
2019-08-12T10:49:56 ff1d2d7c [I] Started GET /10.12.0.0/unused_ip from=10.12.1.1&to=10.12.2.250
2019-08-12T10:49:56 ff1d2d7c [D] verifying remote client 10.12.0.60 against trusted_hosts ["foreman-01.example.com"]
2019-08-12T10:49:56 ff1d2d7c [D] Searching for free IP - pinging 10.12.2.104.
2019-08-12T10:49:58  [D] accept: 10.12.0.60:44986
2019-08-12T10:49:58  [D] Rack::Handler::WEBrick is invoked.
2019-08-12T10:49:58 ff1d2d7c [I] Started GET /10.12.0.0/unused_ip from=10.12.1.1&to=10.12.2.250
2019-08-12T10:49:58 ff1d2d7c [D] verifying remote client 10.12.0.60 against trusted_hosts ["foreman-01.example.com"]
2019-08-12T10:49:58 ff1d2d7c [D] Searching for free IP - pinging 10.12.2.71.
2019-08-12T10:49:58 ff1d2d7c [D] Found free IP 10.12.2.104 out of a total of 505 free IPs.
2019-08-12T10:49:58 ff1d2d7c [I] Finished GET /10.12.0.0/unused_ip with 200 (2014.2 ms)
2019-08-12T10:49:59  [D] close: 10.12.0.60:44980
2019-08-12T10:50:00 ff1d2d7c [D] Found free IP 10.12.2.71 out of a total of 505 free IPs.
2019-08-12T10:50:00 ff1d2d7c [I] Finished GET /10.12.0.0/unused_ip with 200 (2010.11 ms)
2019-08-12T10:50:00  [D] close: 10.12.0.60:44986
2019-08-12T10:50:12  [D] Starting allocated ip addresses cleanup pass...
2019-08-12T10:50:44  [D] accept: 10.12.0.60:44992
2019-08-12T10:50:44  [D] Rack::Handler::WEBrick is invoked.
2019-08-12T10:50:44 ff1d2d7c [I] Started GET /10.12.0.0/unused_ip mac=0c:c4:7a:15:1f:02&from=10.12.1.1&to=10.12.2.250
2019-08-12T10:50:44 ff1d2d7c [D] verifying remote client 10.12.0.60 against trusted_hosts ["foreman-01.example.com"]
2019-08-12T10:50:44 ff1d2d7c [D] Searching for free IP - pinging 10.12.2.197.
2019-08-12T10:50:46  [D] accept: 10.12.0.60:44996
2019-08-12T10:50:46  [D] Rack::Handler::WEBrick is invoked.
2019-08-12T10:50:46 ff1d2d7c [I] Started GET /serverName 
2019-08-12T10:50:46 ff1d2d7c [D] verifying remote client 10.12.0.60 against trusted_hosts ["foreman-01.example.com"]
2019-08-12T10:50:46 ff1d2d7c [I] Finished GET /serverName with 200 (1.46 ms)
2019-08-12T10:50:46  [D] close: 10.12.0.60:44996
2019-08-12T10:50:46  [D] accept: 10.12.0.60:44998
2019-08-12T10:50:46  [D] Rack::Handler::WEBrick is invoked.
2019-08-12T10:50:46 ff1d2d7c [I] Started GET /10.12.0.0/mac/0c:c4:7a:15:1f:02 
2019-08-12T10:50:46 ff1d2d7c [D] verifying remote client 10.12.0.60 against trusted_hosts ["foreman-01.example.com"]
2019-08-12T10:50:46 ff1d2d7c [E] No DHCP record for MAC 10.12.0.0/0c:c4:7a:15:1f:02 found
2019-08-12T10:50:46 ff1d2d7c [I] Finished GET /10.12.0.0/mac/0c:c4:7a:15:1f:02 with 404 (1.98 ms)
2019-08-12T10:50:46  [D] close: 10.12.0.60:44998
2019-08-12T10:50:46 ff1d2d7c [D] Found free IP 10.12.2.197 out of a total of 505 free IPs.
2019-08-12T10:50:46 ff1d2d7c [I] Finished GET /10.12.0.0/unused_ip with 200 (2012.63 ms)
2019-08-12T10:50:46  [D] accept: 10.12.0.60:45000
2019-08-12T10:50:46  [D] Rack::Handler::WEBrick is invoked.
2019-08-12T10:50:46 ff1d2d7c [I] Started GET /10.12.0.0/ip/10.12.2.71 
2019-08-12T10:50:46 ff1d2d7c [D] verifying remote client 10.12.0.60 against trusted_hosts ["foreman-01.example.com"]
2019-08-12T10:50:46 ff1d2d7c [E] No DHCP records for IP 10.12.0.0/10.12.2.71 found
2019-08-12T10:50:46 ff1d2d7c [I] Finished GET /10.12.0.0/ip/10.12.2.71 with 404 (1.47 ms)
2019-08-12T10:50:46  [D] close: 10.12.0.60:44992
2019-08-12T10:50:46  [D] close: 10.12.0.60:45000
2019-08-12T10:50:46  [D] accept: 10.12.0.60:45002
2019-08-12T10:50:46  [D] Rack::Handler::WEBrick is invoked.
2019-08-12T10:50:46 ff1d2d7c [I] Started POST /10.12.0.0 
2019-08-12T10:50:46 ff1d2d7c [D] verifying remote client 10.12.0.60 against trusted_hosts ["foreman-01.example.com"]
2019-08-12T10:50:46 ff1d2d7c [D] omshell: executed - set name = "patsy-buffett.example.com"
2019-08-12T10:50:46 ff1d2d7c [D] <NilClass> nil
2019-08-12T10:50:46 ff1d2d7c [D] omshell: executed - set ip-address = 10.12.2.71
2019-08-12T10:50:46 ff1d2d7c [D] <NilClass> nil
2019-08-12T10:50:46 ff1d2d7c [D] omshell: executed - set hardware-address = 0c:c4:7a:15:1f:02
2019-08-12T10:50:46 ff1d2d7c [D] <NilClass> nil
2019-08-12T10:50:46 ff1d2d7c [D] omshell: executed - set hardware-type = 1
2019-08-12T10:50:46 ff1d2d7c [D] <NilClass> nil
2019-08-12T10:50:46 ff1d2d7c [D] omshell: executed - set statements = "filename = \"pxelinux.0\"; next-server = 0a:0c:00:3c; option host-name = \"patsy-buffett.example.com\";"
2019-08-12T10:50:46 ff1d2d7c [D] <NilClass> nil
2019-08-12T10:50:46 ff1d2d7c [D] omshell: executed - create
2019-08-12T10:50:46 ff1d2d7c [D] <NilClass> nil
2019-08-12T10:50:46  [D] caught :modify event on /var/lib/dhcp/dhcpd.leases.
2019-08-12T10:50:46  [D] Added a reservation: 10.12.2.71:0c:c4:7a:15:1f:02:patsy-buffett.example.com
2019-08-12T10:50:46  [D] caught :moved_to event on /var/lib/dhcp/dhcpd.leases.
2019-08-12T10:50:46 ff1d2d7c [D] Added DHCP reservation for patsy-buffett.example.com (10.12.2.71 / 0c:c4:7a:15:1f:02)
2019-08-12T10:50:46  [D] Added a subnet: 10.12.0.0
2019-08-12T10:50:46 ff1d2d7c [I] Finished POST /10.12.0.0 with 200 (69.11 ms)
2019-08-12T10:50:46  [D] Added a subnet: 10.22.0.0
2019-08-12T10:50:46  [D] close: 10.12.0.60:45002
2019-08-12T10:50:47  [D] Added a reservation: 10.12.2.71:0c:c4:7a:15:1f:02:patsy-buffett.example.com
2019-08-12T10:50:47  [D] Added a reservation: 10.22.1.2:00:1b:21:bc:69:dc:mgmt-waw2-prod-01.example.com
2019-08-12T10:50:47  [D] Added a reservation: 10.22.1.4:00:1b:21:bc:69:b4:mgmt-waw2-prod-02.example.com
2019-08-12T10:50:47  [D] Added a lease record: 10.12.1.3:52:54:00:85:a2:48
2019-08-12T10:50:47  [D] Added a lease record: 10.12.1.4:52:54:00:bf:6c:4f
2019-08-12T10:50:47  [D] Added a lease record: 10.12.1.6:52:54:00:54:4d:40
2019-08-12T10:50:47  [D] Added a lease record: 10.12.1.2:52:54:00:11:57:01
2019-08-12T10:50:47  [D] accept: 10.12.0.60:45006
2019-08-12T10:50:47  [D] Rack::Handler::WEBrick is invoked.
2019-08-12T10:50:47 ff1d2d7c [I] Started POST / 
2019-08-12T10:50:47 ff1d2d7c [D] verifying remote client 10.12.0.60 against trusted_hosts ["foreman-01.example.com"]
2019-08-12T10:50:47 ff1d2d7c [E] Failed to create record patsy-buffett.example.com A 10.12.2.71
2019-08-12T10:50:47 ff1d2d7c [I] Finished POST / with 400 (68.28 ms)
2019-08-12T10:50:47  [D] close: 10.12.0.60:45006
2019-08-12T10:50:47  [D] accept: 10.12.0.60:45010
2019-08-12T10:50:47  [D] Rack::Handler::WEBrick is invoked.
2019-08-12T10:50:47 ff1d2d7c [I] Started DELETE /10.12.0.0/mac/0c:c4:7a:15:1f:02 
2019-08-12T10:50:47 ff1d2d7c [D] verifying remote client 10.12.0.60 against trusted_hosts ["foreman-01.example.com"]
2019-08-12T10:50:47 ff1d2d7c [D] omshell: executed - set hardware-address = 0c:c4:7a:15:1f:02
2019-08-12T10:50:47 ff1d2d7c [D] <NilClass> nil
2019-08-12T10:50:47 ff1d2d7c [D] omshell: executed - open
2019-08-12T10:50:47 ff1d2d7c [D] <NilClass> nil
2019-08-12T10:50:47 ff1d2d7c [D] omshell: executed - remove
2019-08-12T10:50:47 ff1d2d7c [D] <NilClass> nil
2019-08-12T10:50:47  [D] caught :modify event on /var/lib/dhcp/dhcpd.leases.
2019-08-12T10:50:47  [D] Deleted a reservation: 10.12.2.71:0c:c4:7a:15:1f:02:patsy-buffett.example.com
2019-08-12T10:50:47 ff1d2d7c [D] Removed DHCP reservation for patsy-buffett.example.com => patsy-buffett.example.com (10.12.2.71 / 0c:c4:7a:15:1f:02)
2019-08-12T10:50:47 ff1d2d7c [I] Finished DELETE /10.12.0.0/mac/0c:c4:7a:15:1f:02 with 200 (42.35 ms)
2019-08-12T10:50:47  [D] close: 10.12.0.60:45010

logs from production.log (foreman):

2019-08-12T10:50:45 [D|app|1fbde79a] Current location set to none
2019-08-12T10:50:45 [D|app|1fbde79a] Current organization set to none
2019-08-12T10:50:46 [D|app|ccf71727] Found 10.12.2.197
2019-08-12T10:50:46 [D|app|ccf71727] Current location set to Default Location
2019-08-12T10:50:46 [D|app|ccf71727] Current organization set to Default Organization
2019-08-12T10:50:46 [I|app|ccf71727] Completed 200 OK in 2183ms (Views: 0.6ms | ActiveRecord: 20.1ms)
2019-08-12T10:50:46 [D|app|1fbde79a] Scheduling new DHCP reservations for patsy-buffett.example.com
2019-08-12T10:50:46 [D|app|1fbde79a] Enqueued task 'dhcp_create_0c:c4:7a:15:1f:02' to 'Host::Managed Main' queue
2019-08-12T10:50:46 [D|app|1fbde79a] Scheduling new DNS entries
2019-08-12T10:50:46 [D|app|1fbde79a] Enqueued task 'Create IPv4 DNS record for patsy-buffett.example.com' to 'Host::Managed Main' queue
2019-08-12T10:50:46 [D|app|1fbde79a] Current organization set to Default Organization
2019-08-12T10:50:46 [D|app|1fbde79a] Current location set to Default Location
2019-08-12T10:50:46 [D|app|1fbde79a] Current location set to none
2019-08-12T10:50:46 [D|app|1fbde79a] Current organization set to none
2019-08-12T10:50:46 [D|app|1fbde79a] Enqueued task 'Deploy TFTP PXELinux config for patsy-buffett.example.com' to 'Host::Managed Main' queue
2019-08-12T10:50:46 [D|app|1fbde79a] Enqueued task 'Deploy TFTP PXEGrub2 config for patsy-buffett.example.com' to 'Host::Managed Main' queue
2019-08-12T10:50:46 [D|app|1fbde79a] Enqueued task 'Deploy TFTP PXEGrub config for patsy-buffett.example.com' to 'Host::Managed Main' queue
2019-08-12T10:50:46 [D|app|1fbde79a] Enqueued task 'Deploy TFTP iPXE config for patsy-buffett.example.com' to 'Host::Managed Main' queue
2019-08-12T10:50:46 [D|app|1fbde79a] Enqueued task 'Fetch TFTP boot files for patsy-buffett.example.com' to 'Host::Managed Main' queue
2019-08-12T10:50:46 [D|app|1fbde79a] Enqueued task 'Cleanup PuppetCA certificates for patsy-buffett.example.com' to 'Host::Managed Post' queue
2019-08-12T10:50:46 [D|app|1fbde79a] Enqueued task 'Enable PuppetCA autosigning for patsy-buffett.example.com' to 'Host::Managed Post' queue
2019-08-12T10:50:46 [D|app|1fbde79a] Processing task 'Create DHCP Settings for patsy-buffett.example.com' from 'Host::Managed Main'
2019-08-12T10:50:46 [I|app|1fbde79a] Create DHCP reservation patsy-buffett.example.com for patsy-buffett.example.com-0c:c4:7a:15:1f:02/10.12.2.71
2019-08-12T10:50:46 [D|app|1fbde79a] DHCP reservation on net 10.12.0.0 with attrs: {:hostname=>"patsy-buffett.example.com", :mac=>"0c:c4:7a:15:1f:02", :ip=>"10.12.2.71", :network=>"10.12.0.0", :nextServer=>"10.12.0.60", :filename=>"pxelinux.0", :name=>"patsy-buffett.example.com", :related_macs=>[]}
2019-08-12T10:50:46 [I|app|aafabdb6] Started GET "/tasks/3d638518-e726-4554-817d-8099408760b9" for 172.31.253.6 at 2019-08-12 10:50:46 +0200
2019-08-12T10:50:46 [I|app|aafabdb6] Processing by TasksController#show as */*
2019-08-12T10:50:46 [I|app|aafabdb6]   Parameters: {"id"=>"3d638518-e726-4554-817d-8099408760b9"}
2019-08-12T10:50:46 [I|app|aafabdb6] Current user set to chrustek (admin)
2019-08-12T10:50:46 [I|app|aafabdb6]   Rendered tasks/_list.html.erb (1.4ms)
2019-08-12T10:50:46 [I|app|aafabdb6] Completed 200 OK in 23ms (Views: 2.7ms | ActiveRecord: 6.1ms)
2019-08-12T10:50:47 [D|app|1fbde79a] Processing task 'Create IPv4 DNS record for patsy-buffett.example.com' from 'Host::Managed Main'
2019-08-12T10:50:47 [I|app|1fbde79a] Add DNS A record for patsy-buffett.example.com/10.12.2.71
2019-08-12T10:50:47 [W|app|1fbde79a] Create IPv4 DNS record for patsy-buffett.example.com task failed with the following error: ERF12-2357 [ProxyAPI::ProxyException]: Unable to set DNS entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://foreman-01.example.com:8443/dns
2019-08-12T10:50:47 [W|app|1fbde79a] Rolling back due to a problem: [#<Orchestration::Task:0x0000000a3dabf8 @name="Create IPv4 DNS record for patsy-buffett.example.com", @id="Create IPv4 DNS record for patsy-buffett.example.com", @status="failed", @priority=10, @action=[#<Nic::Managed id: nil, mac: "0c:c4:7a:15:1f:02", ip: "10.12.2.71", type: "Nic::Managed", name: "patsy-buffett.example.com", host_id: nil, subnet_id: 1, domain_id: 1, attrs: {}, created_at: nil, updated_at: nil, provider: nil, username: nil, password: nil, virtual: false, link: true, identifier: "", tag: "", attached_to: "", managed: true, mode: "balance-rr", attached_devices: "", bond_options: "", primary: true, provision: true, compute_attributes: {}, ip6: "", subnet6_id: nil>, :set_dns_record, :a], @created=1565599846.5250478, @timestamp=2019-08-12 08:50:47 UTC>]
2019-08-12T10:50:47 [I|app|1fbde79a] Delete DHCP reservation patsy-buffett.example.com for patsy-buffett.example.com-0c:c4:7a:15:1f:02/10.12.2.71
2019-08-12T10:50:47 [I|app|1fbde79a] Processed 1 tasks from queue 'Host::Managed Main', completed 0/7
2019-08-12T10:50:47 [E|app|1fbde79a] Task 'Create DHCP Settings for patsy-buffett.example.com' *rollbacked*
2019-08-12T10:50:47 [E|app|1fbde79a] Task 'Create IPv4 DNS record for patsy-buffett.example.com' *failed*
2019-08-12T10:50:47 [E|app|1fbde79a] Task 'Deploy TFTP PXELinux config for patsy-buffett.example.com' *canceled*
2019-08-12T10:50:47 [E|app|1fbde79a] Task 'Deploy TFTP PXEGrub2 config for patsy-buffett.example.com' *canceled*
2019-08-12T10:50:47 [E|app|1fbde79a] Task 'Deploy TFTP PXEGrub config for patsy-buffett.example.com' *canceled*
2019-08-12T10:50:47 [E|app|1fbde79a] Task 'Deploy TFTP iPXE config for patsy-buffett.example.com' *canceled*
2019-08-12T10:50:47 [E|app|1fbde79a] Task 'Fetch TFTP boot files for patsy-buffett.example.com' *canceled*
2019-08-12T10:50:47 [E|app|1fbde79a] Failed to save: Create IPv4 DNS record for patsy-buffett.example.com task failed with the following error: ERF12-2357 [ProxyAPI::ProxyException]: Unable to set DNS entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://foreman-01.example.com:8443/dns
2019-08-12T10:50:47 [I|app|1fbde79a]   Rendering hosts/new.html.erb within layouts/application
2019-08-12T10:50:47 [I|app|1fbde79a]   Rendered hosts/_progress.html.erb (1.1ms)
2019-08-12T10:50:47 [D|app|1fbde79a] Current organization set to Default Organization
2019-08-12T10:50:47 [D|app|1fbde79a] Current location set to Default Location
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered hosts/puppet/_main_tab_fields.html.erb (15.5ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered collection of puppetclasses/_selectedClasses.html.erb [0 times] (0.0ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered collection of puppetclasses/_classes_in_groups.html.erb [0 times] (0.0ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered puppetclasses/_classes.html.erb (128.9ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered puppetclasses/_class_selection.html.erb (340.0ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered hosts/puppet/_puppet_classes_tab.html.erb (348.2ms)
2019-08-12T10:50:48 [I|app|78156be9] Started GET "/tasks/3d638518-e726-4554-817d-8099408760b9" for 172.31.253.6 at 2019-08-12 10:50:48 +0200
2019-08-12T10:50:48 [I|app|78156be9] Processing by TasksController#show as */*
2019-08-12T10:50:48 [I|app|78156be9]   Parameters: {"id"=>"3d638518-e726-4554-817d-8099408760b9"}
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered nic/_base_form.html.erb (142.7ms)
2019-08-12T10:50:48 [I|app|78156be9] Current user set to chrustek (admin)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered nic/_virtual_form.html.erb (3.5ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered nic/_provider_specific_form.html.erb (1.3ms)
2019-08-12T10:50:48 [I|app|78156be9]   Rendered tasks/_list.html.erb (2.0ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered nic/manageds/_managed.html.erb (175.1ms)
2019-08-12T10:50:48 [I|app|78156be9] Completed 200 OK in 22ms (Views: 3.8ms | ActiveRecord: 5.0ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered nic/_base_form.html.erb (82.2ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered nic/_virtual_form.html.erb (2.0ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered nic/_provider_specific_form.html.erb (0.2ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered nic/manageds/_managed.html.erb (94.4ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered hosts/_interfaces.html.erb (285.8ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered common/os_selection/_architecture.html.erb (14.0ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered common/os_selection/_pxe_loader.html.erb (3.1ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered common/os_selection/_operatingsystem.html.erb (70.0ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered hosts/provision_method/build/_form.html.erb (89.6ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered hosts/provision_method/image/_form.html.erb (0.7ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered hosts/_operating_system.html.erb (134.5ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered hosts/_unattended.html.erb (140.8ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered collection of puppetclasses/_class_parameters.html.erb [1 times] (14.2ms)
2019-08-12T10:50:48 [I|app|1fbde79a]   Rendered puppetclasses/_classes_parameters.html.erb (55.7ms)
2019-08-12T10:50:49 [I|app|1fbde79a]   Rendered common_parameters/_inherited_parameters.html.erb (3.5ms)
2019-08-12T10:50:49 [I|app|1fbde79a]   Rendered common_parameters/_parameter.html.erb (5.3ms)
2019-08-12T10:50:49 [I|app|1fbde79a]   Rendered common_parameters/_parameters.html.erb (31.9ms)
2019-08-12T10:50:49 [D|app|1fbde79a] Current location set to none
2019-08-12T10:50:49 [D|app|1fbde79a] Current organization set to none
2019-08-12T10:50:49 [I|app|1fbde79a]   Rendered hosts/_form.html.erb (1240.5ms)
2019-08-12T10:50:49 [I|app|1fbde79a]   Rendered hosts/new.html.erb within layouts/application (1247.4ms)
2019-08-12T10:50:49 [I|app|1fbde79a]   Rendered layouts/_application_content.html.erb (4.7ms)
2019-08-12T10:50:49 [I|app|1fbde79a]   Rendering layouts/base.html.erb
2019-08-12T10:50:49 [I|app|1fbde79a]   Rendered layouts/base.html.erb (71.9ms)
2019-08-12T10:50:49 [I|app|1fbde79a] Completed 200 OK in 3948ms (Views: 1212.6ms | ActiveRecord: 254.2ms)

Can you post the proxy.log from foreman-proxy? That should have the relevant information.

The log is in main post, is it not enough ?

2019-08-12T10:50:47 [D] Rack::Handler::WEBrick is invoked. 
2019-08-12T10:50:47 ff1d2d7c [I] Started POST / 
2019-08-12T10:50:47 ff1d2d7c [D] verifying remote client 10.12.0.60 against trusted_hosts ["foreman-01.example.com"] 
2019-08-12T10:50:47 ff1d2d7c [E] Failed to create record patsy-buffett.example.com A 10.12.2.71 
2019-08-12T10:50:47 ff1d2d7c [I] Finished POST / with 400 (68.28 ms) 
2019-08-12T10:50:47 [D] close: 10.12.0.60:45006 
2019-08-12T10:50:47 [D] accept: 10.12.0.60:45010 2019-08-12T10:50:47 [D] Rack::Handler::WEBrick is invoked.

I think it is all information regarding dns creation. I turned on loglevel DEBUG in foreman-proxy settings.yml, before I tried to add host.

Turns out I wasn’t reading properly. I’m slightly shocked by myself that I didn’t do a release since 2016 even though there have been very useful commits, such as more logging information. I’ll work on a 0.4.0 release which should include the logging support and release it. That should make debugging easier.

In the mean time, can you share a bit more about your config? Are you using REST or MySQL as a (plugin) backend?

I’m using mysql, this is all configuration for it:

:powerdns_backend: "mysql"
:powerdns_mysql_hostname: "10.x.x.x"
:powerdns_mysql_username: "pdns"
:powerdns_mysql_password: "xxxx"
:powerdns_mysql_database: "pdns"
:powerdns_pdnssec: "pdnsutil"

I would strongly encourage using the REST backend. The MySQL and PostgreSQL backends were written when there was no PowerDNS API. Nowadays it does. Dropping direct-DB backends might allow me to drop the whole rectify-zone support.

OK, will try to use REST backend.

Ekohl - thank You - it is working with REST api. I reported bug here - do You think i should point from there to this thread or You can close it with proper description ?

here = Bug #27574: Can't add host after configuration of dns proxy (powered by powerdns) - Foreman