Nomad:无法运行python脚本
我正在尝试向我的nomad服务器提交以下作业。该作业基本上使用了一个有效负载,它是来自本地主机的python文件Nomad:无法运行python脚本,python,scheduler,taskscheduler,nomad,Python,Scheduler,Taskscheduler,Nomad,我正在尝试向我的nomad服务器提交以下作业。该作业基本上使用了一个有效负载,它是来自本地主机的python文件 job "agent-collector-bot" { datacenters = ["staging"] type = "batch" periodic { cron = "*/10 * * * *" prohibit_overlap = true } group "python-bot" { count =
job "agent-collector-bot" {
datacenters = ["staging"]
type = "batch"
periodic {
cron = "*/10 * * * *"
prohibit_overlap = true
}
group "python-bot" {
count = 1
task "slack-bot" {
driver = "raw_exec"
config {
command = "python"
args = ["local/agent-collector-slackbot.py"]
}
dispatch_payload {
file = "agent-collector-slackbot.py"
}
}
}
}
现在,当我在nomad中看到工作状态时,它会显示:
snomad状态代理收集器bot/
ID = agent-collector-bot/periodic-1512465000
Name = agent-collector-bot/periodic-1512465000
Submit Date = 12/05/17 14:40:00 IST
Type = batch
Priority = 50
Datacenters = staging
Status = pending
Periodic = false
Parameterized = false
Summary
Task Group Queued Starting Running Failed Complete Lost
python-bot 1 0 0 0 0 0
Placement Failure
Task Group "python-bot":
* Constraint "missing drivers" filtered 5 nodes
我检查了我的nomad客户端(全部5个)是否有python。。有人能帮我吗?输出中指定的驱动程序是
raw\u exec
,而不是python
您需要在客户端配置()中启用它
client {
options = {
"driver.raw_exec.enable" = "1"
}
}