Issue #10040 has been reported by Alexandre Fouche.

----------------------------------------
Bug #10040: Puppet::Face sign() is too strict with the options: "Unknown 
options passed: install_script, keyfile, login, node_group"
https://projects.puppetlabs.com/issues/10040

Author: Alexandre Fouche
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 2.7.5
Keywords: cloud provisioner sign certificate options parameters
Branch: 


**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



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to