The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #14860

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

Added by Jeff McCune over 2 years ago. Updated about 2 years ago.

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

0%

Category:SSL
Target version:2.7.19
Affected Puppet version:2.7.12 Branch:https://github.com/puppetlabs/puppet/pull/839
Keywords:cert generate dns_alt_names alternate x509 x.509

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

Overview

When using puppet cert generate foo.example.com --dns_alt_names foo,bar,foo.example.com 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 $?
0

Related issues

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

History

#1 Updated by Jeff McCune over 2 years ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Branch set to https://github.com/puppetlabs/puppet/pull/839

#2 Updated by Jeff McCune over 2 years ago

Bit of background on catching the exception at the interface layer:

https://groups.google.com/forum/?fromgroups#!topic/puppet-dev/juUl3COIIRg

#3 Updated by Kelsey Hightower about 2 years ago

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

#4 Updated by Moses Mendoza about 2 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 about 2 years ago

Released in Puppet 3.0.0-rc4

Also available in: Atom PDF