Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-913

An empty csr_attributes.yaml file fails with undefined method

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 3.4.0
    • Fix Version/s: PUP 3.4.0
    • Component/s: Networking
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Week 2013-12-04 to 2013-12-11

      Description

      Josh Cooper found that an empty csr_attributes.yaml file raised:

      Error: Could not request certificate: undefined method `delete' for false:FalseClass

      when the agent tries to create a keypair. He found this on a windows agent, but the problem is likely general.

      0 ~/work/puppet (master)  $ rm -rf ~/.puppet
      0 ~/work/puppet (master)  $ mkdir ~/.puppet
      0 ~/work/puppet (master)  $ touch ~/.puppet/csr_attributes.yaml
      0 ~/work/puppet (master)  $ bundle exec puppet agent -td --server puppetmaster.solar.lan
      ...
      Info: Creating a new SSL key for arcturus.local
      Info: Caching certificate for ca
      Info: csr_attributes file loading from /Users/josh/.puppet/csr_attributes.yaml
      Error: Could not request certificate: undefined method `delete' for false:FalseClass
      

      where the stacktrace is:

      Error: Could not request certificate: undefined method `delete' for false:FalseClass
      /Users/josh/work/puppet/lib/puppet/ssl/certificate_request_attributes.rb:25:in `load'
      /Users/josh/work/puppet/lib/puppet/ssl/host.rb:178:in `generate_certificate_request'
      /Users/josh/work/puppet/lib/puppet/ssl/host.rb:229:in `generate'
      /Users/josh/work/puppet/lib/puppet/ssl/host.rb:36:in `localhost'
      /Users/josh/work/puppet/lib/puppet/ssl/validator/default_validator.rb:26:in `initialize'
      /Users/josh/work/puppet/lib/puppet/ssl/validator.rb:27:in `new'
      /Users/josh/work/puppet/lib/puppet/ssl/validator.rb:27:in `default_validator'
      /Users/josh/work/puppet/lib/puppet/network/http_pool.rb:27:in `http_instance'
      /Users/josh/work/puppet/lib/puppet/indirector/rest.rb:58:in `network'
      /Users/josh/work/puppet/lib/puppet/indirector/rest.rb:83:in `http_request'
      /Users/josh/work/puppet/lib/puppet/indirector/rest.rb:63:in `http_get'
      /Users/josh/work/puppet/lib/puppet/indirector/rest.rb:97:in `block in find'
      /Users/josh/work/puppet/lib/puppet/indirector/rest.rb:178:in `block in do_request'
      /Users/josh/work/puppet/lib/puppet/indirector/request.rb:261:in `do_request'
      /Users/josh/work/puppet/lib/puppet/indirector/rest.rb:178:in `do_request'
      /Users/josh/work/puppet/lib/puppet/indirector/rest.rb:91:in `find'
      /Users/josh/work/puppet/lib/puppet/indirector/certificate/rest.rb:12:in `find'
      /Users/josh/work/puppet/lib/puppet/indirector/indirection.rb:201:in `find'
      /Users/josh/work/puppet/lib/puppet/ssl/host.rb:202:in `certificate'
      /Users/josh/work/puppet/lib/puppet/ssl/host.rb:324:in `wait_for_cert'
      /Users/josh/work/puppet/lib/puppet/application/agent.rb:477:in `wait_for_certificates'
      /Users/josh/work/puppet/lib/puppet/application/agent.rb:318:in `run_command'
      

      Once in this state, you need to delete the csr_attributes.yaml file from the confdir

        Attachments

          Activity

            People

            Assignee:
            eric.sorenson Eric Sorenson
            Reporter:
            joshua.partlow Joshua Partlow
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support