Apologies for this, this will be fixed in Katello 3.18.2
In the meantime you can edit this file: /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.0.pre.master/lib/katello/tasks/pulp3_content_switchover.rake
and change this line:
task :pulp3_content_switchover => :environment do
to
task :pulp3_content_switchover => "dynflow:client" do