Maapi_init_upgrade() API is failing due to internal error

Hi
I am going the migration from package version v1 to v2 but maapi_init_upgrade() is failing

My Expectation is

  1. Start Confd server with phase 0 with old CDB data , fxs and init files
  2. perform the in service upgrade using Maapi APIs (maapi_perform_upgrade() , maapi_perform_upgrade & maapi_commit_upgrade) in confd phase 0 with new fxs and init files
  3. once the upgrades successful then start the confd server phase 1 & phase 2

But upgrade is failing in step 2
Steps:

  1. Starts confd server with phase 0 , server up and running in phase 0 --> OK
  2. started migration from v1 to v2 using maapi apis , but maapi_init_upgrade() is failed --> NOK

below are the error
[2017-08-25 05:34:29] DEBUG internal error --> CONFD_ERR
Maapi Init upgrade failed ret = -1 confd_errno = 18

So question is it possible to do the in-service upgrade after phase 0 using maapi APIs?
Please let me know your opinion,

Can you attach the logs for this, which may give some hint at what the internal error could be.

One thing you may want to consider is giving this a try as a normal upgrade, that is, stop ConfD, copy the new .fxs files into your load path, then try the upgrade to see if that is successful. That way you’ll know whether it is something due to the changes in your models versus trying to do a more complex in-service upgrade.

Well, the “in-service upgrade” is assumed to be done when ConfD is “in service”:-), i.e. up and running - this is definitely not the case in phase0, since CDB is not yet available at that point (a better error message would of course be appropriate though). If you are starting ConfD, it’s really a lot simpler to do the “normal” upgrade driven by CDB as Greg suggests. It may be possible to do an in-service upgrade in phase1, but even then I don’t really see the point of doing that instead of the “normal” one.

Hi
I have performed the upgrade after the phase 2

  1. maapi_init_upgrade() , --> Success
  2. maapi_perform_upgrade --> Failed
    3.maapi_commit_upgrade)

I am getting the below error ,and confd_errno is 18 i.e internal error

can you please me the reason for failure

29-Aug-2017::11:26:09.564 confd[3572]: - ConfD started vsn: 6.4.2
29-Aug-2017::11:26:09.679 confd[3572]: - Upgrade init started
29-Aug-2017::11:26:09.679 confd[3572]: - Upgrade init succeeded
29-Aug-2017::11:26:09.692 confd[3572]: - Internal error: Supervision terminated

You got any response on the same ?..

I am getting similar error…

confd[5235]: confd HA_INFO_IS_NONE
confd[5235]: - Internal error: Supervision terminated

Any input on why this is happening will help a lot. In our case we copy the cdb file and fetch data for a specific set of subscription points…

rgds
Balaji

Tried printing the confderr log… I see following in the beginning of the file…

*** {error,{badarg,size}}. Trying to open file as non wrapping log.
20-Sep-2017::10:50:41.374 <0.80.0> <0.86.0> ** Generic server cdb_op terminating
** Last message in was {perform_upgrade,

I am also facing similar issue.
Here are the logs:
INFO> 12-Sep-2018::20:49:39.499 xfe-vm confd[13926]: devel-snmpa sysORTable entry: 9 1.3.6.1.2.1 “SNMPv2-MIB”
12-Sep-2018::20:51:24.764 xfe-vm confd[13926]: confd embedded apps in early_phase0: []
12-Sep-2018::20:51:24.882 xfe-vm confd[13926]: devel-snmpa loaded snmp mib: /etc/fesw/confd/yang/RADISYS-FE-NOTIFICATION.bin
12-Sep-2018::20:51:24.882 xfe-vm confd[13926]: devel-snmpa mib already loaded: /etc/fesw/confd/yang/XFE.bin
12-Sep-2018::20:51:24.885 xfe-vm confd[13926]: confd mmap_schema handle_call got unexpected msg: commit_upgrade
12-Sep-2018::20:54:17.948 xfe-vm confd[13926]: confd embedded apps in early_phase0: []
12-Sep-2018::20:54:18.080 xfe-vm confd[13926]: devel-snmpa loaded snmp mib: /etc/fesw/confd/yang/RADISYS-FE-NOTIFICATION.bin
12-Sep-2018::20:54:18.085 xfe-vm confd[13926]: devel-snmpa loaded snmp mib: /etc/fesw/confd/yang/XFE.bin
12-Sep-2018::20:54:18.089 xfe-vm confd[13926]: confd mmap_schema handle_call got unexpected msg: commit_upgrade
12-Sep-2018::20:57:40.995 xfe-vm confd[13926]: confd embedded apps in early_phase0: []
12-Sep-2018::20:57:41.102 xfe-vm confd[13926]: devel-snmpa loaded snmp mib: /etc/fesw/confd/yang/RADISYS-FE-NOTIFICATION.bin
12-Sep-2018::20:57:41.107 xfe-vm confd[13926]: devel-snmpa loaded snmp mib: /etc/fesw/confd/yang/XFE.bin
12-Sep-2018::20:57:41.110 xfe-vm confd[13926]: confd mmap_schema handle_call got unexpected msg: commit_upgrade
12-Sep-2018::21:00:53.736 xfe-vm confd[13926]: confd embedded apps in early_phase0: []
12-Sep-2018::21:00:53.837 xfe-vm confd[13926]: devel-snmpa loaded snmp mib: /etc/fesw/confd/yang/RADISYS-FE-NOTIFICATION.bin
12-Sep-2018::21:00:53.842 xfe-vm confd[13926]: devel-snmpa loaded snmp mib: /etc/fesw/confd/yang/XFE.bin
12-Sep-2018::21:00:53.845 xfe-vm confd[13926]: confd mmap_schema handle_call got unexpected msg: commit_upgrade
12-Sep-2018::21:01:24.244 xfe-vm confd[13926]: devel-cdb Compacted CDB journal file: 5 ms (755 nodes in memory, disk size 18.51 KiB -> 10.82 KiB)
12-Sep-2018::21:02:34.692 xfe-vm confd[13926]: devel-c Worker closed daemon id: 1, worker id: 30, socket: {socket,<0.328.0>}
12-Sep-2018::21:05:04.961 xfe-vm confd[14298]: confd embedded apps in early_phase0: []
12-Sep-2018::21:05:05.244 xfe-vm confd[14298]: confd mmap_schema handle_info got msg: timeout
12-Sep-2018::21:05:05.266 xfe-vm confd[14298]: confd embedded apps in phase0: []