Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-205

Invalid configuration items cause weird exceptions that are hard for the user to debug

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: PDB 1.5.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:

      Description

      Point in case:

      node-purge-ttl = 30

      Throws the exception:

      <pre>
      java.lang.AssertionError: Assert failed: (string? s)
      at com.puppetlabs.time$parse_period.invoke (time.clj:77)
      com.puppetlabs.puppetdb.cli.services$configure_gc_params$maybe_parse_period__10096.invoke (services.clj:234)
      com.puppetlabs.puppetdb.cli.services$configure_gc_params$fn__10114.invoke (services.clj:249)
      clojure.lang.AFn.applyToHelper (AFn.java:161)
      clojure.lang.AFn.applyTo (AFn.java:151)
      clojure.core$apply.invoke (core.clj:603)
      clojure.core$update_in.doInvoke (core.clj:5472)
      clojure.lang.RestFn.invoke (RestFn.java:445)
      ...snip...
      </pre>

      The solution in this case is that it needed a trailing suffix (ie. 'm', 's', 'd' etc.) which the documentation clearly states, however its an easy mistake to make - but a hard one to rectify on your own without inner working knowledge of the PuppetDB code.

      We should probably validate configuration items early and return errors not exceptions, this would solve a lot of this confusion.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              redmine.exporter redmine.exporter
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support