Bug #10040

Puppet::Face sign() is too strict with the options: "Unknown options passed: install_script, keyfile, login, node_group"

Added by Alexandre Fouche 7 months ago. Updated 7 months ago.

Status:Duplicate Start date:10/12/2011
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Affected Puppet version:2.7.5 Branch:
Keywords:cloud provisioner sign certificate options parameters
Votes: 1

Description

Puppet::Face sign() is too strict with the options: When called though Cloud provisioner init(), Puppet needs install_script, keyfile, login, node_group options for the install() and classify(), but then when Puppet::Face[:certificate, ‘0.0.1’].sign(certname, opts) in cloudpack.rb around line 500 is called, it complains because it is given too many attributes.

Someone mentionned somewhere on the web that it has been broken between Puppet 2.7.2 and 2.7.3. On my side, it works with RPMs 2.7.1 but fails with 2.7.3 and 2.7.5

I temporarily work around the problem by adding some opts.delete statements

# HACK: This should be reconciled with the Certificate Face.
opts = options.merge(:ca_location => :remote)

# AF:
opts.delete(:install_script)
opts.delete(:keyfile)
opts.delete(:login)
opts.delete(:node_group)

# TODO: Wait for C.S.R.?

Puppet.notice "Signing certificate ..."
begin
    Puppet::Face[:certificate, '0.0.1'].sign(certname, opts)

Output:

puppet node init ec2-72-44-55-162.compute-1.amazonaws.com --node-group alexgroup --login root --keyfile /etc/puppet/cwsdev_puppet.pem --install-script alexscript --verbose --debug 
(…)
notice: Registering node ...
notice: Registering node ... Done
notice: Classifying node ...
notice: Classifying node ... Done
notice: Signing certificate ...
err: Unknown options passed: install_script, keyfile, login, node_group
err: Try 'puppet help node init' for usage


puppet node init ec2-72-44-55-162.compute-1.amazonaws.com --node-group alexgroup  --install-script alexscript --verbose --debug 
(…)
err: The following options are required: keyfile, login

History

Updated by Dan Bode 7 months ago

  • Status changed from Unreviewed to Duplicate

dup of: #10062

Also available in: Atom PDF