voxpupuli / puppet-openldap

Manage OpenLDAP with Puppet
Apache License 2.0
37 stars 134 forks source link

OpenLDAP is not installing. Giving the following error #297

Open raja5674 opened 3 years ago

raja5674 commented 3 years ago

Hello Team,

Please help me on the below error.

Error: ==> default: Notice: /Stage[main]/Openldap::Server::Install/Package[openldap-servers]/ensure: created ==> default: Notice: /Stage[main]/Openldap::Server::Config/Shellvar[slapd]/value: value changed ['ldapi:/// ldap:///'] to 'ldap:/// ldapi:/// ' ==> default: Notice: /Stage[main]/Openldap::Server::Service/Service[slapd]/ensure: ensure changed 'stopped' to 'running' ==> default: Notice: /Stage[main]/Openldap::Utils/Package[openldap-clients]/ensure: created ==> default: Error: LDIF content: ==> default: dn: cn=nis,cn=schema,cn=config ==> default: objectClass: olcSchemaConfig ==> default: cn: nis

==> default: Error message: Execution of '/bin/ldapadd -cQY EXTERNAL -H ldapi:/// -f /tmp/openldap_schemas_ldif20210802-15796-7okrw0' returned 80: ldap_add: Other (e.g., implementation specific) error (80) ==> default: additional info: olcObjectClasses: AttributeType not found: "manager" ==> default: adding new entry "cn=nis,cn=schema,cn=config"

I guess because of the above error, getting the following error too.

==> default: Notice: /Stage[main]/Iwd-openldap/Openldap::Server::Schema[ifast]/Openldap_schema[ifast]: Dependency Openldap_schema[nis] has failures: true

I am not able to add the log file.

Details:

OS: CentOS 7 Virtual Box: Oracle Virtual Box 6.0 Puppet Version: 3.8.7 Puppet module: puppet module install puppetlabs/postgresql --version 4.7.1 puppet module install herculesteam-augeasproviders_core --version 2.2.0 puppet module install camptocamp/openldap --version 1.14.0 puppet module install puppetlabs/firewall --version 1.8.0

This script was written when we had Centos 6.x version:

init.pp :

class iwd-openldap {
  class { 'openldap::server': }

  openldap::server::schema { 'cosine':
    ensure => present,
    path   => '/etc/openldap/schema/cosine.schema'
  }

  openldap::server::schema { 'nis':
    ensure => present,
    path   => '/etc/openldap/schema/nis.schema'
  }

  openldap::server::schema { 'ifast':
    ensure  => present,
    path    => '/vagrant/puppet/modules/iwd-openldap/files/ifast-schema.schema',
    require => [ Openldap::Server::Schema["cosine"], Openldap::Server::Schema["nis"] ]
  } -> exec { 'insert ldap data':
    command => '/bin/sh /vagrant/puppet/modules/iwd-openldap/files/import-ldap.sh'
  }
}

base.ldif:

version: 1

dn: cn=Manager,dc=ifdsgroup,dc=com
objectClass: organizationalRole
cn: Manager

dn: ou=ifastbase,dc=ifdsgroup,dc=com
objectClass: organizationalUnit
objectClass: top
ou: ifastbase

dn: ou=ifast,ou=ifastbase,dc=ifdsgroup,dc=com
objectClass: top
objectClass: organizationalUnit
ou: ifast

-- some more entries will be present

Please help me to resolve this issue. I am struggling on this last two weeks. Let me know if you need any other details.

raja5674 commented 3 years ago

Team,

Any update on this request would be appreciated. I have been stuck in this issue past couple of weeks.

raja5674 commented 3 years ago

Hello Team,

No one is there is answer to my query?

TuningYourCode commented 3 years ago

hi @raja5674

puppet 3.8.7 is not supported by this module. See https://github.com/voxpupuli/puppet-openldap/blob/master/metadata.json#L74-L78

Best regards, TuningYourCode

bastelfreak commented 3 years ago

I Also want to point out that Puppet 3 is end of life since 4? years. The latest version is Puppet 7 and Puppet 8 will probably be released in 2-3 months. Please update your Puppet version to a more recent version. We're happy to help you during the migration on slack/irc (#voxpupuli on https://slack.puppet.com/ or the libera IRC network). Also CentOS 6 is dead.

raja5674 commented 3 years ago

Hello TunningYourCode / bastlefreak,

Thanks for the reply. If I update my puppet version >=6.1.0 < 8.0.0 and have the following module in my install module script, will it work? or Do I need to do any modifications in my openLDAP puppet file like I had given above (init.pp)

Puppet module: puppet module install puppetlabs/postgresql --version 4.7.1 puppet module install herculesteam-augeasproviders_core --version 2.2.0 puppet module install camptocamp/openldap --version 1.14.0 puppet module install puppetlabs/firewall --version 1.8.0

or Do I need to change the version according to puppet version? Please help me.

Thanks & Regards, Raja Rajagopal

bastelfreak commented 3 years ago

Hi @raja5674 ,

it's not that simple. Before upgrading your puppet agent you should review your code and ensure if it's still compatible with new puppet versions and new module versions, ideally you ensure this with tests. I highly suggest to not blindly update such an ancient environment without any puppet experience.