For anyone else who comes across this thread, various versions of NetworkManager-openvpn have various bugs that can cause failures when importing sonic's .ovpn files. Here are the ones I remember:
- Old-ish versions failed to import these inline sections: <ca> <cert> <key> <tls-auth>. Workaround: Copy those sections into separate files and replace them in the .ovpn config with the equivalent one-line directives referring to those new files.
- Recent versions fail to import comp-lzo no. Workaround: Either set "Use LZO data compression" to "yes" in NetworkManager's OpenVPN Advanced... dialog, or use nmcli to modify the VPN connection after it has been imported, setting the lzo option to no-by-default.
- Current versions fail to import key-direction 1 under some circumstances. Workaround: Set "Key Direction" to "1" in NetworkManager's OpenVPN Advanced... dialog.