CDB: Upgrade failed: Upgrade transaction failed to validate: too many configured

Hello Team,

I am using conf7.3 version and I have one small issue. The issue is with yang compatibility with the old images.

Previously for a Yang CLI, we were using max-element value as 16. Now this max-element value changed to 64.
The issue is when we load the old image where max-element support was 16 we are getting below error on bootup. and because of that our confd service not getting started and console is blocked.

CDB: Upgrade failed: Upgrade transaction failed to validate: too many /gw-system:ip/nat/inside/source/static/tcp-udp-list, 64 configured, at most 16 must be configured

Can someone please help me how can I handle the downgrade gracefully or is there any way to handle this issue.
Why confd does not discard extra rules configured and send only 16 rules with old image.

Hello,

You need to start ConfD with the --start-phase0 flag, attach to the “init session/transaction”, delete the unwanted “rules” using for example the confd_cmd tool (combining the mattach_init and maapi_delete commands). When finished deleting, run ConfD with the --start-phase2 flag.

See the examples.confd/cdb_upgrade examples and the ConfD UG chapter “Using MAAPI to modify CDB during upgrade” for details.

Which “rules” should ConfD keep and which should be thrown away? Only you know, so you need to make that decision by attaching to the init transaction and deleting the data.