The criticism of David Petraeus will continue for quite some time. And deservedly so. He made a piss poor choice, undermining his ability to lead and serve as a role model. People, especially his adversaries in the military, will use this to attack not just the man but the policies he promoted. And it gets complicated because Petraeus did provoke the occasional crisis in civil-military relations. He engaged the Sunni Awakening before the US had a policy on it, so he made policy without guidance or permission from above.
Anyhow, the point here is that counter-insurgency is coming under attack because it has not "worked" in Afghanistan, and it was not as responsible for joy and happiness in Iraq. Heaps of folks in the US Army and outside of it are not big fans of COIN. Why? Partly because it threatens budgets if you don't need big tanks and bombers. Partly because it threatens identities--capital intensive warfare is the American way of war. Partly because COIN is complicated and appropriate for some circumstances and not others. Partly because there is no single way to execute a counter-insurgency campaign.
What made Petraeus such an improvement was his ability to think and adjust. The new counter-insurgency doctrine may not have been perfect, but it was the process that mattered. He brought together smart people across a variety of disciplines including civilians to re-think how the Army does counter-insurgency. He had studied the lessons of Vietnam, but did not just blindly apply those. Again, his version of COIN may have been lucky rather than good as it interacted with the Sunni Awakening in ways that gave the US a temporary advantage. But previous US military leaders showed no such ability to think outside the box.
The real challenge is that US conventional military supremacy means that most of the US's adversaries are not going to fight conventionally. Those that do, such as Hussein (twice!), are defeated but then leave behind tough political and military questions about what to do next. So, we need to have folks in charge who think and plan and adjust and adapt. Petraeus did that very well in Iraq in 2003 as the ground campaign ended and the aftermath became the problem. He did it very well in 2007 with the surge. Not sure how well Petraeus did in Afghanistan since there are a lot of things going on and I am still confused about how much success actually happened.
It is always so easy to confuse the person with the public relations. It is particularly the case when success is so hard to measure. As much as Petraeus has let us all down with his affair (and his being a lousy dissertation adviser), I still think how he conducted the missions he was given--conducting peace ops in Bosnia in 2002, Iraq in 2003/07, the doctrine writing in between the Iraq stints--made a difference and a positive one. Not flawless by any stretch, but better than most of the American generals.