I'm still somewhat new to the rules, but as far as I understand it, a combat maneuver simply always rolls CMB against CMD, no matter what.
"When you attempt to perform a combat maneuver, make an attack roll and add your CMB in place of your normal attack bonus"
And creatures with abilities like grab or trip can simply make a check as a free action if the attack that is tied to the grab/trip ability hits, without having to give up attacks, actions or provoking attacks of opportunity.
So as I see it, the centipede attacks at -1 with his tail and if he hits, he rolls the usual d20+12 (his CMB) against the character's CMD. Squeezing doesn't seem to affect maneuvers, or at least I can't find anything that states otherwise