chaosblade icon indicating copy to clipboard operation
chaosblade copied to clipboard

[QUESTION]使用k8s注入问题

Open cyrly97 opened this issue 2 years ago • 4 comments

使用blade命令 image 请问这个问题怎么解决,谢谢

operator及tool都是运行的 image

cyrly97 avatar Jun 29 '22 08:06 cyrly97

@cyrly97 请尝试执行指令 kubectl describe crds chaosblades.chaosblade.io 查看chaosblade实际安装情况,如果还需要进一步的帮助,请将该指令返回值回复在这个issue下

Icesource avatar Jul 06 '22 07:07 Icesource

Name: chaosblades.chaosblade.io Namespace:
Labels: Annotations: helm.sh/hook-delete-policy: before-hook-creation API Version: apiextensions.k8s.io/v1beta1 Kind: CustomResourceDefinition Metadata: Creation Timestamp: 2020-04-03T07:59:16Z Deletion Timestamp: 2022-06-29T05:47:06Z Finalizers: customresourcecleanup.apiextensions.k8s.io Generation: 1 Resource Version: 199246703 Self Link: /apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/chaosblades.chaosblade.io UID: 03ae19b8-7581-11ea-b795-005056892fdb Spec: Conversion: Strategy: None Group: chaosblade.io Names: Kind: ChaosBlade List Kind: ChaosBladeList Plural: chaosblades Short Names: blade Singular: chaosblade Scope: Cluster Subresources: Status: Validation: openAPIV3Schema: Properties: API Version: Description: APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources Type: string Kind: Description: Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds Type: string Metadata: Type: object Spec: Properties: Experiments: Description: INSERT ADDITIONAL SPEC FIELDS - desired state of cluster Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html Items: Properties: Action: Description: Action is the experiment scenario of the target, such as delay, load Type: string Desc: Description: Desc is the experiment description Type: string Matchers: Description: Matchers is the experiment rules Items: Properties: Name: Description: Name is the name of flag Type: string Value: Description: TODO: Temporarily defined as an array for all flags Value is the value of flag Items: Type: string Type: array Required: name value Type: object Type: array Scope: Description: Scope is the area of the experiments, currently support node, pod and container Type: string Target: Description: Target is the experiment target, such as cpu, network Type: string Required: scope target action Type: object Type: array Required: experiments Type: object Status: Properties: Exp Statuses: Description: Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html Items: Properties: Action: Type: string Error: Type: string Res Statuses: Description: ResStatuses is the details of the experiment Items: Properties: Error: Description: experiment error Type: string Id: Description: experiment uid in chaosblade Type: string Kind: Description: Kind Type: string Name: Description: resource name Type: string Node Name: Description: NodeName Type: string State: Description: experiment state Type: string Success: Description: success Type: boolean UID: Description: resource uid Type: string Required: state kind success Type: object Type: array Scope: Description: experiment scope for cache Type: string State: Description: State is used to describe the experiment result Type: string Success: Description: Success is used to judge the experiment result Type: boolean Target: Type: string Required: scope target action success state Type: object Type: array Phase: Description: Phase indicates the state of the experiment Initial -> Running -> Updating -> Destroying -> Destroyed Type: string Required: expStatuses Type: object Version: v1alpha1 Versions: Name: v1alpha1 Served: true Storage: true Status: Accepted Names: Kind: ChaosBlade List Kind: ChaosBladeList Plural: chaosblades Short Names: blade Singular: chaosblade Conditions: Last Transition Time: 2020-04-03T07:59:16Z Message: no conflicts found Reason: NoConflicts Status: True Type: NamesAccepted Last Transition Time: Message: the initial names have been accepted Reason: InitialNamesAccepted Status: True Type: Established Last Transition Time: 2022-06-29T05:47:06Z Message: could not confirm zero CustomResources remaining: timed out waiting for the condition Reason: InstanceDeletionCheck Status: True Type: Terminating Stored Versions: v1alpha1 Events:

cyrly97 avatar Jul 06 '22 09:07 cyrly97

@cyrly97 请尝试执行指令 kubectl describe crds chaosblades.chaosblade.io 查看chaosblade实际安装情况,如果还需要进一步的帮助,请将该指令返回值回复在这个issue下

已发

cyrly97 avatar Jul 06 '22 09:07 cyrly97

问题找到了,旧的crd资源没有删除,现在执行code为54000,版本为1.6.1 image

chaosblade-tool日志: time="2022-07-26T02:06:23Z" level=error msg="add finalizer to chaosblade failed" Request.Name=e590b99dd44a64c8 error="Operation cannot be fulfilled on chaosblades.chaosblade.io "e590b99dd44a64c8": the object has been modified; please apply your changes to the latest version and try again" time="2022-07-26T02:06:23Z" level=error msg="update chaosblade phase to Initialized failed" Request.Name=e590b99dd44a64c8 error="the server could not find the requested resource (put chaosblades.chaosblade.io e590b99dd44a64c8)"

cyrly97 avatar Jul 26 '22 02:07 cyrly97

问题找到了,旧的crd资源没有删除,现在执行code为54000,版本为1.6.1 image

chaosblade-tool日志: time="2022-07-26T02:06:23Z" level=error msg="add finalizer to chaosblade failed" Request.Name=e590b99dd44a64c8 error="Operation cannot be fulfilled on chaosblades.chaosblade.io "e590b99dd44a64c8": the object has been modified; please apply your changes to the latest version and try again" time="2022-07-26T02:06:23Z" level=error msg="update chaosblade phase to Initialized failed" Request.Name=e590b99dd44a64c8 error="the server could not find the requested resource (put chaosblades.chaosblade.io e590b99dd44a64c8)"

chaosblade-operator和chaosblade版本是否一致? chaosblade-tool日志无法透出足够有效的信息,建议查看chaosblade-oprator下的执行日志以及演练的pod或container内部的chaosblade日志来具体分析问题

Icesource avatar Aug 12 '22 09:08 Icesource