Giter VIP home page Giter VIP logo

Comments (8)

cjeanneret avatar cjeanneret commented on June 20, 2024

The acceptance test shows the issue: the provider doesn't detect properly the existing index.

from puppet-openldap.

cjeanneret avatar cjeanneret commented on June 20, 2024

Seems the self.instances is correct:

[
#<Puppet::Type::Openldap_dbindex::ProviderOlc:0x00000003583ad8 @property_hash={
:name=>"objectClass on dc=foo,dc=example,dc=com",
:ensure=>:present,
:attribute=>"objectClass",
:suffix=>"dc=foo,dc=example,dc=com",
:indices=>"eq"
}>,
#<Puppet::Type::Openldap_dbindex::ProviderOlc:0
x00000003583588 @property_hash={
:name=>"cn on dc=foo,dc=example,dc=com",
:ensure=>:present,
:attribute=>"cn",
:suffix=>"dc=foo,dc=example,dc=com",
:indices=>"pres,sub,eq"
}>,
#<Puppet::Type::Openldap_dbindex::ProviderOlc:0x000000035831f0 @property_hash={
:name=>"uid on dc=foo,dc=example,dc=com",
:ensure=>:present,
:attribute=>"uid",
:suffix=>"dc=foo,dc=example,dc=com",
:indices=>"pres,sub,eq"
}>
]

from puppet-openldap.

cjeanneret avatar cjeanneret commented on June 20, 2024

OK, seems I have found the issue:
it seems the provider wants a specific string, like "foo on bar".
But when we create the index resource, we're more likely to put just "foo" or any other string.

Main issue is here$title shouldn't be used in there. We should create a string like the following:

$_title = "${attribute} on ${suffix}"

But even this won't work properly in the case we have multiple attribute in the form foo,bar,baz, as the type itself split those attribute in separated instances.

@mcanevet would be good to discuss this matter when you have some time to spare :).

from puppet-openldap.

mcanevet avatar mcanevet commented on June 20, 2024

@cjeanneret there is something weird with the composite namevar, it looks like it does not recognize the existence of the resource and thus tries to create it again.

from puppet-openldap.

raphink avatar raphink commented on June 20, 2024

So is this fixed now?

from puppet-openldap.

mcanevet avatar mcanevet commented on June 20, 2024

@cjeanneret should be fixed, feel free to reopen if it is not the case.

from puppet-openldap.

coffeecoco avatar coffeecoco commented on June 20, 2024

I am having this issue still

o matching Packages to list
Error: LDIF content:
dn: olcDatabase=hdb,cn=config
changetype: add
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: hdb
olcDbDirectory: /var/lib/ldap
olcSuffix: dc=pexadir,dc=pexa,dc=com
olcDbIndex: objectClass eq
olcAccess: to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage by * break
olcAccess: to attrs=userPassword
by self write
by anonymous auth
by dn="cn=admin,dc=pexadir,dc=pexa,dc=com" write
by * none
olcAccess: to dn.base="" by * read
olcAccess: to *
by self write
by dn="cn=admin,dc=pexadir,dc=pexa,dc=com" write
by * read

Error message: Execution of '/bin/ldapmodify -Y EXTERNAL -H ldapi:/// -f /tmp/openldap_database20151124-31049-eutbk' returned 80: SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
ldap_add: Other (e.g., implementation specific) error (80)
additional info: namingContext "dc=pexadir,dc=pexa,dc=com" already served by a preceding hdb database
adding new entry "olcDatabase=hdb,cn=config"
Error: /Stage[main]/Main/Node[ath10]/Openldap::Server::Database[dc=pexadir,dc=pexa,dc=com]/Openldap_database[dc=pexadir,dc=pexa,dc=com]/ensure: change from absent to present failed: LDIF content:
dn: olcDatabase=hdb,cn=config
changetype: add
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: hdb
olcDbDirectory: /var/lib/ldap
olcSuffix: dc=pexadir,dc=pexa,dc=com
olcDbIndex: objectClass eq
olcAccess: to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage by * break
olcAccess: to attrs=userPassword
by self write
by anonymous auth
by dn="cn=admin,dc=pexadir,dc=pexa,dc=com" write
by * none
olcAccess: to dn.base="" by * read
olcAccess: to *
by self write
by dn="cn=admin,dc=pexadir,dc=pexa,dc=com" write
by * read

Error message: Execution of '/bin/ldapmodify -Y EXTERNAL -H ldapi:/// -f /tmp/openldap_database20151124-31049-eutbk' returned 80: SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
ldap_add: Other (e.g., implementation specific) error (80)
additional info: namingContext "dc=pexadir,dc=pexa,dc=com" already served by a preceding hdb database
adding new entry "olcDatabase=hdb,cn=config"

from puppet-openldap.

mcanevet avatar mcanevet commented on June 20, 2024

@coffeecoco could you please provide the puppet code that provided this error?

from puppet-openldap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.