Migrated from:
http://devel.opensaf.org/ticket/3122
Add a new flag for object attributes, defined as follows:
The SA_IMM_ATTR_NO_DANGLING attribute is only meaningful for configuration attributes of type SA_IMM_ATTR_SANAMET. Setting it for runtime attributes or configuration attributes of other types is not allowed and generates an error.
The IMM service will guarantee that the value(s) of an attribute with the SA_IMM_ATTR_NO_DANGLING flag, when set, contains the distinguished name of an existing IMM object. IMM will reject attempts to set it to anything that is not the distinguished name of an existing object, and it will reject attempts to delete objects that are referenced by such an attribute. This validation is performed when the CCB is applied, which means that it will take into account all changes performed within the CCB.
Optionally, it is also possible to restrict the type of objects that an attribute with the flag SA_IMM_ATTR_NO_DANGLING is allowed to reference. If the attribute name contains the colon character (ASCII value 58), then the part of the attribute name following the colon specifies the class name that referenced object must be an instance of. The IMM service will reject attempts to set the attribute to the distinguished name of an object that is not an instance of this class.
In addition, besides checking that the attribute value to be assigned is the DN of an
existing object, the imm service will check that the object is persistent, i.e. either
the DN of a config object or the DN of a persistent runtime object.
References to non persistent runtime objects can not be allowed since a cluster
restart would automatically cause such references to become dangling.
(Peristent runtime objects should of course never be used, but since they are used
heavily by services such as smfsv, it would be strange not to support referential integrity
covering references to such objects.
References from one PRTO to another PRTO would not be allowed according to the above rules,
so this addition concerns only references from config objects to runtime objects.
Some clarifiations:
1) SA_IMM_ATTR_NO_DANGLING is only allowed for persistent attributes.
This could be inferred from the description above.
2) Children of an object are NOT regarded as referring to the parent.
The deletion of a parent (if allowed) will still recursively delete all
children (if all such deletes are allowed).
3) Association objects (object that have a DN composed of the parent DN
and an RDN value that is the DN of an associated object) will be handled
as referring to the associated object.
This feature makes it possible to remove logic from AMF!
You need to upgrade relevant parts of the AMF schema (imm-classes).
But that should not be a problem.
/AndersBj
From: Hans Feldt [mailto:hansfeldt@users.sf.net]
Sent: den 23 oktober 2013 17:09
To: [opensaf:tickets]
Subject: [opensaf:tickets] #49 IMM: Support reference integrity checking
This feature makes it possible to remove logic from AMF!
[tickets:#49]http://sourceforge.net/p/opensaf/tickets/49/ IMM: Support reference integrity checking
Status: accepted
Created: Wed May 08, 2013 07:52 AM UTC by Anders Bjornerstedt
Last Updated: Tue Sep 17, 2013 08:23 AM UTC
Owner: Zoran Milinkovic
Migrated from:
http://devel.opensaf.org/ticket/3122
Add a new flag for object attributes, defined as follows:
define SA_IMM_ATTR_NO_DANGLING 0x0000000004000000
The SA_IMM_ATTR_NO_DANGLING attribute is only meaningful for configuration attributes of type SA_IMM_ATTR_SANAMET. Setting it for runtime attributes or configuration attributes of other types is not allowed and generates an error.
The IMM service will guarantee that the value(s) of an attribute with the SA_IMM_ATTR_NO_DANGLING flag, when set, contains the distinguished name of an existing IMM object. IMM will reject attempts to set it to anything that is not the distinguished name of an existing object, and it will reject attempts to delete objects that are referenced by such an attribute. This validation is performed when the CCB is applied, which means that it will take into account all changes performed within the CCB.
Optionally, it is also possible to restrict the type of objects that an attribute with the flag SA_IMM_ATTR_NO_DANGLING is allowed to reference. If the attribute name contains the colon character (ASCII value 58), then the part of the attribute name following the colon specifies the class name that referenced object must be an instance of. The IMM service will reject attempts to set the attribute to the distinguished name of an object that is not an instance of this class.
In addition, besides checking that the attribute value to be assigned is the DN of an
existing object, the imm service will check that the object is persistent, i.e. either
the DN of a config object or the DN of a persistent runtime object.
References to non persistent runtime objects can not be allowed since a cluster
restart would automatically cause such references to become dangling.
(Peristent runtime objects should of course never be used, but since they are used
heavily by services such as smfsv, it would be strange not to support referential integrity
covering references to such objects.
References from one PRTO to another PRTO would not be allowed according to the above rules,
so this addition concerns only references from config objects to runtime objects.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/opensaf/tickets/49/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Tickets:
#49https://sourceforge.net/p/opensaf/mailman/message/31668846/
https://sourceforge.net/p/opensaf/mailman/message/31718580/
The mentioned added feature for NO_DANGLING flagged attributes, of
interpreting an attribute name in an attribute definition, of the form
'name_header:name_trailer'
as restricting the target object to be an instance of a class with the
class-name 'name_trailer', will not be implemented as part of this
enhancement. Instead this will be done as a separate enhancement.
We also here clarify that the attribute name of an attribute on this
form is the entire string, including ':name_trailer'.
Thus a search on matching values for such an attribute must specify
the entire attribute name.
Currently the IMM sepc only defines how to express a search for match
on a single attribute. A search for instances of a class extent can
currently be expressed using the system attribute 'SaImmAttrClassName'.
But doing so will occupy the single attribute search criteria.
For NO_DANGLING attributes defined on the refined form of
'name_header:name_trailer' where the name_trailer is a class-name,
the interface support for matching on only one attribute will
automatically be both scoped on class extend and on match on attribute
value (an SaNameT value) on that attribute.
The immlist tool shal print the entire attribute name in listings etc.
https://sourceforge.net/p/opensaf/mailman/message/31753231/
default(4.4):
changeset: 4734:bbb2c89c1361
user: Zoran Milinkovic zoran.milinkovic@ericsson.com
date: Sun Dec 15 16:42:12 2013 +0100
summary: IMM: Add support for NO_DANGLING flag to API [#49]
changeset: 4735:e0399aa51366
user: Zoran Milinkovic zoran.milinkovic@ericsson.com
date: Sun Dec 15 16:42:41 2013 +0100
summary: IMM: Add support for NO_DANGLING flag to the service [#49]
changeset: 4736:bb56f3cb6b11
tag: tip
user: Zoran Milinkovic zoran.milinkovic@ericsson.com
date: Sun Dec 15 16:43:09 2013 +0100
summary: IMMTOOLS: Add support for NO_DANGLING flag to tools [#49]
Related
Tickets:
#49