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

Hiera/Problem with concat: Target Concat_file with path of ... not found in the catalog #1102

Closed
linuxmail opened this issue Aug 3, 2017 · 1 comment

Comments

@linuxmail
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: Agent 4.8.2-5 / Puppetserver 2.7.2-1puppetlabs1
  • Ruby: 2.3.3
  • Distribution: Agent: Debian Stretch / Server Debian Wheezy
  • Module version: puppet-nginx (v0.7.0)

How to reproduce (e.g Puppet code you use)

nginx::resource::server:
  'default':
    ensure: present
    www_root: '/var/www'
    server_name:
      - 'matrix.example.com'
    ssl: true
    listen_port: '443'
    ssl_cert: '/etc/ssl/certs/ina-chat.example.com.crt'
    ssl_key: '/etc/ssl/private/ina-chat.example.com.key'
    ssl_protocols: 'TLSv1.1 TLSv1.2'
    ssl_cache: 'shared:SSL:50m'
    access_log: '/var/log/nginx/matrix.example.com.log'
    error_log: '/var/log/nginx/matrix.example.com.err info'
nginx::nginx_locations:
  '_matrix':
    location: '/_matrix'
    proxy: 'http://localhost:8008'
    server: 'default'
nginx::resource::server:
  'chat.example.com':
    use_default_location: false
    ensure: present
    www_root: '/opt/Riot/resources/webapp/'
    server_name:
      - 'chat.example.com'
    ssl: true
    listen_port: '443'
    ssl_cert: '/etc/ssl/certs/ina-chat.example.com.crt'
    ssl_key: '/etc/ssl/private/ina-chat.example.com.key'
    ssl_protocols: 'TLSv1.1 TLSv1.2'
    ssl_cache: 'shared:SSL:50m'
    access_log: '/var/log/nginx/ina-chat.example.com.log'
    error_log: '/var/log/nginx/ina-chat.example.com.err info'

What are you seeing

Info: Loading facts
Info: Applying configuration version '1501740440'
Warning: /Stage[main]/Nginx/Nginx::Resource::Location[_matrix]/Concat::Fragment[default-500-0d3029858d1b26ea51afd562406fde65]/Concat_fragment[default-500-0d3029858d1b26ea51afd562406fde65]: Target Concat_file with path of /etc/nginx/sites-available/default.conf not found in the catalog

What behaviour did you expect instead

Create to configuration files (default.conf / ina-chat.example.com.conf) with the parameters from the Hiera config.

Any additional information you'd like to impart

Maybe the problem is concat. I wanted to upgrade the Concat module, but it seems impossible:

puppet module upgrade --ignore-dependencies puppetlabs-concat --version 3.0.0
Notice: Preparing to upgrade 'puppetlabs-concat' ...
Notice: Found 'puppetlabs-concat' (v2.2.0) in /opt/puppet/environments/production/modules ...
Notice: Downloading from https://forgeapi.puppet.com ...
Error: Could not upgrade module 'puppetlabs-concat' (v2.2.0 -> v3.0.0)
  No version of 'puppetlabs-concat' can satisfy all dependencies
    Use `puppet module upgrade --ignore-dependencies` to upgrade only this module

Upgrade by hand doesn't work too:

server:[/opt/puppet/environments/production/modules]: puppet module list | grep conc
Warning: Module 'puppetlabs-concat' (v3.0.0) fails to meet some dependencies:
  'puppetlabs-apache' (v1.11.0) requires 'puppetlabs-concat' (>= 1.1.1 < 3.0.0)
  'icinga-icinga2' (v1.2.1) requires 'puppetlabs-concat' (>= 2.0.1 < 3.0.0)
  'puppetlabs-postgresql' (v4.8.0) requires 'puppetlabs-concat' (>= 1.1.0 <3.0.0)
├── puppetlabs-concat (v3.0.0)  invalid
root@ina-zabbix:[/opt/puppet/environments/production/modules]: puppet module list | grep std
Warning: Module 'puppetlabs-concat' (v3.0.0) fails to meet some dependencies:
  'puppetlabs-apache' (v1.11.0) requires 'puppetlabs-concat' (>= 1.1.1 < 3.0.0)
  'icinga-icinga2' (v1.2.1) requires 'puppetlabs-concat' (>= 2.0.1 < 3.0.0)
  'puppetlabs-postgresql' (v4.8.0) requires 'puppetlabs-concat' (>= 1.1.0 <3.0.0)
├── puppetlabs-stdlib (v4.16.0)

So, I'm stuck .... Do anybody have any suggestions ?

cu denny

@linuxmail
Copy link
Author

hi,

I was able to fixing it. I had several issues:

  • A lot of Puppet modules had Concat dependencies lower then 3.0
  • Hiera syntax was wrong
  • Some modules where to old

The correct syntax is now:

########### Nginx Settings ##############

nginx::nginx_servers:
  'matrix.example.com':
    ensure: 'present'
    server_name:
      - 'matrix.example.com'
    ssl: true
    listen_port: 443
    ssl_cert: '/etc/ssl/certs/ina-chat.example.com.crt'
    ssl_key: '/etc/ssl/private/ina-chat.example.com.key'
    ssl_protocols: 'TLSv1.1 TLSv1.2'
    ssl_ciphers: 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'
    ssl_cache: 'shared:SSL:50m'
    access_log: '/var/log/nginx/ina-chat.example.com.log'
    error_log: '/var/log/nginx/ina-chat.example.com.err info'
    use_default_location: false
    locations:
      '_matrix':
        ensure: 'present'
        location: '/_matrix'
        proxy_set_header:
          - 'X-Forwarded-For $remote_addr'
        proxy: 'http://localhost:8008'
  'chat.example.com':
    use_default_location: false
    ensure: present
    www_root: '/opt/Riot/resources/webapp/'
    server_name:
      - 'chat.example.com'
    ssl: true
    listen_port: 443
    ssl_cert: '/etc/ssl/certs/ina-chat.example.com.crt'
    ssl_key: '/etc/ssl/private/ina-chat.example.com.key'
    ssl_protocols: 'TLSv1.1 TLSv1.2'
    ssl_ciphers: 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'
    ssl_cache: 'shared:SSL:50m'
    access_log: '/var/log/nginx/ina-chat.example.com.log'
    error_log: '/var/log/nginx/ina-chat.example.com.err info'

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