The ticket should be set invalid.

To me it seems as if the use case described in the ticket is not really valid 
even if the IMM behavior is a bit inconsistent (value=<empty> is replaced by 
default at restart but other values are not). If I have understood it correctly 
you say that an attribute where an empty value has a significant meaning (from 
ticket: MaxAge=<empty> means that a password never expires). This is in itself 
not an invalid use case but there is already a way to avoid this behavior and 
that is to not have a default value in the class specification. If all values 
including <empty> is a valid value then setting a default value to be handled 
by IMM is incorrect. Instead, the software that "owns/is dependent on" this 
attribute should check if the value is valid (if for example the attribute has 
a max value so values larger than that max are invalid) and if the value is 
invalid it could be replaced by a default value.


---

** [tickets:#2985] imm: allow empty value attribute with default tag to 
persist**

**Status:** review
**Milestone:** 5.19.03
**Created:** Thu Dec 13, 2018 10:17 AM UTC by Vu Minh Nguyen
**Last Updated:** Wed Jan 09, 2019 09:26 PM UTC
**Owner:** Vu Minh Nguyen
**Attachments:**

- 
[TestClass.xml](https://sourceforge.net/p/opensaf/tickets/2985/attachment/TestClass.xml)
 (2.4 kB; text/xml)


When replacing value of an attribute which has default-value tag with NULL 
during runtime, NULL value will be replaced with its default value after 
cluster is rebooted; in other words, that value is not persisted.  

Let's take an example: user defines an attribute `maxAge` which shows how many 
days user passwords will be expired, default is 30 days; if replacing  with a 
NULL/empty, it means the passwords will never get expired. 

When the exisiting value is replaced with NULL during runtime, then cluster is 
rebooted, that value is silently replaced with the default without notice of 
user.

This behavior is clearly documented in IMM:
> (iii) Default values are assigned at cluster restart for any attributes that 
> are null/empty and that have a default.

But with the need of above use case, this ticket proposes a change that empty 
value attribute with default tag will remain empty for subsequent executive 
reads even after cluster is rebooted.

The proposal:
1) Introduce a notation in IMM model file (XML) that represents a NULL value. 
        <value xsi:nil=“true” />

2) Allow *only* IMM loader to send the attribute descriptor which has NULL 
value to IMMND when creating IMM object. Other applications will get default 
value for NULL attribute when creating object as exactly as legacy behavior is 
doing.













---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to