[repo] don't shell out pem key create

Bug #1459695 reported by Mark Vanderwiel on 2015-05-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack + Chef
Low
Mark Vanderwiel

Bug Description

Current rake does a double shell for the create pem key from:

 if not File.exist?('.chef/validator.pem')
    sh %(chef exec ruby -e "require 'openssl'; File.binwrite('.chef/validator.pem', OpenSSL::PKey::RSA.new(2048).to_pem)")
  end

to simply:

  if not File.exist?('.chef/validator.pem')
    require 'openssl'
    File.binwrite('.chef/validator.pem', OpenSSL::PKey::RSA.new(2048).to_pem)
  end

Fix proposed to branch: master
Review: https://review.openstack.org/186401

Changed in openstack-chef:
status: New → In Progress
summary: - don't shell out pem key create
+ [repo] don't shell out pem key create
Changed in openstack-chef:
importance: Undecided → Low

Reviewed: https://review.openstack.org/186401
Committed: https://git.openstack.org/cgit/stackforge/openstack-chef-repo/commit/?id=1e863ffbc1c5790d4a7cf562b3378a961a6995e3
Submitter: Jenkins
Branch: master

commit 1e863ffbc1c5790d4a7cf562b3378a961a6995e3
Author: Mark Vanderwiel <email address hidden>
Date: Thu May 28 09:14:17 2015 -0500

    Create pem key directly

    No need to use the shell for simple ruby code when creating the
    pem key.

    Change-Id: I60ffb6941e187abcc33f4fbe408a87be5c81f9c8
    Closes-Bug: #1459695

Changed in openstack-chef:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers