This KB article explain about the config validation error occurs while upgrading the SRX branch devices which are in transparent mode from prior to 15.1X49-D100 to later releases.
We will receive the below errors while upgrading the node which is in transparent mode from prior to 15.1X49-D100 to later releases.
root> request system software add /var/tmp/<junos image> no-copy
[edit interfaces ge-0/0/x unit 0 family]
'ethernet-switching'
In switching mode, ethernet-switching interface must not be in security zone.
</output>
mgd: error: commit failed: (statements constraint check failed)
Validation failed
ERROR: Current configuration not compatible with /altroot/cf/packages/install-tmp/<Package name>
If we proceed with the no-validate command, we can able to upgrade the device but later while performing the commit you will receive the same above errors.
Starting with Junos OS Release 15.1X49-D100, on SRX300, SRX320, SRX340, SRX345, SRX550, and SRX550M devices, the default Layer 2 global mode configuration is changed from transparent-bridge to switching mode.
NOTE: You must explicitly configure Layer 2 transparent-bridge mode for the SRX300, SRX320, SRX340, SRX345, SRX550, and SRX550M devices that work in transparent mode. Use the command
"set protocols l2-learning global-mode transparent-bridge" before rebooting the devices with Junos OS 15.1X49-D100 image.
"set protocols l2-learning global-mode transparent-bridge"
If the device is in 15.1X49-D100 or prior, add the command "set protocols l2-learning global-mode transparent-bridge" and proceed with reboot of the device. Post reboot the device will be upgraded without errors.
If the device already upgraded to the next releases with using no-validate command and the device is showing the above errors while doing a commit, then use the command "set protocols l2-learning global-mode transparent-bridge" and proceed with reboot of the device.