Replica shards not being assigned to nodes

Hello,

I have this issue that started happening for a few days now.

When an index is generated, primary shards are assigned, but not the replica shards. They show as un-assigned. So after I run this command where my script populates the variables

   curl -XPOST 'localhost:9200/_cluster/reroute' -d '{
      "commands": [
         {
             "allocate": {
                 "index": "'$INDEX'",
                 "shard": '$SHARD',
                 "node": "'$NODE'",
                 "allow_primary": true
           }
         }
     ]
   }'

replica shards are allocated.

This is my cluster settings. Disable_allocation or disable_replica_allocation if were applied I wouldn't be able to allocate any shards, correct? I can update this false, I think enable: all what matters. But I am not sure.

{
"persistent" : { },
"transient" : {
"cluster" : {
"routing" : {
"allocation" : {
"disable_allocation" : "true",
"disable_replica_allocation" : "true",
"enable" : "all"
}
}
}
}
}

I went ahead and set the settings to false. I can now allocate the replica shards.