Bug #1409

ssh_authorized_key instantiation should not require the user being already present

Added by Francois Deppierraz about 2 years ago. Updated 4 months ago.

Status:Closed Start:07/09/2008
Priority:Normal Due date:
Assignee:Francois Deppierraz % Done:

0%

Category:ssh
Target version:0.25.0
Affected version:0.24.8 Branch:
Keywords:
Votes: 0

Description

If I understand it correctly, the user being present should only be required by the provider and not by the type itself.

user {"francois":
  ensure     => present,
  managehome => true,
}

ssh_authorized_key {"francois.deppierraz@camptocamp.com":
  ensure => present,
  type   => rsa,
  key    => "AAAA...",
  user   => "francois",
}

results in:

err: Could not create francois.deppierraz@camptocamp.com: Parameter user failed: user francois doesn't exist
/var/puppet/lib/puppet/type/ssh_authorized_key.rb:32:in `expand_path'
/var/puppet/lib/puppet/type/ssh_authorized_key.rb:32:in `value='
/usr/lib/ruby/site_ruby/1.8/puppet/util/methodhelper.rb:16:in `send'
/usr/lib/ruby/site_ruby/1.8/puppet/util/methodhelper.rb:16:in `set_options'
/usr/lib/ruby/site_ruby/1.8/puppet/util/methodhelper.rb:13:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/util/methodhelper.rb:13:in `set_options'
/usr/lib/ruby/site_ruby/1.8/puppet/parameter.rb:296:in `initialize'
/usr/lib/ruby/site_ruby/1.8/puppet/property.rb:237:in `initialize'
/usr/lib/ruby/site_ruby/1.8/puppet/metatype/attributes.rb:577:in `new'
/usr/lib/ruby/site_ruby/1.8/puppet/metatype/attributes.rb:577:in `newattr'
/usr/lib/ruby/site_ruby/1.8/puppet/metatype/attributes.rb:513:in `[]='
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:254:in `initialize'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:251:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:251:in `initialize'
/usr/lib/ruby/site_ruby/1.8/puppet/metatype/instances.rb:151:in `new'
/usr/lib/ruby/site_ruby/1.8/puppet/metatype/instances.rb:151:in `create'
/usr/lib/ruby/site_ruby/1.8/puppet/transportable.rb:87:in `to_type'
/usr/lib/ruby/site_ruby/1.8/puppet/transportable.rb:194:in `to_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/transportable.rb:122:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/transportable.rb:122:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/transportable.rb:191:in `to_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/transportable.rb:200:in `call'
/usr/lib/ruby/site_ruby/1.8/puppet/transportable.rb:200:in `to_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/transportable.rb:122:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/transportable.rb:122:in `each'
/usr/lib/ruby/site_ruby/1.8/puppet/transportable.rb:191:in `to_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/transportable.rb:206:in `call'
/usr/lib/ruby/site_ruby/1.8/puppet/transportable.rb:206:in `to_catalog'
/usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:181:in `getconfig'
/usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:253:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:445:in `thinmark'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:444:in `thinmark'
/usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:252:in `run'
/usr/lib/ruby/1.8/sync.rb:229:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:245:in `run'
/usr/sbin/puppetd:439
warning: Not using cache on failed catalog
warning: Configuration could not be instantiated: Parameter user failed: user francois doesn't exist

History

Updated by Francois Deppierraz about 2 years ago

Do I need some kind of special privilege to assign this bug to my user account ?

Updated by James Turnbull about 2 years ago

Should be able to now – you need to be a member of the project.

Updated by Francois Deppierraz about 2 years ago

  • Assignee set to Francois Deppierraz

Updated by James Turnbull about 2 years ago

  • Status changed from Unreviewed to Accepted

Updated by Francois Deppierraz about 2 years ago

Fix commited in http://github.com/ctrlaltdel/puppet/commits/tickets/0.24.x/1409

Updated by James Turnbull about 2 years ago

  • Status changed from Accepted to Closed

Pushed in commit:“4c5293b837807f61002365114fd7004d2f74ad57” in branch 0.24.x

Updated by Francois Deppierraz over 1 year ago

  • Category set to ssh
  • Status changed from Closed to Re-opened
  • Target version set to 0.25.0
  • Affected version changed from 0.24.5 to 0.24.8

Updated by Francois Deppierraz over 1 year ago

I reopened this bug according to this user report.

http://www.mail-archive.com/puppet-users@googlegroups.com/msg03566.html

Updated by Francois Deppierraz over 1 year ago

  • Status changed from Re-opened to Ready for Testing

Fix is available there and waiting for review on puppet-dev.

http://github.com/ctrlaltdel/puppet/tree/tickets/master/1409

Updated by Francois Deppierraz over 1 year ago

  • Status changed from Ready for Testing to Ready for Checkin

Updated by James Turnbull over 1 year ago

  • Status changed from Ready for Checkin to Closed

Pushed in commit:“5cc491060f35a29faff20911f54c57e9e065b6a3” in branch master.

Also available in: Atom PDF