How to delete namespaces

There are two nomad clusters

  • region=global nomad:v1.2.6

  • region=jinhua nomad:v1.3.1

When I do this, it looks like it will delete ic-es for both regions, but globaldoes not have jobs, Jinhua has jobs


curl --request DELETE 'http://global.com/v1/namespace/ic-es'

So this will be wrong


1 error occurred:

* namespace "ic-es" has non-terminal jobs in regions: [jinhua]

When I tried to execute this, there were no errors, but no deletions were successful


curl --request DELETE 'http://global.com/v1/namespace/ic-es&region=global'

I tried to delete global IC es, but failed. Is this wrong

[root@nomad ~]# nomad job status -region=global  -namespace ic-es 
No running jobs
[root@nomad ~]# nomad job status -region=jinhua  -namespace ic-es 
ID           Type     Priority  Status   Submit Date
es-exporter  service  50        running  2022-06-06T19:41:20+08:00
[root@nomad ~]# nomad  namespace  delete  -region=global   ic-es
Error deleting namespace: Unexpected response code: 500 (rpc error: 1 error occurred:
	* namespace "ic-es" has non-terminal jobs in regions: [jinhua]

)