如何限制在一个CoreOS节点上启动的服务数量

时间:2017-09-29 10:46:05

标签: coreos fleetctl

这是我的问题:

fleetctl list-units

UNIT                            MACHINE
processing-node@1.service       X.Y.Z.86
processing-node@10.service      X.Y.Z.150
processing-node@11.service      X.Y.Z.48
processing-node@12.service      X.Y.Z.48
processing-node@13.service      X.Y.Z.48
processing-node@14.service      X.Y.Z.86
processing-node@15.service      X.Y.Z.82
processing-node@16.service      X.Y.Z.48
processing-node@2.service       X.Y.Z.248
processing-node@3.service       X.Y.Z.48
processing-node@4.service       X.Y.Z.85
processing-node@5.service       X.Y.Z.48
processing-node@6.service       X.Y.Z.48
processing-node@7.service       X.Y.Z.48
processing-node@8.service       X.Y.Z.87
processing-node@9.service       X.Y.Z.248
worker-cache@1.service          X.Y.Z.248
worker-cache@2.service          X.Y.Z.222
worker-cache@3.service          X.Y.Z.87
worker-cache@4.service          X.Y.Z.150
worker-cache@5.service          X.Y.Z.82
worker-cache@6.service          X.Y.Z.85
worker-cache@7.service          X.Y.Z.48
worker-cache@8.service          X.Y.Z.86

群集由十台机器组成。工作缓存单元需要大量的计算能力,因此它们在服务文件中相互排斥:

tail -2 worker-cache@.service

[X-Fleet]
Conflicts=worker-cache@*

因此,每个节点只有一个工作缓存单元。处理节点单元需要更少的功率,并且可以在与工作缓存单元相同的机器上生成,但我希望每台机器最多有两台,实际上并非如此:

processing-node@11.service      X.Y.Z.48
processing-node@12.service      X.Y.Z.48
processing-node@13.service      X.Y.Z.48
processing-node@16.service      X.Y.Z.48
processing-node@3.service       X.Y.Z.48
processing-node@5.service       X.Y.Z.48
processing-node@6.service       X.Y.Z.48
processing-node@7.service       X.Y.Z.48

有办法吗?

0 个答案:

没有答案