President Barack Obama plans this week to name Panetta to replace Defense Secretary Robert Gates, and Gen. David Petraeus, now running the war in Afghanistan, would take the CIA chief's job in a major shuffle of the nation's top national security leadership, administration and other sources said Wednesday.