Code Monkey home page Code Monkey logo

powerdns-formula's People

Contributors

aboe76 avatar baby-gnu avatar bentwire avatar costibleotu avatar dafyddj avatar gravyboat avatar iggy avatar kpostrup avatar myii avatar noelmcloughlin avatar semantic-release-bot avatar sticky-note avatar tampakrap avatar techhat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powerdns-formula's Issues

Does not work out of the box

Including powerdns in the top.sls and running highstate results in it failing to render the configuration:

----------
ID: powerdns_config
Function: file.managed
Name: /etc/powerdns/pdns.conf
Result: False
Comment: Unable to manage file: Jinja error: argument of type 'StrictUndefined' is not iterable
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/salt/utils/templates.py", line 261, in render_jinja_tmpl
output = jinja_env.from_string(tmplstr).render(**unicode_context)
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "<template>", line 11, in top-level template code
TypeError: argument of type 'StrictUndefined' is not iterable

; line 11

---
[...]
#################################
# allow-axfr-ips If enabled, restrict zonetransfers to originate from these
# IP addresses
#
# allow-axfr-ips=
{% if 'dns-supermaster' in grains['role'] %} <======================
allow-axfr-ips={{ pillar['networks']['dns-master']['ip'] }}
{% endif %}

#################################
# allow-recursion   List of netmasks that are allowed to recurse
[...]

---
Changes: 

[BUG] Default version 4.0 is no longer available

Your setup

Formula commit hash / release tag

v0.3.4

Pillar / config used

None. take defaults

Bug details

Describe the bug

defaults use powerdns v4.0 which is no long available

Expected behaviour

Defaults should be valid

Attempts to fix the bug

Set the default to master

sls.example does not work on its own

_module/powerdns.py mentions passing pdns.url, pdns.server_id, pdns.api_key to a pillar, but I have been unable to determine how. It appears this is required for the sls.example state to work.

records.sls state:

pdnsapi python module:
  pip.installed:
    - name: pdnsapi >= 0.3.0b3
    - reload_modules: True
    - require:
      - cmd: /usr/bin/python /usr/local/sbin/get-pip.py

subdomain.domain.net.present:
  powerdns.zone_present:
    - name: subdomain.domain.net
    - require:
      - pip: pdnsapi >= 0.3.0b3

subdomain.domain.net.SOA:
  powerdns.record_present:
    - zone: subdomain.domain.net
    - name: subdomain.domain.net
    - record_type: 'SOA'
    - records:
      - netsvc.subdomain.domain.net. hostmaster.subdomain.domain.net. 1 10800 3600 604800 300
    - require:
      - powerdns: subdomain.domain.net.present

salt state.apply output:

    Function: powerdns.zone_present
        Name: subdomain.domain.net
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1746, in call
                  **cdata['kwargs'])
                File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1704, in wrapper
                  return f(*args, **kwargs)
                File "/var/cache/salt/minion/extmods/states/powerdns.py", line 29, in zone_present
                  if __salt__['powerdns.zone_exists'](name):
                File "/var/cache/salt/minion/extmods/modules/powerdns.py", line 96, in zone_exists
                  zone = conn.get_zone(name)
                File "/usr/local/lib/python2.7/dist-packages/pdnsapi/api.py", line 251, in get_zone
                  zone_name))
                File "/usr/local/lib/python2.7/dist-packages/pdnsapi/api.py", line 103, in perform_request
                  response = method(url, headers={'X-API-Key': api_key}, data=data)
                File "/usr/lib/python2.7/dist-packages/requests/api.py", line 69, in get
                  return request('get', url, params=params, **kwargs)
                File "/usr/lib/python2.7/dist-packages/requests/api.py", line 50, in request
                  response = session.request(method=method, url=url, **kwargs)
                File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 451, in request
                  prep = self.prepare_request(req)
                File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 382, in prepare_request
                  hooks=merge_hooks(request.hooks, self.hooks),
                File "/usr/lib/python2.7/dist-packages/requests/models.py", line 304, in prepare
                  self.prepare_url(url, params)
                File "/usr/lib/python2.7/dist-packages/requests/models.py", line 362, in prepare_url
                  to_native_string(url, 'utf8')))
              MissingSchema: Invalid URL '/api/v1/servers//zones/subdomain.domain.net': No schema supplied. Perhaps you meant http:///api/v1/servers//zones/subdomain.domain.net?
     Started: 13:13:14.353211
    Duration: 6.897 ms
     Changes:
----------
          ID: subdomain.domain.net.SOA
    Function: powerdns.record_present
        Name: subdomain.domain.net
      Result: False
     Comment: One or more requisite failed: powerdns.records.subdomain.domain.net.present
     Changes:

[FEATURE] Support for running a pdns recursor.

Is your feature request related to a problem?

PDNS architecture is ideally two tiers with a recursor reading from an authoritative server. There is no support for the recursor here.
It is mostly doable as it stands by changing the variables but it would be nice to have it supported out of the box.

Describe the solution you'd like

Having a powerdns.recursor sls file that creates a recursor with very little interference would be great.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.