Cluster shard allocation filtering doesn't affect primary shards

On ES 2.4.3, applying cluster shard filtering such as the one below only moves replica shards to other nodes. Primary ones got stuck on the node. Is this a bug or by design?

PUT /_cluster/settings
{
"transient" : {
"cluster.routing.allocation.exclude._ip" : "10.0.0.1"
}
}

found out it's due to rolling upgrade from 2.4.3 to 2.4.4