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

Re: Constraint violation when swapping two unique attributes



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=ieee802Device



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.



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?



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.



--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/