In-place upgrade from 4.0.1 to master version (4.2) fails on agents install.
The reason causes from the snapshot restore process. The "snapshot restore --restore-certificates" command should change the certificate metadata of the manager to the snapshot certificate.
The bug is reproducible only with the SSL certificates which you give in the bootstrap input file.
I managed to reproduce the bug on these scenarios: 4.0.1 to 4.2 and 4.0.1 to 4.1