- **status**: review --> fixed
- **assigned_to**: Vu Minh Nguyen -->  nobody 
- **Comment**:

commit 6c5c389b4d92bf48e42615b067f8a9028880a2a8 (HEAD -> develop, 
origin/develop, ticket-2985)
Author: Vu Minh Nguyen <[email protected]>
Date:   Tue Jan 15 10:29:26 2019 +0700

    imm: allow empty-value attribute with default-tag persisted [#2985]

    During runtime, when replacing value of an attribute which has default-value
    tag with NULL, this NULL value is not persistent after cluster is rebooted -
    NULL value will be automatically replaced with its default value by IMM.

    This behavior causes several unexpected results. Below is an use case:
    User defines an attribute with name `maxAge`; the value shows how many days
    user passwords will get expired; default value is 30 days. If replacing with
    a NULL/empty, it means the passwords will never get expired.

    User may change the existing value with NULL - expect the passwords never 
get
    expired, but later on, after cluster is rebooted, that value is silently
    replaced with the default value without notice of user.

    This patch makes some changes in immdump/immloader/imm om library/immnd
    to make NULL value in such case persisted even after cluster is rebooted.



---

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

**Status:** fixed
**Milestone:** 5.19.03
**Created:** Thu Dec 13, 2018 10:17 AM UTC by Vu Minh Nguyen
**Last Updated:** Tue Jan 15, 2019 03:58 AM UTC
**Owner:** nobody
**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