---

** [tickets:#2771] imm: pbe restarted when creating reserved IMM class names**

**Status:** assigned
**Milestone:** 5.18.01
**Created:** Thu Jan 25, 2018 12:32 PM UTC by Vu Minh Nguyen
**Last Updated:** Thu Jan 25, 2018 12:32 PM UTC
**Owner:** Vu Minh Nguyen


I) When creating an  IMM object class with PBE enable, PBE will create a sqlite 
table, same name as the IMM object class name. Besides, PBE has several 
internal tables. PBE will be restarted if user requests to create same class 
name with one of these reserved ones.

For example: creating a class with following model.

```xml
    <class name="objects">
                <category>SA_CONFIG</category>
                <rdn>
                        <name>testClass</name>
                        <type>SA_STRING_T</type>
                        <category>SA_CONFIG</category>
                        <flag>SA_INITIALIZED</flag>
                </rdn>
      </class>
```

```bash
root@SC-1:~# immcfg -f test.xml
FAILED to create class 'objects', rc = SA_AIS_ERR_TIMEOUT (5)
```

We will observe PBE restarted. Here is the syslog:

> 2018-01-25 04:11:34.204 SC-1 osafimmpbed: ER SQL statement ('CREATE TABLE 
> "objects" (obj_id integer primary key, "testClass" text, 
> "SaImmAttrImplementerName" text, "SaImmAttrClassName" text, 
> "SaImmAttrAdminOwnerName" text)') failed because:#012 table "objects" already 
> exists
> 2018-01-25 04:11:34.204 SC-1 osafimmpbed: ER Exiting (line:1447)

I propose to have a check at IMM agent, and return SA_AIS_ERR_INVALID_PARAM to 
user.


---

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.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to