Hi Erik,
Thank you for bringing this up.
It does look like we do not handle "--num-preemptible-workers 0" correctly. I have filed a bug to fix this. The default value for --num-preemptible-workers is 0 and can be omitted entirely if you do not want preemptible workers.
Your comment that hadoop does not register preemptible workers is worrisome. They should always join the cluster and be usable regardless of how the job is submitted. I would like to emphasize that preemptible instances are a limited resource, subject to availability. It is possible that your cluster will not have any preemptible workers. (You will not incur any charges until preemptible instances are actually created) This also means that in some cases preemptible workers will join
after cluster is reported RUNNING.
You can verify if preemptible instances are actually created by this query:
$ gcloud compute instances list --zone <cluster-zone> | grep <cluster-name>-sq
If there are instances present, then verify they have joined the cluster via:
$ gcloud compute ssh <cluster-name>-m --zone <cluster-zone>
$ yarn node -list
If you find that there are instances but they are not joining the cluster then kindly respond to this thread or file a report through cloud support. We'll be happy to assist and debug.