Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensu packages cannot be authenticated #654

Closed
nagyt234 opened this issue May 16, 2017 · 1 comment
Closed

Sensu packages cannot be authenticated #654

nagyt234 opened this issue May 16, 2017 · 1 comment

Comments

@nagyt234
Copy link

nagyt234 commented May 16, 2017

Description of problem

  • What did you do?
    I've tried to install sensu/redis/rabbitmq throug puppet, using the puppet modules
example42/redis
puppetlabs/rabbitmq
install sensu/sensu
  • What happened?
    rabbitmq and sensu installed successfully, but sensu not, because the package is unauthenticated. See. output below.
  • What did you expect to happen?
    That sensu is also installed.
  • How can someone reproduce the problem?
    Use the manifest file below.

Command used and debugging output

  • What does your puppet config look like (including any hiera config)
    This is the manifest file in my modul "sensu_server":
class sensu_server {
  file { '/etc/rabbitmq/ssl/key.pem':
    source  => "puppet:///modules/${module_name}/rabbitmq_ssl/key.pem",
    mode    => 0644,
    owner   => root,
    group   => root,
  }

  file { '/etc/rabbitmq/ssl/cert.pem':
    source  => "puppet:///modules/${module_name}/rabbitmq_ssl/cert.pem",
    mode    => 0644,
    owner   => root,
    group   => root,
  }

  file { '/etc/rabbitmq/ssl/cacert.pem':
    source  => "puppet:///modules/${module_name}/rabbitmq_ssl/cacert.pem",
    mode    => 0644,
    owner   => root,
    group   => root,
  }

  class { 'rabbitmq':
    ssl_key => '/etc/rabbitmq/ssl/key.pem',
    ssl_cert => '/etc/rabbitmq/ssl/cert.pem',
    ssl_cacert => '/etc/rabbitmq/ssl/cacert.pem',
    ssl => true,
  }
  rabbitmq_vhost { '/sensu': }
  rabbitmq_user { 'sensu': password => 'password' }
  rabbitmq_user_permissions { 'sensu@/sensu':
    configure_permission => '.*',
    read_permission => '.*',
    write_permission => '.*',

  }
  class {'redis': }
  class { 'sensu':
    server                   => true,
    api                      => true,

    rabbitmq_host            => 'localhost',
    rabbitmq_port            => 5671,
    rabbitmq_vhost           => '/sensu',
    rabbitmq_user            => 'sensu',
    rabbitmq_password        => '******',
    rabbitmq_ssl_private_key => "puppet:///modules/${module_name}/rabbitmq_ssl/key.pem",
    rabbitmq_ssl_cert_chain  => "puppet:///modules/${module_name}/rabbitmq_ssl/cert.pem",

    redis_host               => '127.0.0.1',
    redis_port               => 6379,

    api_bind                 => '0.0.0.0',
    api_host                 => '127.0.0.1',
    api_port                 => 4567,
  }
}

The output of the command on the client: puppet agent --onetime --no-daemonize --verbose (only the first part of the output, until the first error appears):

Info: Caching catalog for *******
Info: Applying configuration version '1494868170'
Notice: /Stage[main]/Staging/File[/opt/staging]/ensure: created
Notice: /Stage[main]/Redis/Package[redis]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Sensu::Package/Package[sensu-plugin]/ensure: created
Notice: /Stage[main]/Sensu::Package/Group[sensu]/ensure: created
Notice: /Stage[main]/Sensu::Package/User[sensu]/ensure: created
Notice: /Stage[main]/Sensu::Repo::Apt/Apt::Source[sensu]/Apt::Setting[list-sensu]/File[/etc/apt/sources.list.d/sensu.list]/ensure: created
Info: /Stage[main]/Sensu::Repo::Apt/Apt::Source[sensu]/Apt::Setting[list-sensu]/File[/etc/apt/sources.list.d/sensu.list]: Scheduling refresh of Class[Apt::Update]
Info: Apt::Source[sensu]: Scheduling refresh of Exec[apt-update]
Notice: /Stage[main]/Sensu::Repo::Apt/Exec[apt-update]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Redis/File[redis.conf]/owner: owner changed 'redis' to 'root'
Notice: /Stage[main]/Redis/File[redis.conf]/group: group changed 'redis' to 'root'
Notice: /Stage[main]/Redis/File[redis.conf]/mode: mode changed '0640' to '0644'
Info: /Stage[main]/Redis/File[redis.conf]: Scheduling refresh of Service[redis]
Info: /Stage[main]/Redis/File[redis.conf]: Scheduling refresh of Service[redis]
Info: /Stage[main]/Redis/File[redis.conf]: Scheduling refresh of Service[redis]
Notice: /Stage[main]/Redis/Service[redis]: Triggered 'refresh' from 3 events
Info: Computing checksum on file /etc/apt/apt.conf.d/15update-stamp
Info: /Stage[main]/Apt/Apt::Setting[conf-update-stamp]/File[/etc/apt/apt.conf.d/15update-stamp]: Filebucketed /etc/apt/apt.conf.d/15update-stamp to puppet with sum b9de0ac9e2c9854b1bb213e362dc4e41
Notice: /Stage[main]/Apt/Apt::Setting[conf-update-stamp]/File[/etc/apt/apt.conf.d/15update-stamp]/content: content changed '{md5}b9de0ac9e2c9854b1bb213e362dc4e41' to '{md5}0962d70c4ec78bbfa6f3544ae0c41974'
Info: /Stage[main]/Apt/Apt::Setting[conf-update-stamp]/File[/etc/apt/apt.conf.d/15update-stamp]: Scheduling refresh of Class[Apt::Update]
Notice: /Stage[main]/Apt/File[preferences]/ensure: created
Info: /Stage[main]/Apt/File[preferences]: Scheduling refresh of Class[Apt::Update]
Notice: /Stage[main]/Rabbitmq::Repo::Apt/Apt::Source[rabbitmq]/Apt::Setting[list-rabbitmq]/File[/etc/apt/sources.list.d/rabbitmq.list]/ensure: created
Info: /Stage[main]/Rabbitmq::Repo::Apt/Apt::Source[rabbitmq]/Apt::Setting[list-rabbitmq]/File[/etc/apt/sources.list.d/rabbitmq.list]: Scheduling refresh of Class[Apt::Update]
Info: Class[Apt::Update]: Scheduling refresh of Exec[apt_update]
Notice: /Stage[main]/Apt::Update/Exec[apt_update]: Triggered 'refresh' from 1 events
Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install sensu' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  sensu
0 upgraded, 1 newly installed, 0 to remove and 51 not upgraded.
Need to get 30.0 MB of archives.
After this operation, 89.0 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  sensu
E: There were unauthenticated packages and -y was used without --allow-unauthenticated
Error: /Stage[main]/Sensu::Package/Package[sensu]/ensure: change from purged to latest failed: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install sensu' returned 100: Reading package lists...

  • Is this a masterless or master based puppet setup?
    It's a master base setup.

Platform and version information

  • Your OS: Ubuntu 16.04 on the puppet client, 12.04 on the puppet server
  • Your Ruby version: 2.3.1p112 on the puppet client, 1.9.3p484 on the puppet server
  • Your version of Puppet: opens source 3.8.5 on the puppet client, 3.7.3 on the puppet server
  • Your version of Sensu: not so far, the package is not installed by this module
  • Your version of this module: 2.2.0

Anything else to add that you think will be helpful?

@nagyt234
Copy link
Author

The problem was caused by the pluginsync settings on the puppet agent. It has to be enabled, see puppet documentation. The weird thing is that no error message appears anywhere about missing (custom) types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant