Defense Secretary Donald H. Rumsfeld made an unannounced visit to Iraq on Friday as sectarian violence rippled across the country , with a bombing at a Shiite mosque northeast of Baghdad and a machine-gun attack on a bakery in a Shiite neighborhood of Baghdad .