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

Puppet 6 Support #505

Closed
rychannel opened this Issue Dec 11, 2018 · 13 comments

Comments

Projects
None yet
5 participants
@rychannel
Copy link

rychannel commented Dec 11, 2018

Has anyone tried this on Puppet 6 or PE 2019 yet?

@rdagum

This comment has been minimized.

Copy link

rdagum commented Dec 28, 2018

I'm not able to install icinga2 with P6. We had to upgrade to P6 because of other modules and now we are stuck unable to deploy icinga.

@lbetz

This comment has been minimized.

Copy link
Member

lbetz commented Dec 29, 2018

Did you checkout branch v2.x?

@gasperno

This comment has been minimized.

Copy link

gasperno commented Dec 29, 2018

Puppet version: 6.1.0
Icinga Version: r2.10.2-1

I tried with v2.x this morning. I have the following resources configured for icinga master role.

    class { 'icinga2::pki::ca': }
    class { 'icinga2::feature::api':
        pki     => 'none',
    }

Actual Behavior:

object ApiListener "api" {
  crl_path = ""
  accept_commands = ""
  accept_config = ""
  ticket_salt = TicketSalt
  tls_protocolmin = ""
  cipher_list = ""
  bind_host = ""
  bind_port = ""
  access_control_allow_origin = ""
  access_control_allow_credentials = ""
  access_control_allow_headers = ""
  access_control_allow_methods = ""
}

Expected Behavior: I call this expected because I get the following with puppet5 so I expect something similar with puppet6.

 object ApiListener "api"  {
      cert_path = "/etc/icinga2/pki/mc1.ascentis-test.com.crt"
      key_path = "/etc/icinga2/pki/mc1.ascentis-test.com.key"
      ca_path = "/etc/icinga2/pki/ca.crt"
      accept_commands = false
      accept_config = false
      ticket_salt = TicketSalt
}

This causes icinga2 validation to fail so icinga2 does not start.

@lbetz

This comment has been minimized.

Copy link
Member

lbetz commented Dec 29, 2018

puppet apply example/init_master.pp

I get with puppet 6.1.0 and puppet-icinga2 1.3.7:

object ApiListener "api" {
cert_path = "/etc/icinga2/pki/master.localdomain.crt"
key_path = "/etc/icinga2/pki/master.localdomain.key"
ca_path = "/etc/icinga2/pki/ca.crt"
accept_commands = false
accept_config = false
ticket_salt = TicketSalt
}

with branch v2.x:

object ApiListener "api" {
ticket_salt = TicketSalt
}

So the results of both looks correct.

@lbetz lbetz added the question label Jan 2, 2019

@gasperno

This comment has been minimized.

Copy link

gasperno commented Jan 11, 2019

I had to update dependency version and 2.x worked as expected with puppet 6. Thanks @lbetz

@rychannel

This comment has been minimized.

Copy link
Author

rychannel commented Jan 12, 2019

@lbetz

This comment has been minimized.

Copy link
Member

lbetz commented Jan 14, 2019

I'm using the v1.3.7 and the upcoming v1.4.0 also with puppet6.

@lbetz

This comment has been minimized.

Copy link
Member

lbetz commented Jan 14, 2019

Regarding the blank string problem: all icinga attributes are stored in a hash in puppet and are delivered via every object define resource to class object itself. And important all undef values are deleted by using the function delete_undef_values out from the stdlib module.

e.g. manifests/object/user.pp:

create object

icinga2::object { "icinga2::object::User::${title}":
ensure => $ensure,
object_name => $user_name,
object_type => 'User',
template => $template,
import => $import,
attrs => delete_undef_values($attrs),
attrs_list => keys($attrs),
target => $target,
order => $order,
}

@benningm

This comment has been minimized.

Copy link
Contributor

benningm commented Jan 14, 2019

You need to update your stdlib module to at least 5.1.0 because it fixes the function for puppet6:

puppetlabs/puppetlabs-stdlib@792bcd4

@lbetz

This comment has been minimized.

Copy link
Member

lbetz commented Jan 14, 2019

thx

@benningm

This comment has been minimized.

Copy link
Contributor

benningm commented Jan 14, 2019

It may be gentle to add a check like:

$stdlib_metadata = load_module_metadata('stdlib')                               
$stdlib_version = $stdlib_metadata['version']                                   
                                                                                
if(                                                                             
  versioncmp($puppetversion, '6' ) >= 0                                         
  and                                                                           
  versioncmp($stdlib_version, '5.1.0') < 0                                      
) {                                                                             
  notify { 'You may be affected by this bug: https://github.com/Icinga/puppet-icinga2/issues/505': }                                                             
}                                                                               
@gasperno

This comment has been minimized.

Copy link

gasperno commented Jan 30, 2019

@lbetz I noticed that v2.x branch is deleted. Any timelines on when v2.0 will be pushed to Puppet forge?

@lbetz

This comment has been minimized.

Copy link
Member

lbetz commented Jan 30, 2019

@gasperno v2.x moved to the master branch.

@lbetz lbetz added this to the v2.0.0 milestone Jan 30, 2019

@lbetz lbetz self-assigned this Feb 4, 2019

@lbetz lbetz changed the title Feature Request: Support Puppet 6 / PE 2019.x Puppet 6 Support Feb 4, 2019

@lbetz lbetz closed this in 56c1077 Feb 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.