[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Constraint violation when swapping two unique attributes



Howard Chu wrote:

> Bannister, Mark wrote:

> > Hi,

> >

> > I’m using the unique overlay on OpenLDAP 2.4.30 on Solaris 11.3 like this:

> >

> > overlay unique

> >

> > unique_uri

> > ldap:///ou=Ethers,dc=mydomain,dc=com?macAddress?sub?objectClass=ieee80

> > 2Device

> >

> > to force the macAddress to be unique.

> >

> > This works well, except if I attempt to swap the macAddress between

> > two entries in a single LDAP modify operation, like this:

> >

> > dn: cn=host1-eth0,ou=Ethers,dc=mydomain,dc=com

> > changetype: modify

> > replace: macAddress

> > macAddress: <current host1-eth1 value>

> >

> > dn: cn=host1-eth1,ou=Ethers,dc=mydomain,dc=com

> > changetype: modify

> > replace: macAddress

> > macAddress: <current host1-eth0 value>

>

> That's two separate modify operations, not a single operation.

 

Well it's the only way I know to swap the macAddress with a single ldapmodify command.

 

> > I get:

> >

> > ldap_modify: Constraint violation (19)

> >         additional info: some attributes not unique

> >

> > Is there a way to swap two values without tripping this error?

>

> Seems unlikely. Why don't you rename the entries instead?

 

Yes I suppose that's the only way to do this.  Thanks for the suggestion.  The LDIF has been automatically generated by the ldifdiff.pl script, I'll approach the author to see if it’s a change that could be made easily.

 

Thanks,

Mark.

 





NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or views contained herein are not intended to be, and do not constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer Protection Act. If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers  If you cannot access these links, please notify us by reply message and we will send the contents to you. By communicating with Morgan Stanley you consent to the foregoing and to the voice recording of conversations with personnel of Morgan Stanley.