President Obama responded in an acceptable manner to McChrystal's inappropriate behavior by having him step down as leader of foreign forces in Afghanistan. I say "acceptable" because McChrystal deserved a more severe punishment. But I suspect Obama didn't want to offend too many people in the military, which would have happened if he had been harsher.
Replacing McChrystal with Petraeus was a savvy move on Obama's part. If counter-insurgency is the appropriate military strategy in Afghanistan, then selecting the general who knows the most about it was a no-brainer. Unfortunately, the strategy in Afghanistan is wrong, so choosing Petraeus won't make much of a difference in the outcome. The savvy part of the choice comes from Petraeus' credibility in official Washington, which means that Obama more-or-less pre-empted any Republican complaints about the change of command. They'll complain a bit anyway, but it won't get any traction in the mainstream press.
Unlike a few people (in comments around the web), I'm not disappointed that the change in command wasn't accompanied by an immediate change in policy. Such a massive course change would have looked desperate and ill-considered. Besides, if Obama is going to change his mind about the overall mission in Afghanistan, McChrystal's snit wasn't the kind of event that would prompt a re-evaluation. I don't know what would prompt a re-evaluation. But whatever it is, I hope Obama comes across it soon.