this whole section needs to move to a postcommit method (it's currently called from the create_port precommit method)