Actually the 'first' problem is Petraeus placed himself in a compromised situation. Then poop started flowing downhill. It seemed to me obvious why Cantor went directly to the Director of the FBI. We sure are not going to be hearing about that investigation until it is completed, well, at least not by the adults left working for US.
I’m sure the CIA knew about his affair, he would have had gone through a rigorous background investigation to include a complete lifestyle polygraph. If this woman was found to not be a foreign intelligence agent or receiving classified information they probably ignored it. Given that this affair ended sometime ago - they probably just regarded it as a personal problem. The question is, why was the FBI investigating thin air reports of harassing e-mails? Who gave them authorization to hack into e-mails and conduct surveillance based off of little to no evidence of criminal wrongdoing or classified information negligence? Isn’t there a FISA court for a reason?