使用Nebula Operator部署后metad服务第二天会自动删除

  • 部署方式:helm
  • 安装方式:nebula-operator
  • 是否为线上版本:Y
  • 问题的具体描述
cert-manager: 1.6.0
kruise:1.0.1
nebula-operator: 0.9.0
nebula-cluster: 0.9.0
nebula.version=v2.6.2

使用Nebula Operator部署后metad服务第二天会自动删除,并且无法重启,原因如下

部署时whenUnsatisfiable就已经为空,即使我使用kubectl edit statefulset来在线修改whenUnsatisfiable为ScheduleAnyway,虽然暂时可以创建出,但是第二天whenUnsatisfiable就又已经为空了,pod会再次删除
1648604090834_0DFEAD86-3D2D-4738-83CC-CDD1A4B92286

你好,可以通过修改nebulacluster.spec.unsatisfiableAction来设置whenUnsatisfiable,默认值是DoNotSchedule

1 个赞

operator没有自动删除metad的逻辑,确认一下是不是节点的负载比较高导致pod被驱逐了?

请问如何设置此参数,是在helm install --set 此参数,还是?

nebulacluster 的helm模板这个参数目前还不可配,你可以先改下本地helm template,或者直接kubectl edit nebulacluster,https://github.com/vesoft-inc/nebula-operator/blob/master/apis/apps/v1alpha1/nebulacluster_types.go#L71

ok,我试试,我本来就是使用helm离线部署的,不过我还是不明白如何设置此参数,这样吗
image

对,可以kubectl get nc nebulacluster -o yaml看看有没有生效

大哥 不行啊,保存不了

@kqzh

稍等哈,他们在本地测试中 :thinking: kqzh 暂时不在,我找了 qiaolei,等他测完了会来更新帖子的哈

helm install nebula nebula-operator/nebula-cluster --namespace=default --set nameOverride=nebula --set nebula.storageClassName=fast-disks --set unsatisfiableAction=ScheduleAnyway

谢谢 麻烦了

谢谢

试试,可以的话,可以勾选 kevin 的回复为解决方案哈,不行的话记得更新下帖子。

还是依旧 我现在想要排查环境问题,但是没有其他环境,而且对于这个有点心累了,所以暂时放下,忙其他的,过阵子再试试

Orz 那就过段时间再试试,坚强 up lol

正式回复下:
我使用helm部署nebula_cluster,whenUnsatisfiable就已经为空,导致不知为何原因,第二天pod就被删除,但是whenUnsatisfiable为空,导致无法创建pod,所以有两个问题:

  1. whenUnsatisfiable为何为空,应该是默认的DoNotSchedule;
  2. 为何会删除pod,资源应该够啊
    我即使使用kubectl edit statefulset修改whenUnsatisfiable,但是第二天pod依旧被删除,并且whenUnsatisfiable又变为空

个人感觉和apps.nebula-graph.io_nebulaclustersCRD(解决compatibility: v0.8.0 → v0.9 · Issue #103 · vesoft-inc/nebula-operator · GitHub)和 版本0.9.0的nebula-operator 有关系

暂时尝试方案:
没有apply这个CRD,然后使用部署清单,直接部署nebula_cluster,并且修改nebulacluster.spec.unsatisfiableAction来设置whenUnsatisfiable为ScheduleAnyway(但是其实这个不重要了,就算是默认值也没关系,只要不为空即可)

apiVersion: apps.nebula-graph.io/v1alpha1
kind: NebulaCluster
metadata:
  name: mdm-nebula
spec:
  graphd:
...
...

这样部署的nebula的whenUnsatisfiable确实为ScheduleAnyway,但是还需第二天检测下是否重启和是否能重启成功,当然是不重启最好

经过测试,whenUnsatisfiable变为空的问题就是因为apply apps.nebula-graph.io_nebulaclusters的CRD导致customresourcedefinition.apiextensions.k8s.io/nebulaclusters.apps.nebula-graph.io configured,之所以apply 这个 CRD,是因为当时Nebula operator 0.9.0才出来时,有bug导致nebula-cluster部署失败

Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: error validating "": 
	error validating data: [ValidationError(NebulaCluster.spec.graphd): unknown field "logVolumeClaim" in io.nebula-graph.apps.v1alpha1.NebulaCluster.spec.graphd, 
	ValidationError(NebulaCluster.spec.metad): unknown field "dataVolumeClaim" in io.nebula-graph.apps.v1alpha1.NebulaCluster.spec.metad, 
	ValidationError(NebulaCluster.spec.metad): unknown field "logVolumeClaim" in io.nebula-graph.apps.v1alpha1.NebulaCluster.spec.metad, 
	ValidationError(NebulaCluster.spec.storaged): unknown field "dataVolumeClaim" in io.nebula-graph.apps.v1alpha1.NebulaCluster.spec.storaged, 
	ValidationError(NebulaCluster.spec.storaged): unknown field "logVolumeClaim" in io.nebula-graph.apps.v1alpha1.NebulaCluster.spec.storaged]

可看compatibility: v0.8.0 → v0.9 · Issue #103 · vesoft-inc/nebula-operator · GitHub,但是现在应该是已经修复了,所以现在如果依旧apply 这个CRD 就会导致集群出现以上情况

这也是在helm template修改nebulacluster.spec.unsatisfiableAction来设置whenUnsatisfiable却helm install失败的原因

0.8到0.9 CRD里存储部分的字段更新了,我们会尽快对0.8版本的兼容做处理