MAAPI_APPLY_TRANS(Internal Error)

Hi ConfD Team,

We have included the CONFD(tried with both 7.3 & 7.6 version) files & subdirectories as per the ConfD_Basic_License Agreement 1.1.pdf in our distribution package. When we deploy the same with our application, we are not able to apply changes to operational parameters via MAAPI. We are getting the following error logs:

TRACE Connected (maapi) to ConfD
[30/06/2022 16:47:04:138768]TRACE Connected (maapi) to ConfD
TRACE MAAPI_START_USER_SESSION [30/06/2022 16:47:04:138823]TRACE MAAPI_START_USER_SESSION
30-Jun-2022::16:47:04.138 22312/7f60886d1700/6 SEND op=100 isrel=0 th=-1 {#Bin,{{0,0,45115,60,24703,0,20595,33936},0},system,1,false,[#Bin],{undefined,undefined,undefined,#Bin</root/bksingh/repo/5(90)…>}}
→ CONFD_OK
[30/06/2022 16:47:04:138972] → CONFD_OK
TRACE MAAPI_START_TRANS [30/06/2022 16:47:04:138990]TRACE MAAPI_START_TRANS
30-Jun-2022::16:47:04.139 22312/7f60886d1700/6 SEND op=140 isrel=0 th=-1 {2,2,0,0,0,{undefined,undefined,undefined,#Bin</root/bksingh/repo/5(90)…>}}
30-Jun-2022::16:47:04.139 22312/7f60886d1700/6 GOT 10
→ CONFD_OK
[30/06/2022 16:47:04:139446] → CONFD_OK
TRACE MAAPI_SET_ELEM2 /ME/swVersion[30/06/2022 16:47:04:139501]TRACE MAAPI_SET_ELEM2 /ME/swVersion
30-Jun-2022::16:47:04.139 22312/7f60886d1700/6 SEND op=173 isrel=0 th=10 {#Bin<RSYS_ODU_Q1_2022_RC1(3)…>,[‘ME’,swVersion]}
→ CONFD_OK
[30/06/2022 16:47:04:139638] → CONFD_OK
TRACE MAAPI_APPLY_TRANS [30/06/2022 16:47:04:139649]TRACE MAAPI_APPLY_TRANS
*** 30-Jun-2022::16:47:04.139 22312/7f60886d1700/6 SEND op=143 isrel=0 th=10 {false,0}***
DEBUG external error - Internal error
[30/06/2022 16:47:04:150721]DEBUG external error - Internal error
*** → CONFD_ERR***
[30/06/2022 16:47:04:150728] → CONFD_ERR
TRACE MAAPI_STOP_TRANS [30/06/2022 16:47:04:150736]TRACE MAAPI_STOP_TRANS → CONFD_OK
[30/06/2022 16:47:04:150860] → CONFD_OK
TRACE MAAPI_END_USER_SESSION [30/06/2022 16:47:04:150867]TRACE MAAPI_END_USER_SESSION → CONFD_OK
[30/06/2022 16:47:04:150980] → CONFD_OK

On further analysis we found that the issue was fixed by adding the following two files to the distribution package:
/lib/confd/lib/cli/cli.ez
/lib/confd/lib/cli/cli/priv/cli-builtin.fxs

Success Logs:
TRACE Connected (maapi) to ConfD
2 [01/07/2022 11:41:27:34976]TRACE Connected (maapi) to ConfD
3 TRACE MAAPI_START_USER_SESSION [01/07/2022 11:41:27:35035]TRACE MAAPI_START_USER_SESSION → CONFD_OK
4 [01/07/2022 11:41:27:35201] → CONFD_OK
5 TRACE MAAPI_START_TRANS [01/07/2022 11:41:27:35219]TRACE MAAPI_START_TRANS → CONFD_OK
6 [01/07/2022 11:41:27:36201] → CONFD_OK
7 TRACE MAAPI_SET_ELEM2 /ME/swVersion[01/07/2022 11:41:27:36292]TRACE MAAPI_SET_ELEM2 /ME/swVersion → CONFD_OK
8 [01/07/2022 11:41:27:37367] → CONFD_OK
9 TRACE MAAPI_APPLY_TRANS [01/07/2022 11:41:27:37382]TRACE MAAPI_APPLY_TRANS → CONFD_OK
10 [01/07/2022 11:41:27:46367] → CONFD_OK
11 TRACE MAAPI_STOP_TRANS [01/07/2022 11:41:27:46376]TRACE MAAPI_STOP_TRANS → CONFD_OK
12 [01/07/2022 11:41:27:46489] → CONFD_OK
13 TRACE MAAPI_END_USER_SESSION [01/07/2022 11:41:27:46496]TRACE MAAPI_END_USER_SESSION → CONFD_OK
14 [01/07/2022 11:41:27:46596] → CONFD_OK
15 TRACE Connected (maapi) to ConfD
16 [01/07/2022 11:41:27:46744]TRACE Connected (maapi) to ConfD
17 TRACE MAAPI_LOAD_ALL_NS
18 [01/07/2022 11:41:27:46754]TRACE MAAPI_LOAD_ALL_NS
19 TRACE MAAPI_LOAD_MNS_MAPS
20 [01/07/2022 11:41:27:77194]TRACE MAAPI_LOAD_MNS_MAPS
21 TRACE MAAPI_LOAD_HASH_DB
22 [01/07/2022 11:41:27:77777]TRACE MAAPI_LOAD_HASH_DB
23 TRACE Connected (dp) to ConfD
24 [01/07/2022 11:41:27:82890]TRACE Connected (dp) to ConfD
25 TRACE Received daemon id 0
26 [01/07/2022 11:41:27:82933]TRACE Received daemon id 0
27 TRACE Connected (dp) to ConfD
28 [01/07/2022 11:41:27:83018]TRACE Connected (dp) to ConfD
29 TRACE Picked up old user session: 12 for user:system ctx:system
30 [01/07/2022 11:41:27:83137]TRACE Picked up old user session: 12 for user:system ctx:system
31 TRACE Picked up old user session: 11 for user:system ctx:system
32 [01/07/2022 11:41:27:83147]TRACE Picked up old user session: 11 for user:system ctx:system
“sw_mgr_confd_lib_22_07_01_11_41_27.log” 36L, 2114C

But as per the license these are not permitted as part of the distribution package. Please let us know how can we fix the above issue.

Thanks,
Bani

1 Like

Hi @cohult,

Looking forward to your input on the above query.

Thanks,
Bani

Hi,
Since it is an “external error” I am guessing that a subscriber, transform, or hook application (etc.) used a CLI feature or a function related to the CLI which caused the internal error that is reported. See the developer log (with developerLogLevel trace in confd.conf) for more details on what application failed when the transaction was applied/committed.

Hi

Looks like I am not able to enable developerLogLevel, after I tried to enable ConfD debug logs by setting ‘developerLogLevel’ to ‘btrace’ in /etc/confd/confd.conf.

Not able to login switch.

23-Jun-2022::05:45:37.739 sw0 confd[1154]: - Daemon NOS Distributed Configuration Manager died
23-Jun-2022::05:45:41.624 sw0 confd[1154]: - ConfD stopping (confd --stop called by root in /)
23-Jun-2022::05:45:41.654 sw0 confd[1154]: - Stopping to listen for NETCONF TCP on 127.0.0.1:2023
23-Jun-2022::05:45:41.782 sw0 confd[1154]: - Daemon logging terminating, reason: shutdown

‘btrace’ should be ‘trace’, or was that a typo in your post here?

Bani,
Could you describe that data that you are trying to set in your transaction? I assume it is ‘config false’, but is the data stored in CDB or do you use the data provider API? If you can attach the YANG file, or at least a snippet where this data is defined, that would be helpful.

Best regards,
Greg

Hi @greg ,

We had config false data in the yang and we were using the “maapi_start_trans” API with “CONFD_RUNNING” option, which was causing the issue. If we use “CONFD_OPERATIONAL” for config false data, issue was not seen. Now we are moving forward with a 2 socket approach i.e. for config false parameters we will be using CONFD_OPERATIONAL & for config true data we will be using CONFD_RUNNING.

Looking forward to your view on the above approach.

Thanks,
Bani

Hi @greg ,

Please find the code snippet for Yang module…

module xxxx-system-monitor {

    namespace "urn:xxxx.com:mgmt:xxxx-system-monitor";
    prefix "system-monitor";

    import tailf-common {
        prefix tailf;
    }

    import brocade-rbridge {
        prefix rbridge;
    }

    import ietf-inet-types {
        prefix inet;
    }
   grouping system-monitor-group {
        container fan {
            tailf:info "Configure threshold and alert setting for
                         component:FAN";
            tailf:cli-incomplete-no;
            container threshold {
                tailf:info "Configure threshold for component:FAN";
                tailf:cli-incomplete-no;
                tailf:callpoint smsetFanThreshold;
                tailf:cli-compact-syntax;
                leaf marginal-threshold {
                    tailf:info "Minimum number contributing to
                                MARGINAL state of component:FAN";
                    type uint32 {
                        tailf:info "Marginal threshold value";
                    }

Thanks,
Iyyappa.

Hi @greg,

Looking forward to your response.

Thanks,
Bani