The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #14860

Puppet cert generate subcommand does not exit with non-zero status when certificate is not created

Added by Anonymous almost 4 years ago. Updated over 3 years ago.

Status:ClosedStart date:06/06/2012
Priority:NormalDue date:
Assignee:-% Done:


Target version:2.7.19
Affected Puppet version:2.7.12 Branch:
Keywords:cert generate dns_alt_names alternate x509 x.509

We've Moved!

Ticket tracking is now hosted in JIRA:



When using puppet cert generate --dns_alt_names foo,bar, the command fails but the exit status is 0, indicating success.

Expected Results

An exit status of 0 should only be returned on successful generation of the certificate.

Actual Results

When the command fails, the exit status is 0.

Steps to reproduce

Given 2.7.12 (Puppet Enterprise 2.5.1)

root@pe-centos6:~# puppet cert generate pe-internal-broker-test --dns_alt_names stomp,pe-centos6,pe-centos6.puppetlabs.vm
notice: pe-internal-broker-test has a waiting certificate request
err: Could not call generate: CSR 'pe-internal-broker-test' contains subject alternative names (DNS:pe-centos6, DNS:pe-centos6.puppetlabs.vm, DNS:pe-internal-broker-test, DNS:stomp), which are disallowed. Use `puppet cert --allow-dns-alt-names sign pe-internal-broker-test` to sign this request.
root@pe-centos6:~# echo $?

Related issues

Related to Puppet - Bug #14662: Puppet cert list returns 0 on error Needs More Information 05/23/2012


#1 Updated by Anonymous almost 4 years ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Branch set to

#2 Updated by Anonymous almost 4 years ago

Bit of background on catching the exception at the interface layer:!topic/puppet-dev/juUl3COIIRg

#3 Updated by Kelsey Hightower almost 4 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release

#4 Updated by Moses Mendoza over 3 years ago

  • Status changed from Merged - Pending Release to Closed
  • Target version changed from 2.7.x to 2.7.19

Released in 2.7.19rc1.

#5 Updated by Matthaus Owens over 3 years ago

Released in Puppet 3.0.0-rc4

Also available in: Atom PDF