@elukey reported via IRC:
hey folks, I am bootstrapping a Cassandra cluster and getting Error: /Stage[main]/Cassandra::Twcs/Scap::Target[cassandra/twcs]/Package[cassandra/twcs]: Provider scap3 is not functional on this host
I suspect that this is because /usr/bin/scap was not functional on the host at the point this executed, possibly because puppet had not recently run on deploy1002.
class cassandra::twcs( ) { require ::cassandra scap::target { 'cassandra/twcs': deploy_user => 'deploy-service', manage_user => true, } }
... package { $package_name: ensure => $ensure, install_options => [{ owner => $deploy_user }], provider => 'scap3', require => $require_package, } ...
... provider_class = Puppet::Type.type(:package).provider(:scap3) describe provider_class do before do @resource = Puppet::Type.type(:package).new(name: 'foo/deploy') @provider = provider_class.new(@resource) @resource.provider = @provider @resource[:install_options] = [{ 'owner' => 'mwdeploy' }] # Stub all filesystem operations allow(FileUtils).to receive(:chown_R) allow(FileUtils).to receive(:makedirs) allow(FileUtils).to receive(:rm_rf) # Stub our mwdeploy user allow(Etc).to receive(:getpwnam).with('mwdeploy').and_return(OpenStruct.new(uid: 666)) # Stub the existance of our deploy-local command allow(@provider.class).to receive(:command) .with(:scap) .and_return('/usr/bin/scap') end ...