The second question leads to secondary characteristic classes. Assuming $\nabla'=\tilde\nabla$ is any connection on $X\times[0,1]$ restricting to $\nabla_i$ on~$X\times\{1\}$, $i\in\{0,1\}$, its Chern-Simons form is defined as $$\widetilde{\mathrm{ch}}(\tilde\nabla)=\int_0^1\mathrm{ch}(\tilde\nabla)\in\Omega^{\mathrm{odd}}(X;\mathbb C)\;.$$ It is closed if $\nabla_0$, $\nabla_1$ are flat. In this case, its cohomology class $\widetilde{\mathrm{ch}}(\nabla^0,\nabla^1)=[\widetilde{\mathrm{ch}}(\tilde\nabla)]\in H^{\mathrm{odd}}(X;\mathbb C)$ is independent of the choice of $\tilde\nabla$ (subject only to the boundary conditions above). If $\widetilde{\mathrm{ch}}(\nabla^0,\nabla^1)$ does not vanish, the answer to your second question is no. If it does vanish, there could still be other obstructions.
Sebastian Goette
- 6.8k
- 2
- 36
- 62